From 8c4778151117b605fd7342c2f534db8343eff94f Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Wed, 19 Oct 2022 18:54:41 +0800 Subject: [PATCH] Fix setLaunchBehind target being stop while back gesture animating The home activity will addToStopping when launching another app, if the back gesture start before home activity stopped, it can still being stopped and become invisible even set mLaunchTaskBehind = true. Bug: 131727607 Test: launch an app, and start back gesture before home activity stopped, monitor the home activity won't become invisible. Change-Id: I189bc31a5dc55c91c48a1dc81e1336aa580e90c6 --- .../java/com/android/server/wm/BackNavigationController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java index e9774479233dd..30399ed15f7e5 100644 --- a/services/core/java/com/android/server/wm/BackNavigationController.java +++ b/services/core/java/com/android/server/wm/BackNavigationController.java @@ -588,6 +588,7 @@ class BackNavigationController { ProtoLog.d(WM_DEBUG_BACK_PREVIEW, "Setting Activity.mLauncherTaskBehind to true. Activity=%s", activity); + activity.mTaskSupervisor.mStoppingActivities.remove(activity); activity.getDisplayContent().ensureActivitiesVisible(null /* starting */, 0 /* configChanges */, false /* preserveWindows */, true); }