diff options
author | Jason Monk <jmonk@google.com> | 2014-06-24 22:55:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-06-24 07:59:24 +0000 |
commit | 7218e9c6beaa066237c6b2aac6d10dd7dc84e0a2 (patch) | |
tree | 22e8a6df8eb1743e07f5a5fa2a61310258ee0b91 | |
parent | 04d480e1c338a921a8659e165d74f8437785acc1 (diff) | |
parent | c5185f2bf1bf15ea0cfd72d30167fcbb1d61d437 (diff) | |
download | frameworks_base-7218e9c6beaa066237c6b2aac6d10dd7dc84e0a2.zip frameworks_base-7218e9c6beaa066237c6b2aac6d10dd7dc84e0a2.tar.gz frameworks_base-7218e9c6beaa066237c6b2aac6d10dd7dc84e0a2.tar.bz2 |
Merge "The profile owner shouldn't control lock task"
-rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 2 | ||||
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index df6be8b..4351f9d 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -2349,7 +2349,7 @@ public class DevicePolicyManager { * <p>Any packages that shares uid with an allowed package will also be allowed * to activate lock task. * - * This function can only be called by the device owner or the profile owner. + * This function can only be called by the device owner. * @param packages The list of packages allowed to enter lock task mode * * @see Activity#startLockTask() diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 2801f4f..9c38bbc 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -3732,7 +3732,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { /** * Sets which packages may enter lock task mode. * - * This function can only be called by the device owner or the profile owner. + * This function can only be called by the device owner. * @param components The list of components allowed to enter lock task mode. */ public void setLockTaskPackages(String[] packages) throws SecurityException { @@ -3741,15 +3741,13 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { String[] packageNames = mContext.getPackageManager().getPackagesForUid(uid); synchronized (this) { - // Check whether any of the package name is the device owner or the profile owner. + // Check whether any of the package name is the device owner. for (int i=0; i<packageNames.length; i++) { String packageName = packageNames[i]; int userHandle = UserHandle.getUserId(uid); - String profileOwnerPackage = getProfileOwner(userHandle); - if (isDeviceOwner(packageName) || - (profileOwnerPackage != null && profileOwnerPackage.equals(packageName))) { + if (isDeviceOwner(packageName)) { - // If a package name is the device owner or the profile owner, + // If a package name is the device owner, // we update the component list. DevicePolicyData policy = getUserData(userHandle); policy.mLockTaskPackages.clear(); |