From 95e661ea2f925098981620753ffc0bda1a698cec Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Mon, 10 Apr 2023 02:27:01 +0000 Subject: [PATCH] Align drag to split transition with legacy transition This CL performs the fade-in without shifting animation when dragging to split. That makes the transition same with tm-dev branch. Bug: 245472831 Test: drag to split Change-Id: I191325d2e7416841c7bd1192d9949898c7229e3a --- .../wm/shell/splitscreen/SplitScreenTransitions.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java index 22800ad8e8a8d..2e6fbe54f1d53 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java @@ -37,7 +37,6 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.NonNull; import android.annotation.Nullable; -import android.graphics.Point; import android.graphics.Rect; import android.os.IBinder; import android.view.SurfaceControl; @@ -138,20 +137,13 @@ class SplitScreenTransitions { t.setAlpha(parentChange.getLeash(), 1.f); // and then animate this layer outside the parent (since, for example, this is // the home task animating from fullscreen to part-screen). - t.reparent(leash, info.getRoot(rootIdx).getLeash()); - t.setLayer(leash, info.getChanges().size() - i); + t.reparent(parentChange.getLeash(), info.getRoot(rootIdx).getLeash()); + t.setLayer(parentChange.getLeash(), info.getChanges().size() - i); // build the finish reparent/reposition mFinishTransaction.reparent(leash, parentChange.getLeash()); mFinishTransaction.setPosition(leash, change.getEndRelOffset().x, change.getEndRelOffset().y); } - // TODO(shell-transitions): screenshot here - final Rect startBounds = new Rect(change.getStartAbsBounds()); - final Rect endBounds = new Rect(change.getEndAbsBounds()); - final Point rootOffset = info.getRoot(rootIdx).getOffset(); - startBounds.offset(-rootOffset.x, -rootOffset.y); - endBounds.offset(-rootOffset.x, -rootOffset.y); - startExampleResizeAnimation(leash, startBounds, endBounds); } boolean isRootOrSplitSideRoot = change.getParent() == null || topRoot.equals(change.getParent());