diff options
author | Adrian Roos <roosa@google.com> | 2014-08-07 15:55:18 +0200 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2014-08-07 15:55:21 +0200 |
commit | b8b4774e6185058b179a31f8c1a2dd806413e31b (patch) | |
tree | feee3ddf905ce2c40e81b25dea8cc23a70a1c415 | |
parent | 3c9a3501651aa8ad4f289e89119a6c0b4bdaf78a (diff) | |
download | frameworks_base-b8b4774e6185058b179a31f8c1a2dd806413e31b.zip frameworks_base-b8b4774e6185058b179a31f8c1a2dd806413e31b.tar.gz frameworks_base-b8b4774e6185058b179a31f8c1a2dd806413e31b.tar.bz2 |
Fix NPE in DevicePolicyManagerService that crashed SystemUI
Bug: 16857795
Change-Id: I6234f03c4ee31311af9f9c556b790594ee1a8b2f
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 8e59844..fc96991 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -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 |