OSDN Git Service

am 7fc505a1: am 27d74fa2: Merge "[WifiSetup] Update connection state for auto-finish...
authorMaurice Lam <yukl@google.com>
Tue, 16 Sep 2014 18:57:34 +0000 (18:57 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Tue, 16 Sep 2014 18:57:34 +0000 (18:57 +0000)
* commit '7fc505a1ca9ba65b95189187bc3bde78258be547':
  [WifiSetup] Update connection state for auto-finish

src/com/android/settings/wifi/WifiSetupActivity.java

index 5452a03..a87c733 100644 (file)
@@ -87,9 +87,10 @@ public class WifiSetupActivity extends WifiPickerActivity
     private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
-            NetworkInfo info = (NetworkInfo) intent.getParcelableExtra(
-                    WifiManager.EXTRA_NETWORK_INFO);
-            refreshConnectionState(info.isConnected());
+            // Refresh the connection state with the latest connection info. Use the connection info
+            // from ConnectivityManager instead of the one attached in the intent to make sure
+            // we have the most up-to-date connection state. b/17511772
+            refreshConnectionState();
         }
     };