Closed Bug 859993 Opened 11 years ago Closed 11 years ago

[B2G][Settings][Wifi] Airplane mode button hangs and Wi-Fi is stopping to respond, after Wi-Fi is turned “ON” while the Airplane mode is “ON”

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:leo+, b2g18 fixed, b2g18-v1.0.1 unaffected)

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.1 --- unaffected

People

(Reporter: sarsenyev, Assigned: mshiao)

Details

Attachments

(2 files)

Attached file airplanemode.issue.log
Description:
When a user is turning the Wi-Fi on, the airplane button becomes unresponsive, if the Airplane mode is previously in “ON” state”.  After the Airplane button stops hanging, Wi-Fi doesn't respond when the airplane mode toggles between ON/OFF state.

Repro Steps:
1) Updated to Unagi Build ID: 20130405070205
2) Open "Settings" from the home screen
3) Turn "Airplane mode" ON
4) Tap on Wi-Fi settings
5) Disable the "Wi-Fi" 
6) Enable the Wi-Fi and connect to the network
7) Toggle the "Airplane mode" between On/Off

Actual:
The "airplane mode" button freezes.  After the Airplane button stops hanging, the Wi-Fi doesn't respond when the airplane mode toggles between ON/OFF state.

Expected:
When the "Airplane mode" is On, the Wi-Fi is automatically turned off.
When the "Airplane mode" is Off, the Wi-Fi is automatically turned on.

Environmental  Variables:
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/1d4c7fe3256e
Gaia: 2f64311e0f23b85c29b20be9502cbdeaee8342ae

Notes:
Repro frequency: 100%
blocking-b2g: leo? → leo+
Assignee: nobody → mshiao
I checked this issue on today's v 1.0.1 build and it did not reproduce. The airplane mode did not freeze. 
Unagi build: 20130415070202
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/2b44e2c40cc1
Gaia: c79e761bae4d92f329154c64159f4f5c8eb49c9e

I was able to reproduce it on today's v1 build tho. I will look for the regression window.
Regression Window results:

DOES NOT REPRO ON:
Unagi Build ID: 20130305070202
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/d9278721eea1
Gaia: 7636cc575be4a71fdd04879ccaf0109cf4f4a355

REPRODUCES ON: 
Unagi Build ID: 20130305230204
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/bccf111e9131
Gaia: abfede404bb3c717f33d9c609464f8cf52504edf
Hi Alive,

Can you please review my changes.

Thanks,
Mark
Attachment #741713 - Flags: review?(alive)
Attachment #741713 - Attachment is patch: false
(In reply to Mark Shiao from comment #3)
> Created attachment 741713 [details]
> Quick link to git pull request
> 
> Hi Alive,
> 
> Can you please review my changes.
> 
> Thanks,
> Mark

Could you explain to me why does this fix the problem?
Comment on attachment 741713 [details]
Quick link to git pull request

The code isn't bad but please explain your idea about why this fix works to me before I give r+.
Attachment #741713 - Flags: review?(alive)
(In reply to Alive Kuo [:alive] from comment #5)
> Comment on attachment 741713 [details]
> Quick link to git pull request
> 
> The code isn't bad but please explain your idea about why this fix works to
> me before I give r+.

After step 6 in the "Repro Steps" the wifi is enabled but mozSettings for wifi.suspended isn't updated to false and is out of sync. The next time suspend is called, wifi.suspended remains true (should be false) and the function returns without updating the settings.  Notify is never called and _ops is unable to resolve the additional count which prevents enableRadioSwitch from being called. I guess another approach would be to have wifi.js update the mozSettings for wifi.suspended.
(In reply to Mark Shiao from comment #6)
> (In reply to Alive Kuo [:alive] from comment #5)
I guess another approach would be to
> have wifi.js update the mozSettings for wifi.suspended.

Could we try to do this instead of current way? It makes sense much more.
(In reply to Alive Kuo [:alive] from comment #7)
> (In reply to Mark Shiao from comment #6)
> > (In reply to Alive Kuo [:alive] from comment #5)
> I guess another approach would be to
> > have wifi.js update the mozSettings for wifi.suspended.
> 
> Could we try to do this instead of current way? It makes sense much more.

Hi Alive,

I've changed wifi.js to updated wifi.suspended as suggested. 

Thanks,
Mark
Attachment #741713 - Attachment mime type: text/plain → text/html
Attachment #741713 - Flags: review?(alive)
Comment on attachment 741713 [details]
Quick link to git pull request

r=me. (Have you tested if reuse the req works?)
Attachment #741713 - Flags: review?(alive) → review+
(In reply to Alive Kuo [:alive] from comment #9)
> Comment on attachment 741713 [details]
> Quick link to git pull request
> 
> r=me. (Have you tested if reuse the req works?)

Yes I have tested and there are no issues
Committed to master 
b71f34bb66cdcf217077813ed9dcd4ba47d73187
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted b71f34bb66cdcf217077813ed9dcd4ba47d73187 to:
v1-train: 84ff41b960a2284b5099f0438c03161f295db340
Flags: in-moztrap?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: