From a34abedbe6455e8d14b6420428b4cbae620f03ef Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 8 Dec 2021 04:52:35 +0000 Subject: [PATCH] Expose recents animation targets pre-rotation bounds Bug: 197687032 Test: Enable shell transitions and swipe up from a landscape app into force-portrait Launcher Change-Id: I2a35567ee0afe8a413c4feb37d6ab1d307498c5a --- .../systemui/shared/system/RemoteAnimationTargetCompat.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java index 30db13611f4a7..c1d9d0d0e142e 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java @@ -65,6 +65,7 @@ public class RemoteAnimationTargetCompat { public final Rect localBounds; public final Rect sourceContainerBounds; public final Rect screenSpaceBounds; + public final Rect startScreenSpaceBounds; public final boolean isNotInRecents; public final Rect contentInsets; public final ActivityManager.RunningTaskInfo taskInfo; @@ -88,6 +89,7 @@ public class RemoteAnimationTargetCompat { localBounds = app.localBounds; sourceContainerBounds = app.sourceContainerBounds; screenSpaceBounds = app.screenSpaceBounds; + startScreenSpaceBounds = screenSpaceBounds; prefixOrderIndex = app.prefixOrderIndex; isNotInRecents = app.isNotInRecents; contentInsets = app.contentInsets; @@ -219,6 +221,8 @@ public class RemoteAnimationTargetCompat { localBounds.offsetTo(change.getEndRelOffset().x, change.getEndRelOffset().y); sourceContainerBounds = null; screenSpaceBounds = new Rect(change.getEndAbsBounds()); + startScreenSpaceBounds = new Rect(change.getStartAbsBounds()); + prefixOrderIndex = order; // TODO(shell-transitions): I guess we need to send content insets? evaluate how its used. contentInsets = new Rect(0, 0, 0, 0);