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

Commit 14fc1978 authored by Nicolas Prevot's avatar Nicolas Prevot
Browse files

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

BUG:31015735
Change-Id: I0857008576c11857f52cdc2233fd3e3566e62268
parent 575bb0fd
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) {