No recents-in-window on default display if enableOverviewOnConnectedDisplays is true

Bug: 413257766
Flag: com.android.launcher3.enable_overview_on_connected_displays
Test: local + presubmit
Change-Id: I0ae36d4bec4cf962e4c71304c82838dbf2bf518f
This commit is contained in:
Will Osborn committed 2025-04-29 15:11:27 +00:00
1 parent 43bc12baf2
commit 51943297be
14 files changed
+66 -70

No files matched your search

@@ -62,10 +62,11 @@ import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.taskbar.bubbles.stashing.BubbleStashController.BubbleLauncherState;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
import com.android.quickstep.BaseContainerInterface;
import com.android.quickstep.OverviewComponentObserver;
import com.android.quickstep.RecentsAnimationCallbacks;
import com.android.quickstep.RecentsAnimationController;
import com.android.quickstep.fallback.RecentsState;
import com.android.quickstep.fallback.window.RecentsWindowFlags;
import com.android.quickstep.fallback.window.RecentsWindowManager;
import com.android.quickstep.util.ScalingWorkspaceRevealAnim;
import com.android.quickstep.util.SystemUiFlagUtils;
@@ -1141,14 +1142,14 @@ public class TaskbarLauncherStateController {
* Helper function to run a callback on the RecentsWindowManager (if it exists).
*/
private void runForRecentsWindowManager(Consumer<RecentsWindowManager> callback) {
if (RecentsWindowFlags.getEnableOverviewInWindow()) {
final TaskbarActivityContext taskbarContext = mControllers.taskbarActivityContext;
RecentsWindowManager recentsWindowManager =
RecentsWindowManager.REPOSITORY_INSTANCE.get(taskbarContext).get(
taskbarContext.getDisplayId());
if (recentsWindowManager != null) {
callback.accept(recentsWindowManager);
}
final TaskbarActivityContext taskbarContext = mControllers.taskbarActivityContext;
int displayId = taskbarContext.getDisplayId();
BaseContainerInterface<?, ?> containerInterface = OverviewComponentObserver.INSTANCE.get(
taskbarContext).getContainerInterface(displayId);
if (containerInterface != null
&& containerInterface.getCreatedContainer() instanceof RecentsWindowManager
recentsWindowManager) {
callback.accept(recentsWindowManager);
}
}