summaryrefslogtreecommitdiffstats
path: root/services/devicepolicy/java
diff options
context:
space:
mode:
authorRobin Lee <rgl@google.com>2014-05-21 09:41:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-21 09:41:19 +0000
commitc8e4b8107a21c5a782f959aa77fbf066d6e131be (patch)
tree7a712818133c2cf000263f08c17638c09dea9605 /services/devicepolicy/java
parent3856204c0ef3bf35e3c991fb401f30e54aefb4f0 (diff)
parenta9ee6729538941a2b866d83ecbd891645f0ccc16 (diff)
downloadframeworks_base-c8e4b8107a21c5a782f959aa77fbf066d6e131be.zip
frameworks_base-c8e4b8107a21c5a782f959aa77fbf066d6e131be.tar.gz
frameworks_base-c8e4b8107a21c5a782f959aa77fbf066d6e131be.tar.bz2
Merge "DPM: Disallow some DeviceAdmin policies for ProfileOwners"
Diffstat (limited to 'services/devicepolicy/java')
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java6
1 files changed, 6 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 bc7742f..5d88a57 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -2411,6 +2411,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return;
}
enforceCrossUserPermission(userHandle);
+ if ((flags & DevicePolicyManager.WIPE_EXTERNAL_STORAGE) != 0) {
+ enforceNotManagedProfile(userHandle, "wipe external storage");
+ }
synchronized (this) {
// This API can only be called by an active device admin,
// so try to retrieve it to check that the caller is one.
@@ -2863,6 +2866,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return;
}
enforceCrossUserPermission(userHandle);
+ enforceNotManagedProfile(userHandle, "enable/disable cameras");
synchronized (this) {
if (who == null) {
throw new NullPointerException("ComponentName is null");
@@ -2912,6 +2916,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return;
}
enforceCrossUserPermission(userHandle);
+ enforceNotManagedProfile(userHandle, "disable keyguard features");
synchronized (this) {
if (who == null) {
throw new NullPointerException("ComponentName is null");
@@ -2935,6 +2940,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return 0;
}
enforceCrossUserPermission(userHandle);
+ enforceNotManagedProfile(userHandle, "list disabled keyguard features");
synchronized (this) {
if (who != null) {
ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle);