Closed Bug 917097 Opened 11 years ago Closed 10 years ago

[Wifi] Wifi is enabled in airplane mode.

Categories

(Firefox OS Graveyard :: Wifi, defect)

All
Gonk (Firefox OS)
defect
Not set
major

Tracking

(tracking-b2g:backlog)

RESOLVED DUPLICATE of bug 1105598
tracking-b2g backlog

People

(Reporter: chucklee, Assigned: chucklee)

References

Details

Attachments

(1 file)

Reported in Bug 855513 comment 19. STR: 1. Enable Wifi. 2. Enable Hotspot. 3. Enable Airplane Mode. Expect: Wifi and Hotspot both disabled. Actual: Wifi is enabled. Caused by the behavior introduced in bug 855513, which will try to enable wifi after hotspot is disabled in such STR.
The cause for this problem is the "wifi/hotspot mutex" mechanism introduced in bug 855513. After STR 2, if you disable Hotspot, Wifi will be enabled automatically. This is what gaia do in STR 3, so Wifi is enabled. Since gecko can't tell the situation requesting disable, I think it's better to fix this bug in Gaia. So my proposal is move the "wifi/hotspot mutex" mechanism from gecko to gaia, and let gaia manage the enable/disable/suspend status.
After discussion with Arthur, The plan now is move the mutex mechanism from gecko to Gaia. But for this bug, I prefer just remove the mechanism in WifiManager. A follow up bug will be issued to create the mechanism in Gaia, in following steps: 1. Add following APIs to WifiManager interface nsIDOMWifiManager : nsISupports { attribute nsIDOMEventListener onwifitetheringenabled; attribute nsIDOMEventListener onwifitetheringdisabled; } 2. Gaia implement mutex mechanism and listen to tethering enabled/disabled event to check if command succeed.
If all device APIs agree to use API to control enable/disable instead of settings, then we'll take following step: 1. Add support enable/disable control by both API and settings for backward compatibility. interface nsIDOMWifiManager : nsISupports { nsIDOMDOMRequest setWifiEnable(bool enabled); nsIDOMDOMRequest setWifiTetheringEnable(bool enabled); } 2. Gaia switch enable/disable control from settings to API. 3.(optional) WifiManager remove support for enable/disable control by settings.
Remove the auto enable/disable mechanism between wifi and hotspot, but preserve the request queue to make sure commands are executed as ordered.
Attachment #812500 - Flags: review?(vchang)
Gaia need to do some modification on the checkbox enable/disable control for this patch, refer to bug 922535.
> But for this bug, I prefer just remove the mechanism in WifiManager. > > A follow up bug will be issued to create the mechanism in Gaia, in following > steps: > 1. Add following APIs to WifiManager > interface nsIDOMWifiManager : nsISupports > { > attribute nsIDOMEventListener onwifitetheringenabled; > attribute nsIDOMEventListener onwifitetheringdisabled; > } I filed Bug 927298.
(In reply to Chuck Lee [:chucklee] from comment #3) > If all device APIs agree to use API to control enable/disable instead of > settings, then we'll take following step: > 1. Add support enable/disable control by both API and settings for backward > compatibility. > interface nsIDOMWifiManager : nsISupports > { > nsIDOMDOMRequest setWifiEnable(bool enabled); > nsIDOMDOMRequest setWifiTetheringEnable(bool enabled); > } I filed bug 930355 for this.
Depends on: 930355
Comment on attachment 812500 [details] [diff] [review] 0001. Remove auto enable and auto disable mechanism between wifi and hotspot. Review of attachment 812500 [details] [diff] [review]: ----------------------------------------------------------------- Give the r+ because the patch looks good for me. We still need others patch ready so please pause for a second until others patch are ready.
Attachment #812500 - Flags: review?(vchang) → review+
blocking-b2g: --- → backlog
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: