From 576592575b5e2ff509ad6bf34445cc71c73f6478 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Thu, 2 Feb 2023 14:16:31 -0800 Subject: [PATCH] Set StateManager to BackgroundAppState if end gesture is LAST_TASK * Setting stateManager to QUICK_SWITCH results in calling launchTasks() in the current TaskView in recycler view, however if the end is LAST_TASK, there's no need to launch anything. * Currently this isn't an issue with fullscreen tasks because Launcher's onStop() cancels the animation, but that isn't the case in the specific step of locking/unlocking the device AND in splitscreen. Tracked at (b/267674372) Test: Bug no longer repros. Did other quickswitch gestures and also going to overview with split and fullscreen apps Fixes: 265734073 Change-Id: Ie553c7b5db7e59e0cd8aba1723c25ad923690d5c --- .../src/com/android/quickstep/LauncherActivityInterface.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java index 9ff941671b..710de8c810 100644 --- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java +++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java @@ -346,8 +346,9 @@ public final class LauncherActivityInterface extends case RECENTS: return OVERVIEW; case NEW_TASK: - case LAST_TASK: return QUICK_SWITCH; + case LAST_TASK: + return BACKGROUND_APP; case HOME: default: return NORMAL;