From b8297cfc76248f2863c985eb05d5a32fe3f6c279 Mon Sep 17 00:00:00 2001 From: Irfan Sheriff Date: Thu, 18 Nov 2010 12:47:29 -0800 Subject: Stop listening to supplicant state change events wifi connected status should be based only on network state change events or it can lead to a race condition. Change-Id: Ib2343f0d192ef99959f908a370d55aae7ba86a5a --- .../src/com/android/systemui/statusbar/policy/NetworkController.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index 4ff2429..cd2679a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -116,7 +116,6 @@ public class NetworkController extends BroadcastReceiver { IntentFilter filter = new IntentFilter(); filter.addAction(WifiManager.RSSI_CHANGED_ACTION); filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); - filter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION); filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED); context.registerReceiver(this, filter); @@ -141,7 +140,6 @@ public class NetworkController extends BroadcastReceiver { final String action = intent.getAction(); if (action.equals(WifiManager.RSSI_CHANGED_ACTION) || action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION) - || action.equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION) || action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { updateWifiState(intent); refreshViews(); @@ -489,8 +487,7 @@ public class NetworkController extends BroadcastReceiver { mWifiEnabled = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED; - } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION) - || action.equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION)) { + } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { final NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); boolean wasConnected = mWifiConnected; -- cgit v1.1