Bug 894741 - [Buri][WIFI]State has no change when connect AP by WPS. r=mrbkap, a=leo+
authorVincent Chang <vchang@mozilla.com>
Mon, 22 Jul 2013 17:11:57 +0800
changeset 119816 c4c6d2fe8d52bf8dee3d79c5487f3fe1c837306e
parent 119815 8135299f3efd733604082954cc7191b11243639e
child 119817 150c3f4ad24b3690cbc76ae462b4ac02d137368b
push id1008
push userryanvm@gmail.com
push dateMon, 29 Jul 2013 14:19:49 +0000
reviewersmrbkap, leo
bugs894741
milestone18.1
Bug 894741 - [Buri][WIFI]State has no change when connect AP by WPS. r=mrbkap, a=leo+
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -2970,16 +2970,17 @@ WifiWorker.prototype = {
     }
   },
 
   notifyTetheringOff: function notifyTetheringOff() {
     // It's really sad that we don't have an API to notify the wifi
     // hotspot status. Toggle settings to let gaia know that wifi hotspot
     // is disabled.
     this.tetheringSettings[SETTINGS_WIFI_TETHERING_ENABLED] = false;
+    this._oldWifiTetheringEnabledState = false;
     gSettingsService.createLock().set(
       SETTINGS_WIFI_TETHERING_ENABLED, false, null, "fromInternalSetting");
     // Check for the next request.
     this.nextRequest();
   },
 
   handleWifiEnabled: function(enabled) {
     if (WifiManager.enabled === enabled) {
@@ -3072,16 +3073,17 @@ WifiWorker.prototype = {
         }
 
         if (this._oldWifiTetheringEnabledState === null &&
             !this.tetheringSettings[SETTINGS_WIFI_TETHERING_ENABLED]) {
           debug("Do nothing when initial settings for SETTINGS_WIFI_TETHERING_ENABLED flag is false.");
           break;
         }
 
+        this._oldWifiTetheringEnabledState = this.tetheringSettings[SETTINGS_WIFI_TETHERING_ENABLED];
         this.handleWifiTetheringEnabled(aResult)
         break;
     };
   },
 
   handleError: function handleError(aErrorMessage) {
     debug("There was an error while reading Tethering settings.");
     this.tetheringSettings = {};