summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2022-04-12 18:25:22 +0800
committer Riddle Hsu <riddlehsu@google.com> 2022-04-12 10:38:22 +0000
commit37d61f3b05ae58dd82b4f9a2eac9c979a814016a (patch)
treebbc57a0bd7c314c066cb0ca932fa6b581778aa4d
parent2e495889be6991ca539c94840d5f35a4e9dd99f0 (diff)
Execute transition by starting window only if visible requested
Otherwise the activity may not have been added as opening app for transition, which causes the animation to be skipped. Such as if the previous activity doesn't need to pause or take long time to pause, then its visible-requested is still false. Bug: 161781889 Test: Cold launch Settings to freeform: adb shell am start -n "com.android.settings/.Settings " \ --windowingMode 5 There should be transition animation. Change-Id: If339b1e9e5f004087dcbf2be3c8ab7a9f5524c5b
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 2be9b34054d3..9ba53d8be4d4 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -6298,7 +6298,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// starting window is drawn, the transition can start earlier. Exclude finishing and bubble
// because it may be a trampoline.
if (!wasTaskVisible && mStartingData != null && !finishing && !mLaunchedFromBubble
- && !mDisplayContent.mAppTransition.isReady()
+ && mVisibleRequested && !mDisplayContent.mAppTransition.isReady()
&& !mDisplayContent.mAppTransition.isRunning()
&& mDisplayContent.isNextTransitionForward()) {
// The pending transition state will be cleared after the transition is started, so