diff options
author | Amith Yamasani <yamasani@google.com> | 2014-11-22 00:00:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-22 00:00:01 +0000 |
commit | 9d4e6a83553b2d8cc8c6d4fcce6c2af2bf52c874 (patch) | |
tree | 4b2dee156c39c976b3f4910037f7288f8a3c0142 /services/devicepolicy/java | |
parent | 6d118e0241cc60f010adee0b4ba94fc1894acff8 (diff) | |
parent | 1f26bf6bfd683b840f688b41d285fd9c942e6ed5 (diff) | |
download | frameworks_base-9d4e6a83553b2d8cc8c6d4fcce6c2af2bf52c874.zip frameworks_base-9d4e6a83553b2d8cc8c6d4fcce6c2af2bf52c874.tar.gz frameworks_base-9d4e6a83553b2d8cc8c6d4fcce6c2af2bf52c874.tar.bz2 |
am 1f26bf6b: am 108bdbc9: am efb2df69: Merge "Different messages when wiping user and not device" into lmp-mr1-dev
* commit '1f26bf6bfd683b840f688b41d285fd9c942e6ed5':
Different messages when wiping user and not device
Diffstat (limited to 'services/devicepolicy/java')
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 0cb3291..5e332bd 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -2522,6 +2522,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } } + @Override public int getMaximumFailedPasswordsForWipe(ComponentName who, int userHandle) { if (!mHasFeature) { return 0; @@ -2534,6 +2535,18 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } } + @Override + public int getProfileWithMinimumFailedPasswordsForWipe(int userHandle) { + if (!mHasFeature) { + return UserHandle.USER_NULL; + } + enforceCrossUserPermission(userHandle); + synchronized (this) { + ActiveAdmin admin = getAdminWithMinimumFailedPasswordsForWipeLocked(userHandle); + return admin != null ? admin.getUserHandle().getIdentifier() : UserHandle.USER_NULL; + } + } + /** * Returns the admin with the strictest policy on maximum failed passwords for this user and all * profiles that are visible from this user. If the policy for the primary and any other profile |