summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/settings/wifi/AccessPointDialog.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/settings/wifi/AccessPointDialog.java b/src/com/android/settings/wifi/AccessPointDialog.java
index 69fad0fa4..bf9a47145 100644
--- a/src/com/android/settings/wifi/AccessPointDialog.java
+++ b/src/com/android/settings/wifi/AccessPointDialog.java
@@ -632,8 +632,14 @@ public class AccessPointDialog extends AlertDialog implements DialogInterface.On
updateEnterpriseFields();
}
- /* AP state on the current scan list needs update to enable "Forget" capability */
- mWifiLayer.getWifiLayerApInstance(mState).setConfigured(true);
+ /**
+ * AP state on the current scan list needs update to enable "Forget" capability.
+ * This is not required for newly added APs.
+ */
+ AccessPointState ap = mWifiLayer.getWifiLayerApInstance(mState);
+ if(ap != null) {
+ ap.setConfigured(true);
+ }
if (!mWifiLayer.saveNetwork(mState)) {
return;