diff options
| author | 2020-02-05 16:47:14 +0000 | |
|---|---|---|
| committer | 2020-02-05 16:47:14 +0000 | |
| commit | e5506eb032b2004b3f4787eb765938c21e3549fd (patch) | |
| tree | 4f9803edd7944e2ee9025d81515e2fa04b937ef7 | |
| parent | 94754ea0e77decc3b95b6644b7a4030009e63957 (diff) | |
| parent | a970f218ea8014cb306c892cf55b311be16ee20d (diff) | |
Merge "Make IdentityCredentialStore.getInstance() return null if credstore is not installed." am: a970f218ea
Change-Id: If9079b606b579ec82b4803adf6abfdf205599eeb
| -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 { |