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

Commit d85ae505 authored by Nicolas Prévot's avatar Nicolas Prévot Committed by Android (Google) Code Review
Browse files

Merge "In AccountManagerService, don't crash if there's no dpm."

parents bc3ee120 14fc1978
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3420,7 +3420,9 @@ public class AccountManagerService
        final DevicePolicyManagerInternal dpmi =
                LocalServices.getService(DevicePolicyManagerInternal.class);
        Intent intent = null;
        if (errorCode == AccountManager.ERROR_CODE_USER_RESTRICTED) {
        if (dpmi == null) {
            intent = getDefaultCantAddAccountIntent(errorCode);
        } else if (errorCode == AccountManager.ERROR_CODE_USER_RESTRICTED) {
            intent = dpmi.createUserRestrictionSupportIntent(userId,
                    UserManager.DISALLOW_MODIFY_ACCOUNTS);
        } else if (errorCode == AccountManager.ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE) {