diff options
| author | Julia Reynolds <juliacr@google.com> | 2014-08-11 16:40:08 -0400 |
|---|---|---|
| committer | Julia Reynolds <juliacr@google.com> | 2014-08-15 16:16:38 -0400 |
| commit | 3d9eb78fe91ab2479eb38443aed588e10421e31b (patch) | |
| tree | 23bb5e71c3f0ce4235dfb8c4d6deab9b87b6b92f /core/java/android | |
| parent | 14a4e35208b7e97bbfa38f36130827c86bfafc2b (diff) | |
| download | frameworks_base-3d9eb78fe91ab2479eb38443aed588e10421e31b.zip frameworks_base-3d9eb78fe91ab2479eb38443aed588e10421e31b.tar.gz frameworks_base-3d9eb78fe91ab2479eb38443aed588e10421e31b.tar.bz2 | |
Apply lockdowns when user restrictions are set.
Previously DMAgent would apply these lockdowns before/
after setting the matching user restrictions.
Bug: 16701642
Bug: 16945830
Bug: 16944983
Change-Id: Ib4f7145055687f12408d6ccacd8e6380406a32b2
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/os/UserManager.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 3087506..dbfe184 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -499,7 +499,12 @@ public class UserManager { * Sets all the user-wide restrictions for this user. * Requires the MANAGE_USERS permission. * @param restrictions the Bundle containing all the restrictions. + * @deprecated use {@link android.app.admin.DevicePolicyManager#addUserRestriction( + * android.content.ComponentName, String)} or + * {@link android.app.admin.DevicePolicyManager#clearUserRestriction( + * android.content.ComponentName, String)} instead. */ + @Deprecated public void setUserRestrictions(Bundle restrictions) { setUserRestrictions(restrictions, Process.myUserHandle()); } @@ -509,7 +514,12 @@ public class UserManager { * Requires the MANAGE_USERS permission. * @param restrictions the Bundle containing all the restrictions. * @param userHandle the UserHandle of the user for whom to set the restrictions. + * @deprecated use {@link android.app.admin.DevicePolicyManager#addUserRestriction( + * android.content.ComponentName, String)} or + * {@link android.app.admin.DevicePolicyManager#clearUserRestriction( + * android.content.ComponentName, String)} instead. */ + @Deprecated public void setUserRestrictions(Bundle restrictions, UserHandle userHandle) { try { mService.setUserRestrictions(restrictions, userHandle.getIdentifier()); @@ -523,7 +533,12 @@ public class UserManager { * Requires the MANAGE_USERS permission. * @param key the key of the restriction * @param value the value for the restriction + * @deprecated use {@link android.app.admin.DevicePolicyManager#addUserRestriction( + * android.content.ComponentName, String)} or + * {@link android.app.admin.DevicePolicyManager#clearUserRestriction( + * android.content.ComponentName, String)} instead. */ + @Deprecated public void setUserRestriction(String key, boolean value) { Bundle bundle = getUserRestrictions(); bundle.putBoolean(key, value); @@ -537,7 +552,12 @@ public class UserManager { * @param key the key of the restriction * @param value the value for the restriction * @param userHandle the user whose restriction is to be changed. + * @deprecated use {@link android.app.admin.DevicePolicyManager#addUserRestriction( + * android.content.ComponentName, String)} or + * {@link android.app.admin.DevicePolicyManager#clearUserRestriction( + * android.content.ComponentName, String)} instead. */ + @Deprecated public void setUserRestriction(String key, boolean value, UserHandle userHandle) { Bundle bundle = getUserRestrictions(userHandle); bundle.putBoolean(key, value); |
