Closed
Bug 928558
Opened 12 years ago
Closed 12 years ago
AutoMounter mark volumes as being shared even if they have open files
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:koi+, firefox26 fixed, firefox27 fixed, b2g-v1.2 fixed)
RESOLVED
FIXED
blocking-b2g | koi+ |
People
(Reporter: dhylands, Assigned: dhylands)
References
Details
Attachments
(1 file)
10.29 KB,
patch
|
qdot
:
review+
|
Details | Diff | Splinter Review |
Currently, the AutoMounter waits until it starts the sequence of sharing a volume with the PC before marking a volume as shared.
The AutoMounter detects if there are files open on the volume, and defers initiating the sharing sequence until there are no open files. This is because vold will kill any apps which have open files.
This bug is to have the AutoMounter mark the volumes as being shared as soon as it detects that there are open files. This should then ripple through device storage and cause a volume shared notification to be sent to the apps which have the files open (since the only "normal" way to have files open is through device storage).
This then satifies bug 912609 comment 18.
Marking as koi+ since 912609 is koi+ (and it will require this change).
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 819257 [details] [diff] [review]
Mark volumes shared before checking for open files.
Ignore the change in VolumeManagerLog.h - I've fixed it already.
The basic gist of this is that we want to mark the volumes as shared when we're about to share them, so that apps will then see that and close any open files they have.
Attachment #819257 -
Flags: review?(kyle)
Comment 3•12 years ago
|
||
Comment on attachment 819257 [details] [diff] [review]
Mark volumes shared before checking for open files.
Review of attachment 819257 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits addressed
::: dom/system/gonk/AutoMounter.cpp
@@ +338,5 @@
> + static bool inUpdateState = false;
> + if (inUpdateState) {
> + // When UpdateState calls SetISharing, this causes a volume state
> + // change to occur, which would normally cause UpdateState to be called
> + // again. We want the volume state change to go out (so that device
Supernit: No matching paren?
::: dom/system/gonk/Volume.cpp
@@ +67,5 @@
>
> void
> Volume::SetIsSharing(bool aIsSharing)
> {
> + if (aIsSharing != mIsSharing) {
Supernit: Flip boolean, return early
::: dom/system/gonk/VolumeManagerLog.h
@@ +20,5 @@
> #else
> #define DBG(args...)
> #endif
>
> +#endif // mozilla_system_volAut
Nit: This looks like an accident?
Attachment #819257 -
Flags: review?(kyle) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 6•12 years ago
|
||
Updated•12 years ago
|
status-firefox26:
--- → fixed
Assignee | ||
Comment 8•12 years ago
|
||
(In reply to :Ms2ger from comment #7)
> Why not use mozilla::AutoRestore?
Umm - because I didn't know about it...
I filed bug 931424 to fix it.
Updated•12 years ago
|
Comment 9•12 years ago
|
||
Thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•