Do a null check before returning the primary providers
Test: local build Bug: 280492574 Change-Id: I0182c2060fbe5c74027785d539671f9eaaaf2a25
This commit is contained in:
committed by
Guangjie (Jerry) Shi
parent
93c08296fc
commit
bcd608643c
@@ -290,6 +290,9 @@ public final class CredentialManagerService
|
||||
mContext, Settings.Secure.CREDENTIAL_SERVICE_PRIMARY,
|
||||
/* isMultipleMode= */ true);
|
||||
String[] serviceNames = resolver.readServiceNameList(resolvedUserId);
|
||||
if (serviceNames == null) {
|
||||
return new HashSet<String>();
|
||||
}
|
||||
return new HashSet<String>(Arrays.asList(serviceNames));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user