From 7963c1d05102de2460eec6d3caf71fe709be1083 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Tue, 25 Oct 2022 16:29:07 -0700 Subject: [PATCH] Set launcher state to NORMAL when entering desktop When clicking on desktop tile, we need to explicitly move launcher state to NORMAL. Freeform apps float on top of launcher and launcher remains visible in the background. When on desktop, launcher should be in normal state, with icons and widgets hidden. Hiding of the icons etc is handled already by DesktopVisibilityController. TODO: - need to fix home screen icons flicker, can be solved with new launcher state (b/255649902) Bug: 244348395 Test: manual, click on desktop tile in overview, observe freeform apps brought to front and overview closes Change-Id: I214b0d6b622e673e0b0cb82f84b2080b479a7fb9 --- .../android/quickstep/views/DesktopTaskView.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java index 8385afe82c..5167bd7228 100644 --- a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java +++ b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java @@ -286,31 +286,23 @@ public class DesktopTaskView extends TaskView { @Override public RunnableList launchTasks() { - showDesktopApps(); - getRecentsView().onTaskLaunchedInLiveTileMode(); + SystemUiProxy.INSTANCE.get(getContext()).showDesktopApps(); + getRecentsView().startHome(); return new RunnableList(); } @Nullable @Override public RunnableList launchTaskAnimated() { - RunnableList endCallback = new RunnableList(); - showDesktopApps(); - RecentsView recentsView = getRecentsView(); - recentsView.addSideTaskLaunchCallback(endCallback); - return endCallback; + return launchTasks(); } @Override public void launchTask(@NonNull Consumer callback, boolean freezeTaskList) { - showDesktopApps(); + launchTasks(); 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.