summaryrefslogtreecommitdiffstats
path: root/services/devicepolicy/java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2014-11-21 23:07:03 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-21 23:07:03 +0000
commit1f26bf6bfd683b840f688b41d285fd9c942e6ed5 (patch)
tree2eb189840ff6c00a3023bb225f813b887cd5d096 /services/devicepolicy/java
parent90102e10093f7bb658fb7dd6c30a1efd5380c6d1 (diff)
parent108bdbc934d1e5fb77406d0267ab67f8736dfc57 (diff)
downloadframeworks_base-1f26bf6bfd683b840f688b41d285fd9c942e6ed5.zip
frameworks_base-1f26bf6bfd683b840f688b41d285fd9c942e6ed5.tar.gz
frameworks_base-1f26bf6bfd683b840f688b41d285fd9c942e6ed5.tar.bz2
am 108bdbc9: am efb2df69: Merge "Different messages when wiping user and not device" into lmp-mr1-dev
* commit '108bdbc934d1e5fb77406d0267ab67f8736dfc57': 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.java13
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 b97f4f9..ac5fb18 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -2521,6 +2521,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
}
+ @Override
public int getMaximumFailedPasswordsForWipe(ComponentName who, int userHandle) {
if (!mHasFeature) {
return 0;
@@ -2533,6 +2534,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