Do null check to account for the case where provider is only autofill
provider. Test: local build Bug: 281047738 Change-Id: I9f3dca118a0d4182e2d727fa011dcb48db2a553f
This commit is contained in:
committed by
Guangjie (Jerry) Shi
parent
804214c160
commit
8d167d55f3
@@ -51,7 +51,11 @@ public final class CombinedProviderInfo {
|
||||
@Nullable AutofillServiceInfo asi,
|
||||
boolean isDefaultAutofillProvider,
|
||||
boolean IsPrimaryCredmanProvider) {
|
||||
mCredentialProviderInfos = new ArrayList<>(cpis);
|
||||
if (cpis == null) {
|
||||
mCredentialProviderInfos = new ArrayList<>();
|
||||
} else {
|
||||
mCredentialProviderInfos = new ArrayList<>(cpis);
|
||||
}
|
||||
mAutofillServiceInfo = asi;
|
||||
mIsDefaultAutofillProvider = isDefaultAutofillProvider;
|
||||
mIsPrimaryCredmanProvider = IsPrimaryCredmanProvider;
|
||||
@@ -257,7 +261,7 @@ public final class CombinedProviderInfo {
|
||||
|
||||
// Check if we have any enabled cred man services.
|
||||
boolean isPrimaryCredmanProvider = false;
|
||||
if (!cpi.isEmpty()) {
|
||||
if (cpi != null && !cpi.isEmpty()) {
|
||||
isPrimaryCredmanProvider = cpi.get(0).isPrimary();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user