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

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

Merge changes from topic "revert-24866277-recents_freeze_tests-WMHXUBYPSF" into main

* changes:
  Revert "Add shell command to reset the frozen task state"
  Revert "Extend unfreeze recents duration when running under tests"
parents 1bfc6d54 1ef5980c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -302,12 +302,9 @@ class RecentTasks {
        }

        // Always update the reordering time when this is called to ensure that the timeout
        // is reset.  Extend this duration when running in tests.
        final long timeout = ActivityManager.isRunningInUserTestHarness()
                ? mFreezeTaskListTimeoutMs * 10
                : mFreezeTaskListTimeoutMs;
        // is reset
        mService.mH.removeCallbacks(mResetFreezeTaskListOnTimeoutRunnable);
        mService.mH.postDelayed(mResetFreezeTaskListOnTimeoutRunnable, timeout);
        mService.mH.postDelayed(mResetFreezeTaskListOnTimeoutRunnable, mFreezeTaskListTimeoutMs);
    }

    /**
+0 −11
Original line number Diff line number Diff line
@@ -9646,15 +9646,4 @@ 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();
    }
}
+0 −9
Original line number Diff line number Diff line
@@ -142,8 +142,6 @@ 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:
@@ -254,11 +252,6 @@ 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);
@@ -1499,8 +1492,6 @@ 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) {