Created
December 30, 2014 03:50
-
-
Save EragonJ/9eab4a1eb44f4c15e29b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js | |
index 730acd0..c14bf22 100644 | |
--- a/dom/wifi/WifiWorker.js | |
+++ b/dom/wifi/WifiWorker.js | |
@@ -3232,16 +3232,31 @@ WifiWorker.prototype = { | |
this.setWifiApEnabled(enabled, this.requestDone.bind(this)); | |
}.bind(this)); | |
- if (!enabled) { | |
- this.queueRequest({command: "setWifiEnabled", value: true}, function(data) { | |
- if (this.disconnectedByWifiTethering) { | |
- this.setWifiEnabled(true, this._setWifiEnabledCallback.bind(this)); | |
- } else { | |
- this.requestDone(); | |
+ let lock = gSettingsService.createLock(); | |
+ let self = this; | |
+ lock.get("ril.ignore.mutex", | |
+ { | |
+ handle: function handle(aName, aResult) { | |
+ debug("mxm_airplaneMode.enabled aResult : " + aResult); | |
+ if (aResult) { | |
+ // do something here and remember to set ril.ignore.mutex back to false | |
+ }; | |
+ }, | |
+ handleError: function handleError(aErrorMessage) { | |
+ debug("mxm_airplaneMode.enabled aaErrorMessage : " + aErrorMessage); | |
} | |
- this.disconnectedByWifiTethering = false; | |
- }.bind(this)); | |
- } | |
+ } | |
+ ); | |
}, | |
// nsIObserver implementation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment