From 655627f70b2ed65447d92a798c1331c883718183 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Thu, 7 Apr 2022 11:40:36 -0700 Subject: [PATCH] Set finishedToApp = false when rotating in Overview The issue is that we always assume finishedToApp = true when recents animation is cancelled and use that to set FLAG_IN_APP. However, we don't return to app in overview after the device is rotated. Ideally we want to get signal from onRecentsAnimationCancelled, but at this point in the release it's probably ok to use launcher state to determine it. Fixes: 227565959 Test: manual Change-Id: I6be800aff8108b382ca3947cd1d0a45c9e9571eb --- .../launcher3/taskbar/TaskbarLauncherStateController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index ebe6a04611..10f3db0be7 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -409,7 +409,8 @@ import java.util.function.Supplier; @Override public void onRecentsAnimationCanceled(HashMap thumbnailDatas) { - endGestureStateOverride(true); + boolean isInOverview = mLauncher.isInState(LauncherState.OVERVIEW); + endGestureStateOverride(!isInOverview); } @Override