diff options
| author | 2020-02-05 17:00:51 +0000 | |
|---|---|---|
| committer | 2020-02-05 17:00:51 +0000 | |
| commit | ad21c990e43a49f28d0ff9396f1f93a140f2ce20 (patch) | |
| tree | c06dd43abcf775d70a44ffdb26d5ce59ea6a7dd2 | |
| parent | 069a85e86562a2b129e99551806e577817a33faf (diff) | |
| parent | e5506eb032b2004b3f4787eb765938c21e3549fd (diff) | |
Merge "Make IdentityCredentialStore.getInstance() return null if credstore is not installed." am: a970f218ea am: e5506eb032
Change-Id: Ie22caa7c82eeeb364a6b43b38dd87431d1312114
| -rw-r--r-- | identity/java/android/security/identity/CredstoreIdentityCredentialStore.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/identity/java/android/security/identity/CredstoreIdentityCredentialStore.java b/identity/java/android/security/identity/CredstoreIdentityCredentialStore.java index dcc6b95aec02..129063361b35 100644 --- a/identity/java/android/security/identity/CredstoreIdentityCredentialStore.java +++ b/identity/java/android/security/identity/CredstoreIdentityCredentialStore.java @@ -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 { |