Merge "Make IdentityCredentialStore.getInstance() return null if credstore is not installed."

This commit is contained in:
Treehugger Robot
2020-02-05 16:35:48 +00:00
committed by Gerrit Code Review

View File

@@ -38,6 +38,10 @@ class CredstoreIdentityCredentialStore extends IdentityCredentialStore {
ICredentialStoreFactory storeFactory =
ICredentialStoreFactory.Stub.asInterface(
ServiceManager.getService("android.security.identity"));
if (storeFactory == null) {
// This can happen if credstore is not running or not installed.
return null;
}
ICredentialStore credStore = null;
try {