Closed
Bug 876597
Opened 11 years ago
Closed 11 years ago
[FM Radio] FM is not geting disable in Airplane Mode
Categories
(Firefox OS Graveyard :: Gaia::FMRadio, defect)
Tracking
(blocking-b2g:leo+, b2g18 verified)
Tracking | Status | |
---|---|---|
b2g18 | --- | verified |
People
(Reporter: leo.bugzilla.gaia, Assigned: arthurcc)
Details
(Whiteboard: MiniWW, late-l10n)
Attachments
(2 files, 1 obsolete file)
[FM Radio] FM is not geting disable in airplane Mode 1. Title: FM works in Airplane mode 2. Precondition: Set the airplane mode 3. Tester's Action: (1) Insert HEADSET (2) Open FM (3) FM is playing 4. Detailed Symptom (ENG.) :a) when airplae mode is set and user open the FM, it starts playing. b) when FM is playing in background -> airplane mode get set -> FM get power off.But ones again -> Open FM -> Power on -> start playing 5. Expected: Fm shou;d diable fully in Airplane mode 6. Reproducibility: Y 1) Frequency Rate : 100% 7. Gaia Master/v1-train: Reproduced on Gaia master 8. Gaia Revision: 9380ceb81b3eac45861b8d1be07ab7f748ed52a3 9. Personal email id: ntiaj12345@gmail.com
As discussed in San Diego work week marking this as leo+.
blocking-b2g: --- → leo+
Whiteboard: MiniWW
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → arthur.chen
Comment 2•11 years ago
|
||
Per airline requirement described in http://www.united.com/web/en-US/content/travel/baggage/devices.aspx Devices that are not permitted for use at any time: battery-operated personal air-purifying devices TVs radio receivers and/or transmitters (including AM/FM/SW, CB and scanners) remote-control toys.
Assignee | ||
Comment 3•11 years ago
|
||
Pin, could you help review the change? I simply make the buttons disabled when the airplane mode is turned on. Thanks!
Attachment #755068 -
Flags: review?(pzhang)
Comment 4•11 years ago
|
||
Hi Arthur, about the symptom listed in the description: a) when airplane mode is set and user open the FM, it starts playing does your patch fix this?
Comment 5•11 years ago
|
||
(In reply to Pin Zhang [:pzhang] from comment #4) > Hi Arthur, about the symptom listed in the description: > a) when airplane mode is set and user open the FM, it starts playing > > does your patch fix this? And I am thinking that should we handle this in Gecko layer instead of Gaia app?
Assignee | ||
Comment 6•11 years ago
|
||
Yes my patch disabled the button when the airplane mode is turned on, so that users cannot open FM. It would be great if gecko handles this, but I think we still need some UI changes here.
Comment 7•11 years ago
|
||
(In reply to Arthur Chen [:arthurcc] from comment #6) > Yes my patch disabled the button when the airplane mode is turned on, so > that users cannot open FM. It would be great if gecko handles this, but I > think we still need some UI changes here. But the app enables the FMRadio in the `load` event handler without checking if the setting 'ril.radio.disabled' is false, it only observes the setting: SettingsListener.observe('ril.radio.disabled', false, function(value) { which means the handler only reacts when the setting is changed.
Comment 8•11 years ago
|
||
I am working on Bug 870676, and I will handle this in new patch.
Assignee | ||
Comment 9•11 years ago
|
||
Is there any ETA for bug 870676? This bug is expected to be fixed in the mini work week. And you are right, we need to maintain the current status of `ril.radio.disabled` for checking. I'll update the patch.
Comment 10•11 years ago
|
||
(In reply to Arthur Chen [:arthurcc] from comment #9) > Is there any ETA for bug 870676? Not yet, it's only marked as [MemShrink:P3].
Assignee | ||
Comment 11•11 years ago
|
||
I updated the patch. Added a variable for tracking the status of `ril.radio.disabled`. The data attribute was also renamed.
Comment 12•11 years ago
|
||
(In reply to Arthur Chen [:arthurcc] from comment #11) > I updated the patch. Added a variable for tracking the status of > `ril.radio.disabled`. The data attribute was also renamed. I am afraid it still doesn't cover the case mentioned in comment 4, let's consider: 1) Open Settings APP, and Enable airplane mode 2) Go back to homescreen, and open the FM APP the FM app will call `enableFMRadio()` in `window.onload` handler, but the initial value of `rilDisabled` is false, so the FM Radio will still be turned on. So I think we should read the setting value to initialize `rilDisabled`, and then decide whether call MRadio.enable() or not. BTW, there are several TAB characters in the index.html, could you help to replace them with spaces? Thanks.
Assignee | ||
Comment 13•11 years ago
|
||
Pin, thank you for reviewing. I've updated the patch addressing your comments. If the implementation is okay for you, I'll add corresponding test cases for it.
Comment 14•11 years ago
|
||
(In reply to Arthur Chen [:arthurcc] from comment #13) > Pin, thank you for reviewing. I've updated the patch addressing your > comments. If the implementation is okay for you, I'll add corresponding test > cases for it. Arthur, we already have function `updatePowerUi` to do the styling stuff for `#power-switch`, so I think we can merge the function `updateRadioUI` into it. The other parts look good to me
Assignee | ||
Comment 15•11 years ago
|
||
Pin, I've addressed your comment and added the test cases. Would you mind take a look again? Thanks!
Updated•11 years ago
|
Target Milestone: --- → 1.1 QE2 (6jun)
Comment 16•11 years ago
|
||
(In reply to Arthur Chen [:arthurcc] from comment #15) > Pin, I've addressed your comment and added the test cases. Would you mind > take a look again? Thanks! Hi Arthur, please check my comments on the pr, thanks
Assignee | ||
Comment 17•11 years ago
|
||
Casey, we are trying to disable the airplane mode related UIs when the airplane mode is turned on. Could you help check the screenshot to see if the style is okay?
Flags: needinfo?(kyee)
Comment 18•11 years ago
|
||
Arthur, if you don't get UX feedback today lets land this and we can do a separate follow-up if the feedback comes back different.
Comment 19•11 years ago
|
||
Hi guys, a better UX solution would be to generate an error prompt when the user opens the app while Airplane Mode is On. This prompt should be similar to the "Must plug in your headphones" prompt that appears when the user opens the app without first plugging in headphones. The string should read something like: Title: Airplane mode is on. Body: Turn off Airplane mode to use FM Radio. Button: Cancel (closes app and returns user to Home app) Is there time to land the strings required for this change?
Comment 20•11 years ago
|
||
The reason this approach is better, btw, is it explains to the user the cause of the error state, and how to resolve it.
Comment 21•11 years ago
|
||
Arthur, you said on PR: Before applying this patch, FM Radio is disabled from gecko when ril.radio.disabled is set to true. But I didn't find the related codes to do this, would you mind providing more infos?
Assignee | ||
Comment 22•11 years ago
|
||
I'm not sure where the code is. The statement was made by the observation: FM radio is stopped immediately when the airplane mode is turned on.
Assignee | ||
Comment 23•11 years ago
|
||
Thanks Josh. Wayne, are we able to add new strings now?
Flags: needinfo?(wchang)
Comment 24•11 years ago
|
||
Thanks, Josh. Also flagging stas for localization.
Flags: needinfo?(stas)
Whiteboard: MiniWW → MiniWW, late-l10n
Comment 25•11 years ago
|
||
We haven't gotten input on a string freeze for 1.1 yet.
Flags: needinfo?(stas)
Comment 26•11 years ago
|
||
(In reply to Arthur Chen [:arthurcc] from comment #22) > I'm not sure where the code is. The statement was made by the observation: > FM radio is stopped immediately when the airplane mode is turned on. Aha, I found the codes in $GAIA/apps/system/js/airplane_mode.js line 115: // Turn off FM Radio. if (fmRadio && fmRadio.enabled) { fmRadio.disable(); }
Comment 27•11 years ago
|
||
Removing the flag for Casey since Josh addressed this. Thanks Josh!
Flags: needinfo?(kyee)
Comment 28•11 years ago
|
||
I don't want to block on UX here. Let's land the patch from comment 17, fulfilling our commitments to requirements, and we can add this prompt separately.
Comment 29•11 years ago
|
||
I've created a separate bug for implementing the Airplane Mode, here: "Add prompt for airplane mode" https://bugzilla.mozilla.org/show_bug.cgi?id=878135
Comment 30•11 years ago
|
||
I've created a separate bug for implementing the Airplane Mode prompt, here: "Add prompt for airplane mode" https://bugzilla.mozilla.org/show_bug.cgi?id=878135
Assignee | ||
Comment 31•11 years ago
|
||
Josh, actually I've added the prompt UI. Could you help confirm it?
Attachment #755737 -
Attachment is obsolete: true
Comment 32•11 years ago
|
||
How do we treat similar strings? Are the words "turn off" always together? If so, let's stay consistent (i.e. the way it is in comment 31). Otherwise, I'd do this: Turn Airplane Mode off to use FM Radio.
Assignee | ||
Comment 33•11 years ago
|
||
Pin, I implemented Josh's proposal. Would you mind take it a look? Thanks!
Comment 35•11 years ago
|
||
(In reply to Arthur Chen [:arthurcc] from comment #31) > Created attachment 756720 [details] > screenshot of the prompt > > Josh, actually I've added the prompt UI. Could you help confirm it? The prompt looks good, but those strings need localization. We can only implement this if the L10N team confirms they can support the translation work in time. Axel, per comment #25, what's the way forward here?
Flags: needinfo?(l10n)
Comment 36•11 years ago
|
||
Please land this first and have l10n tracked after.
Assignee | ||
Comment 37•11 years ago
|
||
Josh, we found a problem which is when users try to close the app using the close button in the airplane mode warning page, there is a white screen flashing. So I remove the button here to avoid the problem, which also makes it consistent to the antenna unavailable warning page. We can use the follow up bug to track this issue.
Comment 38•11 years ago
|
||
Comment on attachment 755068 [details] Link to https://github.com/mozilla-b2g/gaia/pull/10051 r=gal Andreas has reviewed this during the workweek.
Attachment #755068 -
Flags: review?(pzhang) → review+
Assignee | ||
Comment 39•11 years ago
|
||
master: https://github.com/mozilla-b2g/gaia/commit/dcb5425f6cea6792ba7cfe3843807aed1a9f7114 v1-train: https://github.com/mozilla-b2g/gaia/commit/51600a6ab2e05ab4c7652c0502f5f219285bdd3c
Comment 40•11 years ago
|
||
Josh, we ended up not having a close button. The dialog auto-hides when the user switches airplane mode off. This is consistent with the way the headphone jack detection works. There is a race condition when we trigger closing the app via the close button, which is why we punted on that for now.
Comment 41•11 years ago
|
||
We've not been included in schedule discussions so far.
Flags: needinfo?(l10n)
Comment 42•11 years ago
|
||
(In reply to Andreas Gal :gal from comment #40) > Josh, we ended up not having a close button. The dialog auto-hides when the > user switches airplane mode off. This is consistent with the way the > headphone jack detection works. > > There is a race condition when we trigger closing the app via the close > button, which is why we punted on that for now. Makes perfect sense. Sounds good.
Flags: needinfo?(jcarpenter)
Updated•11 years ago
|
Flags: in-moztrap?
Comment 43•11 years ago
|
||
Adding a new test case. - https://moztrap.mozilla.org/manage/case/8464/
Updated•11 years ago
|
Flags: in-moztrap? → in-moztrap-
Updated•11 years ago
|
Flags: in-moztrap- → in-moztrap+
Comment 44•11 years ago
|
||
Unagi Gaia: 55ed5e08a2250ea2d3571fff860c39e66fabed14 Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/6062fdf2deb8 BuildID 20130715070218 Version 18.0 Verified.
You need to log in
before you can comment on or make changes to this bug.
Description
•