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
This commit is contained in:
Winson Chung
2021-12-08 04:52:35 +00:00
parent defa76abad
commit a34abedbe6

View File

@@ -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);