Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 677d1884 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add updateLockTaskPackages API to ActivityTaskManager"

parents 67457fc6 e95e9173
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -197,6 +197,7 @@ package android.app {
    method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public void stopSystemLockTaskMode();
    method public static boolean supportsMultiWindow(android.content.Context);
    method public static boolean supportsSplitScreenMultiWindow(android.content.Context);
    method @RequiresPermission("android.permission.UPDATE_LOCK_TASK_PACKAGES") public void updateLockTaskPackages(@NonNull android.content.Context, @NonNull String[]);
    field public static final int DEFAULT_MINIMAL_SPLIT_SCREEN_DISPLAY_SIZE_DP = 440; // 0x1b8
    field public static final int INVALID_STACK_ID = -1; // 0xffffffff
  }
+10 −0
Original line number Diff line number Diff line
@@ -496,6 +496,16 @@ public class ActivityTaskManager {
        }
    }

    /** Update the list of packages allowed in lock task mode. */
    @RequiresPermission(android.Manifest.permission.UPDATE_LOCK_TASK_PACKAGES)
    public void updateLockTaskPackages(@NonNull Context context, @NonNull String[] packages) {
        try {
            getService().updateLockTaskPackages(context.getUserId(), packages);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Information you can retrieve about a root task in the system.
     * @hide
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ interface IActivityTaskManager {
    Rect getTaskBounds(int taskId);

    void cancelRecentsAnimation(boolean restoreHomeRootTaskPosition);
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.UPDATE_LOCK_TASK_PACKAGES)")
    void updateLockTaskPackages(int userId, in String[] packages);
    boolean isInLockTaskMode();
    int getLockTaskModeState();
+3 −0
Original line number Diff line number Diff line
@@ -705,6 +705,9 @@
    <!-- Permission required for CTS test - CtsKeystoreTestCases -->
    <uses-permission android:name="android.permission.REQUEST_UNIQUE_ID_ATTESTATION" />

    <!-- Permission required for CTS test - CtsWindowManagerDeviceTestCases-->
    <uses-permission android:name="android.permission.UPDATE_LOCK_TASK_PACKAGES" />

    <application android:label="@string/app_label"
                android:theme="@android:style/Theme.DeviceDefault.DayNight"
                android:defaultToDeviceProtectedStorage="true"