Merge "Fix the system crash issue when secondary user clicks any 802.1x AP on Wifi Picker." into pi-dev am: de08983dd2

am: 02d22b46ac

Change-Id: I3c6a95aa878022589c395db16806f43ad4795d52
This commit is contained in:
Ecco Park
2018-03-14 07:09:08 +00:00
committed by android-build-merger
2 changed files with 34 additions and 2 deletions

View File

@@ -1216,6 +1216,11 @@ public class WifiConfigController implements TextWatcher,
}
}
@VisibleForTesting
KeyStore getKeyStore() {
return KeyStore.getInstance();
}
private void loadCertificates(
Spinner spinner,
String prefix,
@@ -1232,8 +1237,12 @@ public class WifiConfigController implements TextWatcher,
if (showUsePreinstalledCertOption) {
certs.add(mUseSystemCertsString);
}
certs.addAll(
Arrays.asList(KeyStore.getInstance().list(prefix, android.os.Process.WIFI_UID)));
try {
certs.addAll(
Arrays.asList(getKeyStore().list(prefix, android.os.Process.WIFI_UID)));
} catch (Exception e) {
Log.e(TAG, "can't get the certificate list from KeyStore");
}
certs.add(noCertificateString);
final ArrayAdapter<String> adapter = new ArrayAdapter<String>(