Merge "Do a null check before returning the primary providers" into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-04 21:08:43 +00:00
committed by Android (Google) Code Review

View File

@@ -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));
}