mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 12:13:22 +00:00
Merge m-c to inbound. Again. For great justice.
This commit is contained in:
commit
b02595b1f5
@ -2025,23 +2025,10 @@ WifiWorker.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
let callback = (function (networks) {
|
||||
this.waitForScan((function (networks) {
|
||||
this._sendMessage(message, networks !== null, networks, msg);
|
||||
}).bind(this);
|
||||
this.waitForScan(callback);
|
||||
|
||||
WifiManager.scan(true, (function(ok) {
|
||||
// If the scan command succeeded, we're done.
|
||||
if (ok)
|
||||
return;
|
||||
|
||||
// Avoid sending multiple responses.
|
||||
this.wantScanResults.splice(this.wantScanResults.indexOf(callback), 1);
|
||||
|
||||
// Otherwise, let the client know that it failed, it's responsible for
|
||||
// trying again in a few seconds.
|
||||
this._sendMessage(message, false, "ScanFailed", msg);
|
||||
}).bind(this));
|
||||
WifiManager.scan(true, function() {});
|
||||
},
|
||||
|
||||
_notifyAfterStateChange: function(success, newState) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user