Merge "Switch from KeyStore.saw to KeyStore.list." into mnc-dev
This commit is contained in:
@@ -318,7 +318,7 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
|
||||
private void loadCertificates(Spinner spinner, String prefix, int firstId, String selected) {
|
||||
Context context = getContext();
|
||||
String first = (firstId == 0) ? "" : context.getString(firstId);
|
||||
String[] certificates = mKeyStore.saw(prefix);
|
||||
String[] certificates = mKeyStore.list(prefix);
|
||||
|
||||
if (certificates == null || certificates.length == 0) {
|
||||
certificates = new String[] {first};
|
||||
|
@@ -395,7 +395,7 @@ public class VpnSettings extends SettingsPreferenceFragment implements
|
||||
}
|
||||
|
||||
// We are the only user of profiles in KeyStore so no locks are needed.
|
||||
for (String key : keyStore.saw(Credentials.VPN)) {
|
||||
for (String key : keyStore.list(Credentials.VPN)) {
|
||||
final VpnProfile profile = VpnProfile.decode(key, keyStore.get(Credentials.VPN + key));
|
||||
if (profile != null && !ArrayUtils.contains(excludeTypes, profile.type)) {
|
||||
result.add(profile);
|
||||
|
@@ -908,7 +908,7 @@ public class WifiConfigController implements TextWatcher,
|
||||
private void loadCertificates(Spinner spinner, String prefix) {
|
||||
final Context context = mConfigUi.getContext();
|
||||
|
||||
String[] certs = KeyStore.getInstance().saw(prefix, android.os.Process.WIFI_UID);
|
||||
String[] certs = KeyStore.getInstance().list(prefix, android.os.Process.WIFI_UID);
|
||||
if (certs == null || certs.length == 0) {
|
||||
certs = new String[] {unspecifiedCert};
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user