From 4b8f86ebccd2015feb06968076126039d7ca7f1d Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Wed, 10 Aug 2022 13:31:04 -0700 Subject: [PATCH] Notify recents controller when no-longer finishing-to-home Bug: 241818882 Test: open app, swipe to recents, restore app Change-Id: Ifb258319b7a54917f9f6ac08ccefeed5a47480e2 --- quickstep/src/com/android/quickstep/TaskViewUtils.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/quickstep/src/com/android/quickstep/TaskViewUtils.java b/quickstep/src/com/android/quickstep/TaskViewUtils.java index 3bd72fe41d..a809c9c09b 100644 --- a/quickstep/src/com/android/quickstep/TaskViewUtils.java +++ b/quickstep/src/com/android/quickstep/TaskViewUtils.java @@ -593,6 +593,15 @@ public final class TaskViewUtils { Animator launcherAnim; final AnimatorListenerAdapter windowAnimEndListener; if (launcherClosing) { + // Since Overview is in launcher, just opening overview sets willFinishToHome to true. + // Now that we are closing the launcher, we need to (re)set willFinishToHome back to + // false. Otherwise, RecentsAnimationController can't differentiate between closing + // overview to 3p home vs closing overview to app. + final RecentsAnimationController raController = + recentsView.getRecentsAnimationController(); + if (raController != null) { + raController.setWillFinishToHome(false); + } Context context = v.getContext(); DeviceProfile dp = BaseActivity.fromContext(context).getDeviceProfile(); launcherAnim = dp.isTablet