Closed
Bug 781978
Opened 12 years ago
Closed 12 years ago
AutoMounter should initialize ums.mode to 0
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-basecamp:+)
RESOLVED
FIXED
blocking-basecamp | + |
People
(Reporter: dhylands, Assigned: dhylands)
Details
Attachments
(1 file)
6.47 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
Currently, the AutoMounter is using a setting called ums.mode to control whether its enabled or not (ums.enabled is the setting controlled by the user). ums.mode should be initialized to zero each time the AutoMounter starts (which is each time that B2G starts). The gaia/apps/system/js/storage.js file takes care of setting ums.mode appropriately to match the ume.enabled/lock-screen status.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #651066 -
Flags: review?(anygregor)
Updated•12 years ago
|
blocking-basecamp: ? → +
Comment 2•12 years ago
|
||
Comment on attachment 651066 [details] [diff] [review] Bug 781978 - Automounter should initialize ums.mode to zero ># HG changeset patch ># User Dave Hylands <dhylands@gmail.com> > >Bug 781978 - Automounter should initialize ums.mode to zero > >diff --git a/dom/system/gonk/AutoMounter.cpp b/dom/system/gonk/AutoMounter.cpp >index 138633eb..c835744 100644 >--- a/dom/system/gonk/AutoMounter.cpp >+++ b/dom/system/gonk/AutoMounter.cpp >@@ -230,27 +230,40 @@ public: > mAutoVolume[volIndex]->UnregisterObserver(&mVolumeEventObserver); > } > Volume::UnregisterObserver(&mVolumeEventObserver); > VolumeManager::UnregisterStateObserver(&mVolumeManagerStateObserver); > } > > void UpdateState(); > >+ const char *ModeStr(int32_t aMode) >+ { >+ switch (aMode) { >+ case AUTOMOUNTER_DISABLE: return "Disable"; >+ case AUTOMOUNTER_ENABLE: return "Enable"; >+ case AUTOMOUNTER_DISABLE_WHEN_UNPLUGGED: return "DisableWhenUnplugged"; >+ } >+ return "???"; Maybe Unknown or ErrorMode? ??? is not very informative.
Attachment #651066 -
Flags: review?(anygregor) → review+
Assignee | ||
Comment 3•12 years ago
|
||
So the whole ModeStr is just a function used for debugging. You should never see ???. It means that something was added to the enum without adding the enum to the ModeStr function. To me the ??? seems out of place (intended).
Assignee | ||
Comment 4•12 years ago
|
||
I decided to change it to "??? Unknown ???" "
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2076b10db1df
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•