Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcd60864 authored by Jerry Shi's avatar Jerry Shi Committed by Guangjie (Jerry) Shi
Browse files

Do a null check before returning the primary providers

Test: local build
Bug: 280492574

Change-Id: I0182c2060fbe5c74027785d539671f9eaaaf2a25
parent 93c08296
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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));
    }