Merge "Do a null check on setting an AP as configured"

This commit is contained in:
Irfan Sheriff
2010-01-07 10:53:52 -08:00
committed by Android (Google) Code Review

View File

@@ -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;