Commits

Anonymous committed 67995f9 Merge

Merge "Fix for F/C in WifiConfigInfo"

Comments (0)

Files changed (1)

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

  */
 public class WifiConfigInfo extends Activity {
 
-    private static final String TAG = "WifiConfigInfo";
-
     private TextView mConfigList;
     private WifiManager mWifiManager;
 
-    //============================
-    // Activity lifecycle
-    //============================
-
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
     @Override
     protected void onResume() {
         super.onResume();
-        final List<WifiConfiguration> wifiConfigs = mWifiManager.getConfiguredNetworks();
-        StringBuffer configList  = new StringBuffer();
-        for (int i = wifiConfigs.size() - 1; i >= 0; i--) {
-            configList.append(wifiConfigs.get(i));
+        if (mWifiManager.isWifiEnabled()) {
+            final List<WifiConfiguration> wifiConfigs = mWifiManager.getConfiguredNetworks();
+            StringBuffer configList  = new StringBuffer();
+            for (int i = wifiConfigs.size() - 1; i >= 0; i--) {
+                configList.append(wifiConfigs.get(i));
+            }
+            mConfigList.setText(configList);
+        } else {
+            mConfigList.setText(R.string.wifi_state_disabled);
         }
-        mConfigList.setText(configList);
     }
 
 }