From b5b3b054d1c01d6b2c445f5c929cac94d9860c20 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Thu, 20 Oct 2022 17:06:47 -0700 Subject: [PATCH] Clicking on desktop tile brings apps to front Override launchTasks() method from TaskView to ensure we always call into WMShell to bring desktop apps to front. And don't run single task animation logic. Bug: 254738174 Test: manual, enable shell transitions, click on desktop tile in recents Change-Id: Ibe85cbe14d3378a89ba7bfd5f394f0c3e44f304d --- .../android/quickstep/views/DesktopTaskView.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java index 9874f9644a..8385afe82c 100644 --- a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java +++ b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java @@ -284,11 +284,18 @@ public class DesktopTaskView extends TaskView { return false; } + @Override + public RunnableList launchTasks() { + showDesktopApps(); + getRecentsView().onTaskLaunchedInLiveTileMode(); + return new RunnableList(); + } + @Nullable @Override public RunnableList launchTaskAnimated() { RunnableList endCallback = new RunnableList(); - SystemUiProxy.INSTANCE.get(getContext()).showDesktopApps(); + showDesktopApps(); RecentsView recentsView = getRecentsView(); recentsView.addSideTaskLaunchCallback(endCallback); return endCallback; @@ -296,10 +303,14 @@ public class DesktopTaskView extends TaskView { @Override public void launchTask(@NonNull Consumer callback, boolean freezeTaskList) { - SystemUiProxy.INSTANCE.get(getContext()).showDesktopApps(); + showDesktopApps(); callback.accept(true); } + private void showDesktopApps() { + SystemUiProxy.INSTANCE.get(getContext()).showDesktopApps(); + } + @Override void refreshThumbnails(@Nullable HashMap thumbnailDatas) { // Sets new thumbnails based on the incoming data and refreshes the rest.