Do a null check on setting an AP as configured
This was introduced when trying to fix bug 2296038. A null check is required on AP. Bug: 2296038
This commit is contained in:
@@ -632,8 +632,14 @@ public class AccessPointDialog extends AlertDialog implements DialogInterface.On
|
|||||||
updateEnterpriseFields();
|
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)) {
|
if (!mWifiLayer.saveNetwork(mState)) {
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user