From 228e7e502e9fc4332ede15f9b9e6893ab1954e59 Mon Sep 17 00:00:00 2001 From: Chris Li Date: Wed, 21 Sep 2022 15:19:33 +0800 Subject: [PATCH] Polish ActivityEmbedding Shell animation when open a split pair Before, we are checking TransitionInfo.isIndependent, which is true when the parent is TRANSIT_CHANGE. However, we already animate the change parent here, so we should skip the child for such case. Bug: 207070762 Test: manually verify the animation Change-Id: I3d1342ef27c97b2c8bb7270975f1f089c4462d5b --- .../activityembedding/ActivityEmbeddingAnimationRunner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunner.java b/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunner.java index d88cc007c7b59..226c1ded16aeb 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunner.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunner.java @@ -276,7 +276,8 @@ class ActivityEmbeddingAnimationRunner { } final Animation animation; - if (!TransitionInfo.isIndependent(change, info)) { + if (change.getParent() != null + && handledChanges.contains(info.getChange(change.getParent()))) { // No-op if it will be covered by the changing parent window. animation = ActivityEmbeddingAnimationSpec.createNoopAnimation(change); } else if (Transitions.isClosingType(change.getMode())) {