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

Commit 53c34da8 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Add shell command to reset the frozen task state" into main

parents 50bfc33f c9241ba8
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -9646,4 +9646,15 @@ public class WindowManagerService extends IWindowManager.Stub
            Binder.restoreCallingIdentity(origId);
        }
    }

    /**
     * Resets the spatial ordering of recents for testing purposes.
     */
    void resetFreezeRecentTaskListReordering() {
        if (!checkCallingPermission(MANAGE_ACTIVITY_TASKS,
                "resetFreezeRecentTaskListReordering()")) {
            throw new SecurityException("Requires MANAGE_ACTIVITY_TASKS permission");
        }
        mAtmService.getRecentTasks().resetFreezeTaskListReorderingOnTimeout();
    }
}
+9 −0
Original line number Diff line number Diff line
@@ -142,6 +142,8 @@ public class WindowManagerShellCommand extends ShellCommand {
                    return runReset(pw);
                case "disable-blur":
                    return runSetBlurDisabled(pw);
                case "reset-freeze-recent-tasks":
                    return runResetFreezeRecentTaskListReordering(pw);
                case "shell":
                    return runWmShellCommand(pw);
                default:
@@ -252,6 +254,11 @@ public class WindowManagerShellCommand extends ShellCommand {
        return 0;
    }

    private int runResetFreezeRecentTaskListReordering(PrintWriter pw) throws RemoteException {
        mInternal.resetFreezeRecentTaskListReordering();
        return 0;
    }

    private void printInitialDisplayDensity(PrintWriter pw , int displayId) {
        try {
            final int initialDensity = mInterface.getInitialDisplayDensity(displayId);
@@ -1492,6 +1499,8 @@ public class WindowManagerShellCommand extends ShellCommand {
        printLetterboxHelp(pw);
        printMultiWindowConfigHelp(pw);

        pw.println("  reset-freeze-recent-tasks");
        pw.println("    Resets the spatial ordering of the recent tasks list");
        pw.println("  reset [-d DISPLAY_ID]");
        pw.println("    Reset all override settings.");
        if (!IS_USER) {