Closed Bug 1065912 Opened 11 years ago Closed 7 years ago

[UX] [Device Storage] the behavior of eject/share/format when there is opened file

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: alchen, Unassigned)

Details

We need to document these behaviors. [Now Status] The behaviors of share and format are the same. When there is opened file, device will close the opened file soon and do "sharing" and "formatting" later. The behavior of eject is different from share and format. When there is opened file, device will pend the "eject" until the opened file is closed. [Proposed behavior] The behavior of "eject" should be synchronized with "share" and "format". When there is opened file, device will close the opened file soon and do "eject" later. [Reason] Since both "share" and "format" will do "eject" first then do "share" with PC or "format" the storage later, I think it would be nice to have their behaviors be similar. Moreover, users don't have to read the pop-up and close the opened file by themselves. I think this is annoying.
Hi Jenny, could you have a comment about this?
Flags: needinfo?(jelee)
Hi Alphan, per discussion, I agree with your approach ;) Let's make "eject" storage in use behaves the same way "share via USB" and "formatting". Just need to make sure each app would handle the closing file correctly. Thanks for bringing this up!
Flags: needinfo?(jelee)
There are several bugs where we have discussion about these behaviors. (Bug 912609, Bug 925055, Bug 928558, Bug 931456) [User Story] 1. Do "eject", "formatting", "share via USB" by clicking the bottom in settings APP. In this case, settings APP will use device storage API to accomplish those purposes. 2. We enable "share via USB" first without USB connected. Then user plugged USB cable, device will do corresponding things to accomplish "share via USB". In this case, there is "no API called" involved. 3. User just unplug USB card without doing appropriate steps. (eject SD card first) By the current design, when "eject"/"formatting"/"share via USB" is happening, we will change the volume state first. All apps which use device storage should monitor volume state. When the volume become unavailable, apps should close the opened files accordingly. There is one event called "change". APP which uses device storage should listen this event for volume state or file change. We have five reason for this "change" event. 'modified' and 'deleted' for file change. 'available', 'unavailable' and 'shared' for volume change. In volume change event, app can access storage when they got change event which has reason called "available". Otherwise, app should stop access storage (closed opened files) when they got other change event.(reason are unavailable or shared) We have the corresponding code in mediadb.js already. (Music app will use it) https://github.com/mozilla-b2g/gaia/blob/master/shared/js/mediadb.js#L750
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.