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
diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
index 9ff9416..710de8c 100644
--- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
@@ -346,8 +346,9 @@
case RECENTS:
return OVERVIEW;
case NEW_TASK:
- case LAST_TASK:
return QUICK_SWITCH;
+ case LAST_TASK:
+ return BACKGROUND_APP;
case HOME:
default:
return NORMAL;