Closed
Bug 921105
Opened 12 years ago
Closed 11 years ago
[Devices][User Story] Storage management: SD card formatting, mount and unmount.
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.3 Sprint 6 - 12/6
People
(Reporter: bhuang, Unassigned)
References
Details
(Whiteboard: [ucid:Device4, 1.3:p2, ft:devices])
Attachments
(2 files, 8 obsolete files)
User story:
As a user, I want to be able to clear the contents of an inserted SD card and format it so it can be used in the device.
Updated•11 years ago
|
Whiteboard: [1.3:p2]
Comment 1•11 years ago
|
||
Hi everyone, This is initial version of SD card. Please check.
Comment 2•11 years ago
|
||
Hi Eric,
Fang said this question may need your help. So can you help to provide SD card icon for SW engineer ?
Comment 3•11 years ago
|
||
Here is the SD card icon for it.
Comment 4•11 years ago
|
||
Hi Neo,
I have a question about format SDCard while some app are using it. For example, a user is playing music, then the user leave Music app and launch Settings app. The user is able to format SDCard while music is playing in the background. What the expected result do we need to handle? Many apps might meet the problem while they're accessing SDCard in the background. These apps will need to handle the scenario. Thanks.
Flags: needinfo?(nhsieh)
Comment 5•11 years ago
|
||
I'd expect this to be handled in a similar fashion to sharing with the PC.
We should cause the status through device storage to change early, which gives the apps a chance to close all of their files, but we don't actually initiate sharing while there are any files open.
The flow for sharing is as follows:
1 - User enables sharing (and cable is plugged in, etc)
2 - AutoMounter detects setting change and conditions are right
3 - AutoMounter calls vol->SetIsSharing
4 - AutoMounter checks for open files and doesn't share if any files are open
5 - AutoMounter sets up a timer to retry shortly
The call to SetIsSharing get rippled up from the Volume through to nsVolume, and the nsVolumeService::UpdateVolume detects that the IsSharing state changed, so it sends out NS_VOLUME_STATE_CHANGED to any listeners.
nsDOMDeviceStorage::Observe gets the NS_VOLUME_STATE_CHANGED notification and calls DeviceStorageFile::GetStatus, which detects that vol->IsSharing is set and changes the status to sharing (even though the volume state is still showing as mounted), so it reports the status to gallery etc as sharing.
Since the app (i.e. gallery) has been told that the vol status is now sharing, it will close all of its files.
The timer setup in the AutoMounter will fire and detects that the files are all closed, so it goes ahead and initates the unmount/share.
For Formatting, we should add a Volume::SetIsFormatting and device storage should probably report the status as unavailable rather than sharing (unavailable will cause the DB to be wiped and a rescan - which is what we want for a format).
nsVolume::Set and nsVolume::Equals both need to be updated to know about the new mIsFormatting (so that mIsFormatting gets propogated from the Volume class to the nsVolume class and so that its considered to be state change.
Comment 6•11 years ago
|
||
Hi Ian,
I think we can interrupt all SD card related Apps process when system pop up the double confirm window. I will assume if users enter this kind of level in settings and double confirm the format action means users already know this is "format". So we don't need let user confirm to stop all background Apps. (All Apps means even one unknown task is writting some logs into SD card.)
Is that make sense to you?
Flags: needinfo?(nhsieh)
Comment 7•11 years ago
|
||
(In reply to Neo Hsieh from comment #6)
> Hi Ian,
> I think we can interrupt all SD card related Apps process when system pop up
> the double confirm window. I will assume if users enter this kind of level
> in settings and double confirm the format action means users already know
> this is "format". So we don't need let user confirm to stop all background
> Apps. (All Apps means even one unknown task is writting some logs into SD
> card.)
> Is that make sense to you?
I just want to stress that it isn't acceptable to unmount the sdcard while there are open files.
Updated•11 years ago
|
Target Milestone: --- → 1.3 Sprint 6 - 12/6
Updated•11 years ago
|
Whiteboard: [1.3:p2] → [UCID:Device4, 1.3:p2, FT:devices]
Comment 9•11 years ago
|
||
(In reply to Dave Hylands [:dhylands] from comment #7)
> I just want to stress that it isn't acceptable to unmount the sdcard while
> there are open files.
(In reply to Joe Cheng [:jcheng] from comment #8)
> ni? ahuang for comment 7
Yeah, I'm considering this as what we did on usb mass storage case, in bug 841661
Flags: needinfo?(ahuang)
Comment 10•11 years ago
|
||
Hi All, I updated UX document for fix some buttons style.
Comment 11•11 years ago
|
||
Neo, thanks for your update quickly.
Comment 12•11 years ago
|
||
Comment 13•11 years ago
|
||
Update whiteboard tag to follow format [ucid:{id}, {release}:p{1,2}, ft:{team-id}]
Whiteboard: [UCID:Device4, 1.3:p2, FT:devices] → [ucid:Device4, 1.3:p2, ft:devices]
Reporter | ||
Updated•11 years ago
|
Blocks: 1.4-devices
Updated•11 years ago
|
Blocks: 1.4-devices-targeted
Updated•11 years ago
|
No longer blocks: 1.4-devices
Comment 14•11 years ago
|
||
Please check new UX document for support multi-partition situation
Flags: needinfo?(iliu)
Comment 16•11 years ago
|
||
Note:
The latest spec. is located at https://bugzilla.mozilla.org/show_bug.cgi?id=929860#c16 . Since there is an integrated flow for storage management, format and mount/unmount, it's better to rename the summary.
Summary: [Devices][User Story] SD card formatting → [Devices][User Story] Storage management: SD card formatting, mount and unmount.
Comment 17•11 years ago
|
||
Note:
Since Bug 841660 and Bug 929860 are landed, it's ready to format SD Card now.
Comment 18•11 years ago
|
||
The integrated flow is blocked via bug 945642(mount/unmount flow).
Depends on: 945642
Comment 19•11 years ago
|
||
Hi Omega,
I just go through Storage Management spec again. I have some confused in page 7(flow 3) and 8(flow 3).
In p7, flow 3, after a user unmount SD card, we will see "Mount SD card" button in the menu. It also means that a user is not able to format the unmounted SD card.(Unmount button enabled, Format button disabled)
In p8, flow 3, after inserted an unformatted or un-readable format SD card. It's available to format it. There is a "Format SD card" button in the menu.(Unmount button disabled, Format button enabled)
In fact the two scenario, SD card is in unmounted status. But their definition is different. Somehow, the flow is making me confused that one is able to unmount/format. The other is not. Per offline discussion with Alan, we are able to format SD card in unmounted state. Shall we need to disable format and mount button in this case? Thanks.
Updated•11 years ago
|
Flags: needinfo?(ofeng)
Comment 20•11 years ago
|
||
Here is the updated spec modified by the discussion.
Attachment #824544 -
Attachment is obsolete: true
Attachment #8337647 -
Attachment is obsolete: true
Attachment #8339084 -
Attachment is obsolete: true
Attachment #8349813 -
Attachment is obsolete: true
Flags: needinfo?(ofeng)
Comment 21•11 years ago
|
||
Here is the updated spec modified by the discussion.
Attachment #8387448 -
Attachment is obsolete: true
Comment 22•11 years ago
|
||
Here is the updated spec modified by the discussion.
Attachment #8388348 -
Attachment is obsolete: true
Comment 23•11 years ago
|
||
Hello, please see attached for the latest spec for SD card. Thanks!
Attachment #8389083 -
Attachment is obsolete: true
Comment 24•11 years ago
|
||
Updated SD card icons for Notifications, all the sizes icons are in the zip file.
Attachment #825060 -
Attachment is obsolete: true
Comment 25•11 years ago
|
||
The work is done in bug 945642 and bug 908916.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•