From e91e4f0328f9e43ad2992a04b20962e5d9ddf4c9 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Thu, 17 Jun 2021 12:37:02 -0700 Subject: [PATCH] Default to requesting command type TOGGLE for OverviewCommandHelper Parity with how sysui switches between apps for double tapping recents button. Fixes: 190660016 Test: Double tap to switch works, tapping fast also works Change-Id: If6dda377d8accf564f3385e78c6721c677310361 --- .../launcher3/taskbar/TaskbarNavButtonController.java | 5 +---- .../src/com/android/quickstep/OverviewCommandHelper.java | 5 ----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java index 8549ca2ac5..8b0f426699 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java @@ -94,10 +94,7 @@ public class TaskbarNavButtonController { } private void navigateToOverview() { - int commandType = mService.getOverviewCommandHelper().isOverviewVisible() ? - OverviewCommandHelper.TYPE_TOGGLE : - OverviewCommandHelper.TYPE_SHOW; - mService.getOverviewCommandHelper().addCommand(commandType); + mService.getOverviewCommandHelper().addCommand(OverviewCommandHelper.TYPE_TOGGLE); } private void executeBack() { diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java index 728fec2732..2beef0a7ce 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java @@ -136,11 +136,6 @@ public class OverviewCommandHelper { } } - public boolean isOverviewVisible() { - BaseActivityInterface activityInterface = - mOverviewComponentObserver.getActivityInterface(); - return activityInterface.getVisibleRecentsView() != null; - } /** * Executes the task and returns true if next task can be executed. If false, then the next * task is deferred until {@link #scheduleNextTask} is called