new Storage()
Storage listenes to lock and unlock events and changes the
setting which controls automount behavior of USB storage.
Storage operates both on lock/unlock events, as well as the
ums.enabled setting which is set in the settings app.
Members
-
_mode :String
-
The current value of whether or not USB storage is enabled.
-
automounterDisable :Integer
-
ums.mode setting value when the automounter is disabled.
-
automounterEnable :Integer
-
ums.mode setting value when the automounter is enabled.
-
umsEnabled :String
-
The name of the setting to enable or disable USB storage.
-
umsMode :String
-
The name of the setting that defines automount behavior.
Methods
-
handleEvent(evt)
-
General event handler interface.
Updates the overlay with as we receive load events.Parameters:
Name Type Description evt DOMEvent The event.
-
modeFromBool(val) → {Integer}
-
Maps a ums.enabled onto an automount value.
Parameters:
Name Type Description val Integer The bool value that enables/disables automounting.
Returns:
IntegerThe automount enabled/disabled value.
-
setMode(val)
-
Sets the automount mode.
Parameters:
Name Type Description val Integer The value we are setting automount to.