summaryrefslogtreecommitdiffstats
path: root/services/devicepolicy/java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2014-10-29 11:41:31 -0700
committerAmith Yamasani <yamasani@google.com>2014-11-21 13:57:48 -0800
commit3a3d212a51974ccec6100c1e117225291edc83cc (patch)
tree4fa99070c247606bb5ce38f815c4f1a71251640d /services/devicepolicy/java
parent5d3d53aa1361c094f05aa70129e49a04875ab5a6 (diff)
downloadframeworks_base-3a3d212a51974ccec6100c1e117225291edc83cc.zip
frameworks_base-3a3d212a51974ccec6100c1e117225291edc83cc.tar.gz
frameworks_base-3a3d212a51974ccec6100c1e117225291edc83cc.tar.bz2
Different messages when wiping user and not device
There are 3 types of users 1. Primary - device will be wiped 2. Managed profile - profile will be removed 3. Secondary user - user will be removed Show different messages for almost wipe and wipe in each of these 3 cases. Bug: 16843155 Change-Id: Icecfe520622773da9e45465bf2217e8ed38b266e
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