From 4510a25fda67f3df97db2968e1446680f310c363 Mon Sep 17 00:00:00 2001 From: Schneider Victor-Tulias Date: Tue, 27 May 2025 13:36:06 -0400 Subject: [PATCH] Refactor BaseContainerInterface and subclasses to better support 3P and Recents in window BaseContainerInterface.deferStartingActivity and BaseContainerInterface.shouldCancelCurrentGesture were methods that didn't need to be delegated down to LauncherActivityInterface. This delegation was excluding some crucial functionality from 3P launchers and recents in window. This fixes the incorrect triggering of OtherActivityInputConsumer when using the taskbar and dragging taskbar icons to splitscreen. These fixes mainly affect the persistent taskbar Flag: com.android.launcher3.enable_launcher_overview_in_window Flag: com.android.launcher3.enable_fallback_overview_in_window Bug: 377678992 Test: TaplTestsTaskbarSearch Change-Id: I5f17c1868b0669ef6436d0c3aa36e6eaf8ce69ef --- .../taskbar/LauncherTaskbarUIController.java | 9 --------- .../taskbar/TaskbarUIController.java | 9 +++++++++ .../quickstep/BaseActivityInterface.java | 10 ---------- .../quickstep/BaseContainerInterface.java | 20 ++++++++++++++++--- .../quickstep/BaseWindowInterface.java | 10 ---------- .../quickstep/FallbackActivityInterface.java | 4 +++- .../quickstep/FallbackWindowInterface.java | 11 ---------- .../quickstep/LauncherActivityInterface.java | 20 ------------------- 8 files changed, 29 insertions(+), 64 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java index f211ed916d..e294f4ab9a 100644 --- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java @@ -362,15 +362,6 @@ public class LauncherTaskbarUIController extends TaskbarUIController { mTaskbarLauncherStateController.applyState(); } - public boolean isDraggingItem() { - boolean bubblesDragging = false; - if (mControllers.bubbleControllers.isPresent()) { - bubblesDragging = - mControllers.bubbleControllers.get().bubbleDragController.isDragging(); - } - return mControllers.taskbarDragController.isDragging() || bubblesDragging; - } - @Override protected void onStashedInAppChanged() { onStashedInAppChanged(mLauncher.getDeviceProfile()); diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java index 6167b24fd8..06057038f0 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java @@ -234,6 +234,15 @@ public class TaskbarUIController implements BubbleBarController.BubbleBarLocatio } } + public boolean isDraggingItem() { + boolean bubblesDragging = false; + if (mControllers.bubbleControllers.isPresent()) { + bubblesDragging = + mControllers.bubbleControllers.get().bubbleDragController.isDragging(); + } + return mControllers.taskbarDragController.isDragging() || bubblesDragging; + } + @CallSuper protected void dumpLogs(String prefix, PrintWriter pw) { pw.println(String.format( diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index ec6762cfb2..c387856245 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -18,7 +18,6 @@ package com.android.quickstep; import static com.android.app.animation.Interpolators.ACCELERATE_2; import static com.android.app.animation.Interpolators.INSTANT; import static com.android.app.animation.Interpolators.LINEAR; -import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe; import static com.android.quickstep.AbsSwipeUpHandler.RECENTS_ATTACH_DURATION; import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_ATTACHED_ALPHA_ANIM; import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_FADE_ANIM; @@ -32,7 +31,6 @@ import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; -import android.view.MotionEvent; import androidx.annotation.Nullable; @@ -87,14 +85,6 @@ public abstract class BaseActivityInterface