Closed
Bug 856782
Opened 12 years ago
Closed 12 years ago
Update mediadb and settings app to use getDeviceStorages
Categories
(Firefox OS Graveyard :: Gaia::Gallery, defect)
Tracking
(blocking-b2g:leo+, b2g18 fixed)
People
(Reporter: dhylands, Assigned: jj.evelyn)
References
Details
Attachments
(1 file)
With the gecko changes in bug 838038, navigator.getDeviceStorages was added to return an array of device storage objects.
This implies that some changes will be needed in mediadb.
I couldn't tell if what bug 844207 is supposed to be for (there is no description), so this might be a dup.
This bug is for the changes required in mediadb to switch over to use getDeviceStorages
Reporter | ||
Updated•12 years ago
|
blocking-b2g: --- → leo?
Comment 1•12 years ago
|
||
Dave's gecko work on 838038 is landing TODAY, April 2, 2013. With the goal of UX unblocking 838038 in time for 1.1, then, this is what UX is going to do by Friday, April 5:
UX (Casey) will create wireframes around the settings apps, the share option, and where they should be placed.
Something that may help Casey here is updating the patch (that adds a fake volume used for testing) on 838038: Dave used this patch to test and verify his work and that patch is NOT landing, so Casey can put it in his local tree and do an unagi build, and get two storage areas on an unagi to test his work.
Dave has generously offered to do the gaia side work and pull it all together. Dave will update mediadb and the settings app to use get device storage.
Assignee: nobody → dhylands
Summary: Update mediadb to use getDeviceStorages → Update mediadb and settings app to use getDeviceStorages
Reporter | ||
Comment 3•12 years ago
|
||
No - bug 838038 if fully backwards compatible. So technicaly, I guess this bugs depends on the code in 838038, but the feature isn't complete without this bug.
Flags: needinfo?(dhylands)
Comment 4•12 years ago
|
||
OK so we're blocking here based on an understanding that this is required for the feature in bug 838038 to work fully and that feature is a blocker.
blocking-b2g: leo? → leo+
status-b2g18:
--- → affected
Assignee | ||
Comment 5•12 years ago
|
||
take this issue to implement the UI changes in Settings app per Casey's UX wireframe:
https://www.dropbox.com/s/lr35b241542fmbu/Storage_v0.1.pdf
Assignee: dhylands → ehung
Comment 6•12 years ago
|
||
+1 Evelyn: Exactly. Thank you.
Reporter | ||
Comment 7•12 years ago
|
||
ok - based on Casey's Storage document from bug 838038 comment 69 (page 7), I'm going to propose the following setting names:
A - Enable USB Storage should control ums.mode (as it did previously)
C - Share using USB should control a setting named: ums.volume.NAME.enabled, where NAME comes from the volumeName attribute from the device storage object (i.e. navigator.getDeviceStorages[i].volumeName)
D - Default media location should be called device.storage.writable.name and it should contain NAME as per C. This should then get reflected from a setting into a preference in gecko/b2g/chrome/content/settings.js
For now, we also need something along the following for determining the label to be applied to the volumes:
If navigator.getDeviceStorages returns a single entry, then its volume name will be sdcard, and it should be called "SD Card Storage" (so this covers the unagi).
If navigator.getDeviceStorages returns more than one entry, then the first entry should be sdcard, and it will be called "Internal Storage", and the second one should be called SD Card Storage, and the third one (if it exists) should be called SD Card Storage 2.
On unagi, there is a single physical sdcard, which is called "sdcard".
On leo, there are 2 volumes, sdcard is the internal memory, and extsdcard (or something along those lines) will correspond to the physical sdcard.
On something like a nexus 4, there won't be any sdcard volumes (as far as the volume manager is concerned), but we'll have to create one, and it will correspond to internal memory. By the time we get around to supporting this we can probably figure out how to add an "external" attribute to the device storage object. But we don't have to worry about this particular scenario in this time frame.
Assignee | ||
Comment 8•12 years ago
|
||
I need a new icon for display item A on root panel, file bug 866376 for it.
Assignee | ||
Comment 9•12 years ago
|
||
Hi Dave,
I need to provide a media type when acquiring deviceStorage objects, like:
var storages = navigator.getDeviceStorages(storageType);
However, per spec design, the settings are listed by volumes, but I have no idea which media type I should use to get all volumes. Current implementation in Settings app uses 'picture' (I believe it's for no reason). I was wondering is it possible that different media type will get different number of volumes?
Flags: needinfo?(dhylands)
Reporter | ||
Comment 10•12 years ago
|
||
Hi Evelyn,
(In reply to Evelyn Hung [:evelyn] from comment #9)
> Hi Dave,
> I need to provide a media type when acquiring deviceStorage objects, like:
> var storages = navigator.getDeviceStorages(storageType);
> However, per spec design, the settings are listed by volumes, but I have no
> idea which media type I should use to get all volumes. Current
> implementation in Settings app uses 'picture' (I believe it's for no
> reason). I was wondering is it possible that different media type will get
> different number of volumes?
pictures, music, video, and sdcard will all return the same volumes. apps will only ever return one (different) volume from the above.
The used space and files returned by pictures, music, video and sdcard will be different, but the volumes will be the same.
Flags: needinfo?(dhylands)
Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Dave Hylands [:dhylands] from comment #10)
> The used space and files returned by pictures, music, video and sdcard will
> be different, but the volumes will be the same.
Thanks for the quick response. :)
One more question, how about free space? I guess there is only one free space value per volume and it's not related to media type? i.e. I can pass any media type to get the free space of a volume?
Reporter | ||
Comment 12•12 years ago
|
||
(In reply to Evelyn Hung [:evelyn] from comment #11)
> (In reply to Dave Hylands [:dhylands] from comment #10)
> > The used space and files returned by pictures, music, video and sdcard will
> > be different, but the volumes will be the same.
> Thanks for the quick response. :)
> One more question, how about free space? I guess there is only one free
> space value per volume and it's not related to media type? i.e. I can pass
> any media type to get the free space of a volume?
Right - for a given volume, the free space returned from pictures, video, music and sdcard should all be the same.
Assignee | ||
Comment 13•12 years ago
|
||
(In reply to Dave Hylands [:dhylands] from comment #12)
> (In reply to Evelyn Hung [:evelyn] from comment #11)
> > (In reply to Dave Hylands [:dhylands] from comment #10)
> > > The used space and files returned by pictures, music, video and sdcard will
> > > be different, but the volumes will be the same.
> > Thanks for the quick response. :)
> > One more question, how about free space? I guess there is only one free
> > space value per volume and it's not related to media type? i.e. I can pass
> > any media type to get the free space of a volume?
>
> Right - for a given volume, the free space returned from pictures, video,
> music and sdcard should all be the same.
Got it, thank you.
To be honest, the API design is not intuitive to me. I will file another bug for discussion if it's really an issue. :)
Comment 14•12 years ago
|
||
Talked with Evelyn and so far, we have confidence that this bug can be resolved before May 3rd. Thanks!
Assignee | ||
Comment 15•12 years ago
|
||
It's a 1000-line huge patch, I will describe it later.
Attachment #745261 -
Flags: review?(arthur.chen)
Comment 16•12 years ago
|
||
Comment on attachment 745261 [details]
point to https://github.com/mozilla-b2g/gaia/pull/9546
Thank you for the patch, Evelyn! The major issue I've seen is the selector of default location. But I believe you've started working on it. Other minor issues please refer to github.
Attachment #745261 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 17•12 years ago
|
||
Comment on attachment 745261 [details]
point to https://github.com/mozilla-b2g/gaia/pull/9546
comment addressed. Please take a look, thanks!
Attachment #745261 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 18•12 years ago
|
||
Hi Dave, two question:
1. On leo device, no matter I inserted an external sd card or not, the navigator.getDeviceStorages will returns two volumes and both are available (storage.available() will be 'available'), and I will get the same usedSpace() value.
2. I can't separately enable either one volume's ums via settings, is 'ums.volume.NAME.enabled' implemented?
Flags: needinfo?(dhylands)
Reporter | ||
Comment 19•12 years ago
|
||
1. That's expected until bug 858416 lands
2. The implementation for that will come with bug 852768
I'm very close to landing bug 858416, and bug 852768 should follow shortly afterwards
Flags: needinfo?(dhylands)
Assignee | ||
Comment 20•12 years ago
|
||
Okay, then I will land UI part first if Arthur r+.
Comment 21•12 years ago
|
||
Comment on attachment 745261 [details]
point to https://github.com/mozilla-b2g/gaia/pull/9546
Please handle the UI in the root panel when disabling UMS per our discussion.
Attachment #745261 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 22•12 years ago
|
||
Comment on attachment 745261 [details]
point to https://github.com/mozilla-b2g/gaia/pull/9546
comment addressed. Thanks!
Attachment #745261 -
Flags: review?(arthur.chen)
Comment 23•12 years ago
|
||
Comment on attachment 745261 [details]
point to https://github.com/mozilla-b2g/gaia/pull/9546
We are almost there. Please fix a few nit picks and squash commits into one before landing the patch. r=me. Thanks!
Attachment #745261 -
Flags: review?(arthur.chen) → review+
Assignee | ||
Comment 24•12 years ago
|
||
Updated•11 years ago
|
Flags: in-moztrap?
Comment 25•11 years ago
|
||
Looks like there is a test case that more or less, covers the issue reported in this bug. Let me know if you agree, or if you think a more specific test case would be required.
https://moztrap.mozilla.org/manage/cases/?filter-id=3887
Flags: needinfo?(tchung)
Flags: in-moztrap?
Flags: in-moztrap-
Comment 26•11 years ago
|
||
(In reply to Darren from comment #25)
> Looks like there is a test case that more or less, covers the issue reported
> in this bug. Let me know if you agree, or if you think a more specific test
> case would be required.
>
> https://moztrap.mozilla.org/manage/cases/?filter-id=3887
Deferring your question to Jason. He owns system front end QA,and its possible the test are covered in bug 838038 already. but will let him reply.
Flags: needinfo?(tchung) → needinfo?(jsmith)
Comment 27•11 years ago
|
||
(In reply to Tony Chung [:tchung] from comment #26)
> (In reply to Darren from comment #25)
> > Looks like there is a test case that more or less, covers the issue reported
> > in this bug. Let me know if you agree, or if you think a more specific test
> > case would be required.
> >
> > https://moztrap.mozilla.org/manage/cases/?filter-id=3887
>
> Deferring your question to Jason. He owns system front end QA,and its
> possible the test are covered in bug 838038 already. but will let him reply.
I didn't work on this feature, so I don't know the answer to this question. I think John might have, but I'm not 100% sure.
Flags: needinfo?(jsmith)
You need to log in
before you can comment on or make changes to this bug.
Description
•