Closed Bug 1057989 Opened 10 years ago Closed 10 years ago

[Devices][Storage] Do not auto change default media location when remove SD card (current media location) without ejecting it while settings is not running in the foreground

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.1+, b2g-v2.1 fixed, b2g-v2.2 fixed)

VERIFIED FIXED
2.1 S5 (26sep)
blocking-b2g 2.1+
Tracking Status
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed

People

(Reporter: ashiue, Assigned: iliu)

References

Details

Attachments

(2 files)

Device    Helix 
Gaia      e424c85eda87a40c0fa64d6a779c3fa368bf770b
Gecko     https://hg.mozilla.org/mozilla-central/rev/daa84204a11a
BuildID   20140824160205
Version   34.0a1

*Prerequisite:
1. A phone (support hot plugging) has internal storage and SD card 

STR:
1. Set SD card as default media location
2. Let Settings running in the background
3. Remove SD card without rejecting it
4. Go to Settings to check default media location

Expect result:
Default media location should change to "Internal"

Actual result:
Default media location still show "SD card"
[Blocking Requested - why for this release]:
blocking-b2g: --- → 2.1?
QA Whiteboard: [COM=Storage]
blocking-b2g: 2.1? → 2.1+
Assignee: nobody → iliu
Alison - Is this related to a 2.1 user story? If so, which one?
Flags: needinfo?(ashiue)
(In reply to Jason Smith [:jsmith] from comment #2)
> Alison - Is this related to a 2.1 user story? If so, which one?
This related to bug 945642
Flags: needinfo?(ashiue)
(In reply to Jason Smith [:jsmith] from comment #2)
> Alison - Is this related to a 2.1 user story? If so, which one?

We find out the issue during implementation state. Then, we have offline discussion with UX, QA for the better user experience. It's not mentioned in the user story. But the gaol is arming to disable default storage selection while the external storage is not available(Idle, NoMedia). And it should be changed to internal storage automatically.
The root cause is no updating default storage since we removeEventListner 'storage-state-change'. The event will not be listened while settings app goes into background(document.hidden = true). Will have a patch to fix the problem while settings app goes back to the foreground.
Status: NEW → ASSIGNED
Since a fixing patch of bug 1058419 is aiming to update default media location, the patch here will depend on it.
Depends on: 1058419
Target Milestone: --- → 2.1 S5 (26sep)
Attached file pull request 24316
Attachment #8493514 - Flags: review?(ejchen)
(In reply to Ian Liu [:ianliu] from comment #7)
> Created attachment 8493514 [details] [review]
> pull request 24316

Hi EJ, could you please help to review my pr? Per comment 6, the patch will update default media location after Settings app is visible again from background. Thanks.
Comment on attachment 8493514 [details] [review]
pull request 24316

This patch looks ok to me, and please check my comment on Github ! Thanks Ian.
Attachment #8493514 - Flags: review?(ejchen)
Comment on attachment 8493514 [details] [review]
pull request 24316

EJ, thanks for reviewing effort. I have updated the patch with your suggestion. Will need your review again.
Attachment #8493514 - Flags: review?(ejchen)
Comment on attachment 8493514 [details] [review]
pull request 24316

Thanks Ian ! This patch looks nice :)
Attachment #8493514 - Flags: review?(ejchen) → review+
Since the pr is landed, we can close the issue now.

Gaia/master:  ba6cf2c88d2813bd15ec0b30e267614e828233d2
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 8493514 [details] [review]
pull request 24316

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): bug 1057989
[User impact] if declined: Default media location menu no update while external storage be removed and settings is in background.
[Testing completed]: Passed on Try-Server
[Risk to taking this patch] (and alternatives if risky): Low
[String changes made]: None
Attachment #8493514 - Flags: approval-gaia-v2.1?
Attachment #8493514 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
Verified on Helix:
Gaia-Rev        08be48c71d0b4999cedee89fe81de1a03c66436f
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-aurora/rev/6e7e0a39f73b
Build-ID        20140930160205
Version         34.0a2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: