Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d252c4e authored by Nalla Kartheek's avatar Nalla Kartheek
Browse files

Wifi: Check mAccessPoint object when adding network for EAP types

AddNetwork dialog box require mAccessPoint object to know the EAP types.
But this object shall not exist when user add a network. Hence add NULL
check to prevent null pointer exception.

Change-Id: Icec03e4c49638a7f1b645671aa31a96481071686
CRs-Fixed: 1075923
parent 6aa77fb3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -979,7 +979,10 @@ public class WifiConfigController implements TextWatcher,
            case WIFI_EAP_METHOD_SIM:
            case WIFI_EAP_METHOD_AKA:
            case WIFI_EAP_METHOD_AKA_PRIME:
                WifiConfiguration config = mAccessPoint.getConfig();
                WifiConfiguration config = null;
                if (mAccessPoint != null) {
                    config = mAccessPoint.getConfig();
                }
                ArrayAdapter<String> eapSimAdapter = new ArrayAdapter<String>(
                         mContext, android.R.layout.simple_spinner_item,
                         mSimDisplayNames.toArray(new String[mSimDisplayNames.size()])