diff --git a/quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java index 6a908ca073..d6327bc3cd 100644 --- a/quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java @@ -28,7 +28,6 @@ import com.android.launcher3.statemanager.StateManager; import com.android.launcher3.statemanager.StatefulContainer; import com.android.quickstep.TopTaskTracker; import com.android.quickstep.fallback.RecentsState; -import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.RecentsViewContainer; @@ -139,12 +138,6 @@ public class FallbackTaskbarUIController return topTask.isHomeTask() || topTask.isRecentsTask(); } - @Nullable - @Override - protected TISBindHelper getTISBindHelper() { - return mRecentsContainer.getTISBindHelper(); - } - @Override protected String getTaskbarUIControllerName() { return "FallbackTaskbarUIController<" + mRecentsContainer.getClass().getSimpleName() + ">"; diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java index ea42d771cb..a6eee0832c 100644 --- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java @@ -49,7 +49,6 @@ import com.android.quickstep.HomeVisibilityState; import com.android.quickstep.RecentsAnimationCallbacks; import com.android.quickstep.SystemUiProxy; import com.android.quickstep.util.GroupTask; -import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags; import com.android.wm.shell.shared.bubbles.BubbleBarLocation; @@ -485,12 +484,6 @@ public class LauncherTaskbarUIController extends TaskbarUIController { mTaskbarLauncherStateController.resetIconAlignment(); } - @Nullable - @Override - protected TISBindHelper getTISBindHelper() { - return mLauncher.getTISBindHelper(); - } - @Override public void dumpLogs(String prefix, PrintWriter pw) { super.dumpLogs(prefix, pw); diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java index 48818362e9..d1f9be0b91 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java @@ -344,6 +344,10 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa mCallbacks.onToggleOverview(); } + public void hideOverview() { + mCallbacks.onHideOverview(); + } + void sendBackKeyEvent(int action, boolean cancelled) { if (action == mLastSentBackAction) { // There must always be an alternating sequence of ACTION_DOWN and ACTION_UP events @@ -411,5 +415,8 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa /** Callback invoked when the overview button is pressed. */ default void onToggleOverview() {} + + /** Callback invoken when a visible overview needs to be hidden. */ + default void onHideOverview() { } } } diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java index 8b636dd9b6..f29f95d347 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java @@ -39,10 +39,7 @@ import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.taskbar.bubbles.BubbleBarController; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.SplitConfigurationOptions; -import com.android.quickstep.OverviewCommandHelper; -import com.android.quickstep.OverviewCommandHelper.CommandType; import com.android.quickstep.util.GroupTask; -import com.android.quickstep.util.TISBindHelper; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskContainer; import com.android.quickstep.views.TaskView; @@ -389,26 +386,13 @@ public class TaskbarUIController implements BubbleBarController.BubbleBarLocatio /** Adjusts the hotseat for the bubble bar. */ public void adjustHotseatForBubbleBar(boolean isBubbleBarVisible) {} - @Nullable - protected TISBindHelper getTISBindHelper() { - return null; - } - /** * Launches the focused task in the Keyboard Quick Switch view through the OverviewCommandHelper *

* Use this helper method when the focused task may be the overview task. */ public void launchKeyboardFocusedTask() { - TISBindHelper tisBindHelper = getTISBindHelper(); - if (tisBindHelper == null) { - return; - } - OverviewCommandHelper overviewCommandHelper = tisBindHelper.getOverviewCommandHelper(); - if (overviewCommandHelper == null) { - return; - } - overviewCommandHelper.addCommand(CommandType.HIDE); + mControllers.navButtonController.hideOverview(); } /** diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index e17771cdf9..4c5e6556b8 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -1434,12 +1434,6 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, return (mTaskbarUIController != null && mTaskbarUIController.hasBubbles()); } - @NonNull - @Override - public TISBindHelper getTISBindHelper() { - return mTISBindHelper; - } - @Override public boolean handleIncorrectSplitTargetSelection() { if (!enableSplitContextually() || !mSplitSelectStateController.isSplitSelectActive()) { diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java index 61a150b8b6..17c17ccef0 100644 --- a/quickstep/src/com/android/quickstep/RecentsActivity.java +++ b/quickstep/src/com/android/quickstep/RecentsActivity.java @@ -554,12 +554,6 @@ public final class RecentsActivity extends StatefulActivity implem return overviewCommandHelper == null || overviewCommandHelper.canStartHomeSafely(); } - @NonNull - @Override - public TISBindHelper getTISBindHelper() { - return mTISBindHelper; - } - @Override public boolean isRecentsViewVisible() { return getStateManager().getState().isRecentsViewVisible(); diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 4ddbcdb4e1..0a780ea8d2 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -613,6 +613,11 @@ public class TouchInteractionService extends Service { public void onToggleOverview() { mOverviewCommandHelper.addCommand(CommandType.TOGGLE); } + + @Override + public void onHideOverview() { + mOverviewCommandHelper.addCommand(CommandType.HIDE); + } }; private ActivityManagerWrapper mAM; diff --git a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt index b3cc3e92de..7549dc55a0 100644 --- a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt +++ b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt @@ -322,10 +322,6 @@ class RecentsWindowManager(private val displayId: Int, context: Context) : return taskbarUIController } - override fun getTISBindHelper(): TISBindHelper { - return tisBindHelper - } - fun registerInitListener(onInitListener: Predicate) { this.onInitListener = onInitListener } diff --git a/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java b/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java index b04753b3b8..a1d22fe494 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java +++ b/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java @@ -25,7 +25,6 @@ import android.view.MotionEvent; import android.view.View; import android.view.Window; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.launcher3.BaseActivity; @@ -34,7 +33,6 @@ import com.android.launcher3.statehandlers.DesktopVisibilityController; import com.android.launcher3.taskbar.TaskbarUIController; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.ScrimView; -import com.android.quickstep.util.TISBindHelper; /** * Interface to be implemented by the parent view of RecentsView @@ -217,6 +215,4 @@ public interface RecentsViewContainer extends ActivityContext { void setTaskbarUIController(@Nullable TaskbarUIController taskbarUIController); @Nullable TaskbarUIController getTaskbarUIController(); - - @NonNull TISBindHelper getTISBindHelper(); }