Fixes to lock task API from API review
Adding ComponentNames and some splitting/renaming of broadcasts.
Bug: 17005622
Change-Id: I9ece3553310fb20b0c3c3e4032b408e86384363a
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index ca6b1e8..4bf0354 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -2906,15 +2906,17 @@
*
* This function can only be called by the device owner.
* @param packages The list of packages allowed to enter lock task mode
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
*
* @see Activity#startLockTask()
* @see DeviceAdminReceiver#onLockTaskModeChanged(Context, Intent, boolean, String)
* @see UserManager#DISALLOW_CREATE_WINDOWS
*/
- public void setLockTaskPackages(String[] packages) throws SecurityException {
+ public void setLockTaskPackages(ComponentName admin, String[] packages)
+ throws SecurityException {
if (mService != null) {
try {
- mService.setLockTaskPackages(packages);
+ mService.setLockTaskPackages(admin, packages);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
@@ -2923,12 +2925,14 @@
/**
* This function returns the list of packages allowed to start the lock task mode.
+ *
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @hide
*/
- public String[] getLockTaskPackages() {
+ public String[] getLockTaskPackages(ComponentName admin) {
if (mService != null) {
try {
- return mService.getLockTaskPackages();
+ return mService.getLockTaskPackages(admin);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}