Merge "Make IdentityCredentialStore.getInstance() return null if credstore is not installed." am: a970f218ea am: e5506eb032
Change-Id: Ie22caa7c82eeeb364a6b43b38dd87431d1312114
This commit is contained in:
@@ -38,6 +38,10 @@ class CredstoreIdentityCredentialStore extends IdentityCredentialStore {
|
|||||||
ICredentialStoreFactory storeFactory =
|
ICredentialStoreFactory storeFactory =
|
||||||
ICredentialStoreFactory.Stub.asInterface(
|
ICredentialStoreFactory.Stub.asInterface(
|
||||||
ServiceManager.getService("android.security.identity"));
|
ServiceManager.getService("android.security.identity"));
|
||||||
|
if (storeFactory == null) {
|
||||||
|
// This can happen if credstore is not running or not installed.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
ICredentialStore credStore = null;
|
ICredentialStore credStore = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user