From 8e714d42aed4df42d2a4d90c74f28284cd172bdf Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Sun, 22 Mar 2020 13:11:29 -0700 Subject: [PATCH] Update launcher call to fetch recent tasks - Always just fetch the tasks that will end up in recents Bug: 152133859 Test: Manual, swipe up with pip/assistant and verify nothing changed Change-Id: I41719e111cba85da7e93f65681b7b50b4c5c4a46 --- .../quickstep/TouchInteractionService.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java index 25a307852d..fc1630c5b9 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -439,7 +439,7 @@ public class TouchInteractionService extends Service implements PluginListener mAM.getRunningTask(0))); + () -> mAM.getRunningTask(true /* filterOnlyVisibleRecents */))); if (mDeviceState.isInSwipeUpTouchRegion(event)) { mConsumer.onConsumerAboutToBeSwitched(); @@ -567,18 +567,10 @@ public class TouchInteractionService extends Service implements PluginListener mAM.getRunningTask(ACTIVITY_TYPE_ASSISTANT /* ignoreActivityType */))); - ComponentName homeComponent = mOverviewComponentObserver.getHomeIntent().getComponent(); - ComponentName runningComponent = - gestureState.getRunningTask().baseIntent.getComponent(); - forceOverviewInputConsumer = - runningComponent != null && runningComponent.equals(homeComponent); - } + RunningTaskInfo runningTask = gestureState.getRunningTask(); + ComponentName homeComponent = mOverviewComponentObserver.getHomeIntent().getComponent(); + boolean forceOverviewInputConsumer = runningTask != null + && runningTask.baseIntent.getComponent().equals(homeComponent); if (previousGestureState.getFinishingRecentsAnimationTaskId() > 0) { // If the finish animation was interrupted, then continue using the other activity input