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

Commit b8b4774e authored by Adrian Roos's avatar Adrian Roos
Browse files

Fix NPE in DevicePolicyManagerService that crashed SystemUI

Bug: 16857795
Change-Id: I6234f03c4ee31311af9f9c556b790594ee1a8b2f
parent 3c9a3501
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2850,7 +2850,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                if (mHasFeature) {
                    ActiveAdmin strictestAdmin =
                            getAdminWithMinimumFailedPasswordsForWipeLocked(userHandle);
                    int max = strictestAdmin.maximumFailedPasswordsForWipe;
                    int max = strictestAdmin != null
                            ? strictestAdmin.maximumFailedPasswordsForWipe : 0;
                    if (max > 0 && policy.mFailedPasswordAttempts >= max) {
                        // Wipe the user/profile associated with the policy that was violated. This
                        // is not necessarily calling user: if the policy that fired was from a