From a929d5bf32a6c41b4af27c0918551e7248229343 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Mon, 1 Aug 2022 23:08:50 +0000 Subject: [PATCH] Hook up setWillFinishToHome in recents wrapper When using 3p launcher, this extra call needs to be tracked in order to prevent returning-to the live app instead of the launcher Bug: 238328090 Test: atest Launcher3Tests Change-Id: I9748da0475536373750efe9aecc7fb91b66dd61e --- .../systemui/shared/system/RemoteTransitionCompat.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java index 609846e8c7292..7c1ef8c769264 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteTransitionCompat.java @@ -230,6 +230,7 @@ public class RemoteTransitionCompat implements Parcelable { private IBinder mTransition = null; private boolean mKeyguardLocked = false; private RemoteAnimationTargetCompat[] mAppearedTargets; + private boolean mWillFinishToHome = false; void setup(RecentsAnimationControllerCompat wrapped, TransitionInfo info, IRemoteTransitionFinishedCallback finishCB, @@ -392,7 +393,7 @@ public class RemoteTransitionCompat implements Parcelable { if (toHome) wct.reorder(mRecentsTask, true /* toTop */); else wct.restoreTransientOrder(mRecentsTask); } - if (!toHome && mPausingTasks != null && mOpeningLeashes == null) { + if (!toHome && !mWillFinishToHome && mPausingTasks != null && mOpeningLeashes == null) { // The gesture went back to opening the app rather than continuing with // recents, so end the transition by moving the app back to the top (and also // re-showing it's task). @@ -476,6 +477,7 @@ public class RemoteTransitionCompat implements Parcelable { } @Override public void setWillFinishToHome(boolean willFinishToHome) { + mWillFinishToHome = willFinishToHome; if (mWrapped != null) mWrapped.setWillFinishToHome(willFinishToHome); }