From ceb064a7db073bd6630022a281ac8012129c78a3 Mon Sep 17 00:00:00 2001 From: Ben Lin Date: Wed, 1 Sep 2021 15:29:36 -0700 Subject: [PATCH] Populate window configuration from TaskInfo. Bug: 198352321 Test: Start a shell transition that converts to RemoteAnimation, see windowConfiguration populated correctly Change-Id: I14276dbb8e52e9c9b75587e5919793d3fab48b5d --- .../shared/system/RemoteAnimationTargetCompat.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 0a1465708edbf..30db13611f4a7 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 @@ -71,11 +71,11 @@ public class RemoteAnimationTargetCompat { public final boolean allowEnterPip; public final int rotationChange; public final int windowType; + public final WindowConfiguration windowConfiguration; private final SurfaceControl mStartLeash; // Fields used only to unrap into RemoteAnimationTarget - private final WindowConfiguration windowConfiguration; private final Rect startBounds; public RemoteAnimationTargetCompat(RemoteAnimationTarget app) { @@ -235,8 +235,9 @@ public class RemoteAnimationTargetCompat { rotationChange = change.getEndRotation() - change.getStartRotation(); windowType = INVALID_WINDOW_TYPE; - // TODO this probably isn't right but it's unused for now /shrug - windowConfiguration = new WindowConfiguration(); + windowConfiguration = change.getTaskInfo() != null + ? change.getTaskInfo().configuration.windowConfiguration + : new WindowConfiguration(); startBounds = change.getStartAbsBounds(); }