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

Commit a5d3e030 authored by Sean Wan's avatar Sean Wan Committed by Android (Google) Code Review
Browse files

Merge "Fixed a NullPointerException in AccountManagerService." into lmp-dev

parents 36da7fe1 4e68b657
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -3144,6 +3144,9 @@ public class AccountManagerService
        DevicePolicyManager dpm = (DevicePolicyManager) mContext
        DevicePolicyManager dpm = (DevicePolicyManager) mContext
                .getSystemService(Context.DEVICE_POLICY_SERVICE);
                .getSystemService(Context.DEVICE_POLICY_SERVICE);
        String[] typesArray = dpm.getAccountTypesWithManagementDisabledAsUser(userId);
        String[] typesArray = dpm.getAccountTypesWithManagementDisabledAsUser(userId);
        if (typesArray == null) {
            return true;
        }
        for (String forbiddenType : typesArray) {
        for (String forbiddenType : typesArray) {
            if (forbiddenType.equals(accountType)) {
            if (forbiddenType.equals(accountType)) {
                return false;
                return false;