[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

VERIFIED FIXED in Firefox OS v2.1

Status

Firefox OS
Gaia::Settings
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: Alison Shiue, Assigned: iliu@mozilla.com, ianliu.moz@gmail.com)

Tracking

unspecified
2.1 S5 (26sep)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

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

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
Created attachment 8478154 [details]
not_auto_change_default_media_location.mp4

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"
(Reporter)

Comment 1

3 years ago
[Blocking Requested - why for this release]:
blocking-b2g: --- → 2.1?
QA Whiteboard: [COM=Storage]

Updated

3 years ago
blocking-b2g: 2.1? → 2.1+
(Assignee)

Updated

3 years ago
Assignee: nobody → iliu
Alison - Is this related to a 2.1 user story? If so, which one?
Flags: needinfo?(ashiue)
(Reporter)

Comment 3

3 years ago
(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.
(Assignee)

Updated

3 years ago
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
(Assignee)

Updated

3 years ago
Target Milestone: --- → 2.1 S5 (26sep)
Created attachment 8493514 [details] [review]
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
Last Resolved: 3 years ago
status-b2g-v2.2: --- → fixed
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+
v2.1: https://github.com/mozilla-b2g/gaia/commit/4e0a3ae874784a8c16accb701ead2b5ed390252d
status-b2g-v2.1: --- → fixed
(Reporter)

Comment 15

3 years ago
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.