summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:43:51 (GMT)
committerAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2019-04-10 12:43:51 (GMT)
commit9c0bc5405e17f7c096e870836bd81203da4959b1 (patch)
treea15894c4f42b90f10b52c17194b22a829ff2845c
parent70b534799b870e31de369014338d3b5dac92b5f5 (diff)
parent39f543269782c64b86143a5dc1343a869cadf3bf (diff)
downloadframeworks_base-9c0bc5405e17f7c096e870836bd81203da4959b1.zip
frameworks_base-9c0bc5405e17f7c096e870836bd81203da4959b1.tar.gz
frameworks_base-9c0bc5405e17f7c096e870836bd81203da4959b1.tar.bz2
[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697
Change-Id: I064e17eb9e4a91cbf8cda5fe6ee37da48724634d
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java3
1 files changed, 3 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 5beb239..4df1a14 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3076,6 +3076,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@Override
public boolean isSeparateProfileChallengeAllowed(int userHandle) {
+ if (!isCallerWithSystemUid()) {
+ throw new SecurityException("Caller must be system");
+ }
ComponentName profileOwner = getProfileOwner(userHandle);
// Profile challenge is supported on N or newer release.
return profileOwner != null &&