Fix Recents regressions
- Remove extra argument from the invocation of Recents from AM/WM, fetching
the states directly. This also fixes the issue with the docked task from
showing in Recents since the state will trigger the preloaded task stack
to be invalidated.
- Move Recents stack update to onStart() to ensure that it is updated with
the changes introduced in ag/3338461
- Fix an issue with the initial state being clobbered when entering split
screen
Bug: 70279132
Test: Long press recents button to split screen, verify task is not visible
Change-Id: If5a3ca1d86fa0025d6b1e08abf73fe80a390ef8e
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index b131e86..809f19f6 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -749,12 +749,7 @@
supervisor.handleNonResizableTaskIfNeeded(this, preferredStack.getWindowingMode(),
DEFAULT_DISPLAY, toStack);
- boolean successful = (preferredStack == toStack);
- if (successful && toStack.getWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY) {
- // If task moved to docked stack - show recents if needed.
- mService.mWindowManager.showRecentApps(false /* fromHome */);
- }
- return successful;
+ return (preferredStack == toStack);
}
/**