Support wifi enable API

RESOLVED FIXED in 2.1 S2 (15aug)

Status

RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: vchang, Assigned: chucklee)

Tracking

unspecified
2.1 S2 (15aug)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(tracking-b2g:backlog)

Details

(Whiteboard: [p=2])

Attachments

(2 attachments, 8 obsolete attachments)

1.25 KB, patch
Details | Diff | Splinter Review
11.31 KB, patch
Details | Diff | Splinter Review
Currently, we use onenabled/ondisalbed DOMEventListener to notify gaia the wifi enable/disable status after issuing settings API to set "wifi.enabled". Instead of that, we would like to propose the setWifiEnable DOM API. It looks more straightforward when trying to turn on/off wifi in gaia. Moreover, we could move the control logic for wifi and wifi hotspot to gaia app. 

interface nsIDOMWifiManager : nsISupports
{
  nsIDOMDOMRequest setWifiEnable(bool enabled);
}
(Reporter)

Updated

5 years ago
Blocks: 917097
Assignee: nobody → chulee

Updated

5 years ago
Depends on: 936367
Created attachment 829197 [details] [diff] [review]
WIP - 0001. IDL Change.

Add |mozWifiManager.setWifiEnable()| for turning wifi on/off.
Attachment #829197 - Flags: feedback?(vchang)
Created attachment 829198 [details] [diff] [review]
WIP - 0002. API Implementation.
Attachment #829198 - Flags: feedback?(vchang)
(Reporter)

Comment 3

5 years ago
Comment on attachment 829198 [details] [diff] [review]
WIP - 0002. API Implementation.

Review of attachment 829198 [details] [diff] [review]:
-----------------------------------------------------------------

0. Dimi is going to move nsIWifi.idl to webidl. Maybe we should write this to webidl, too ? 
1. Who should handle initial wifi start, gaia or gecko ? 
2. Looks like we don't need handleWifiEnabled() function anymore. Maybe you would like to remove it ?
Attachment #829198 - Flags: feedback?(vchang) → feedback+
(Reporter)

Updated

5 years ago
Attachment #829197 - Flags: feedback?(vchang) → feedback+
(In reply to Vincent Chang[:vchang] from comment #3)
> Comment on attachment 829198 [details] [diff] [review]
> WIP - 0002. API Implementation.
> 
> Review of attachment 829198 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> 0. Dimi is going to move nsIWifi.idl to webidl. Maybe we should write this
> to webidl, too ? 

If so, I think we might have to freeze API/interface change for Dimi to work on the transformation.
Just set it to block until it's become webidl.

> 1. Who should handle initial wifi start, gaia or gecko ? 
> 2. Looks like we don't need handleWifiEnabled() function anymore. Maybe you
> would like to remove it ?

As an API, the initialization is better handled by gaia. But in case gaia doesn't have such capability, handleWifiEnabled is preserved for now in case we need to handle wifi initialization in gecko.
Depends on: 886110
Created attachment 8356485 [details] [diff] [review]
0001. IDL Change.

Change API name.
Attachment #829197 - Attachment is obsolete: true
Attachment #8356485 - Flags: review?(vchang)
Created attachment 8356486 [details] [diff] [review]
0002. API Implementation.

1. Change API naming.
2. Use queue on wifi enable/disable command.
Attachment #829198 - Attachment is obsolete: true
Attachment #8356486 - Flags: review?(vchang)
(Reporter)

Updated

5 years ago
Blocks: 947174
(Reporter)

Comment 7

5 years ago
Comment on attachment 8356485 [details] [diff] [review]
0001. IDL Change.

Review of attachment 8356485 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for your patch. But as you may know that we are going to replace the idl to webidl for exposed DOM content. So please based on bug 886110 to develop this.
Attachment #8356485 - Flags: review?(vchang)
(Reporter)

Updated

5 years ago
Attachment #8356486 - Flags: review?(vchang) → feedback+

Updated

5 years ago
blocking-b2g: --- → backlog
Created attachment 8459528 [details] [diff] [review]
WIP - 0001. WebIDL Change - Add API to set wifi enable.
Attachment #8356485 - Attachment is obsolete: true
Created attachment 8459534 [details] [diff] [review]
WIP - 0002. Implement wifi enable API.
Attachment #8356486 - Attachment is obsolete: true
Created attachment 8466045 [details] [diff] [review]
0001. WebIDL Change - Add API to set wifi enable.
Attachment #8459528 - Attachment is obsolete: true
Attachment #8466045 - Flags: review?(mrbkap)
Created attachment 8466046 [details] [diff] [review]
0002. Implement wifi enable API.
Attachment #8459534 - Attachment is obsolete: true
Attachment #8466046 - Flags: review?(vchang)
Attachment #8466045 - Flags: review?(mrbkap) → review+
(Reporter)

Comment 12

4 years ago
Comment on attachment 8466046 [details] [diff] [review]
0002. Implement wifi enable API.

Review of attachment 8466046 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thank you.
Attachment #8466046 - Flags: review?(vchang) → review+
Whiteboard: [p=2]
Target Milestone: --- → 2.1 S2 (15aug)
Created attachment 8469146 [details] [diff] [review]
0001. WebIDL Change - Add API to set wifi enable. r=mrbkap

Add reviewer's name.
Attachment #8466045 - Attachment is obsolete: true
Created attachment 8469148 [details] [diff] [review]
0002. Implement wifi enable API. r=vchang

Add reviewer's name and TODOs.
Attachment #8466046 - Attachment is obsolete: true
Try looks good.
Keywords: checkin-needed

Updated

4 years ago
Blocks: 1051660
Test case will be tracked by Bug 1051660
blocking-b2g: backlog → ---
tracking-b2g: --- → backlog
You need to log in before you can comment on or make changes to this bug.