From 1223a7afa7d378612d5fd204948cebe8c6039a28 Mon Sep 17 00:00:00 2001 From: Tiger Date: Wed, 12 Jun 2024 23:18:31 +0800 Subject: [PATCH] Take fixed rotation into account when setting the rounded corner frame This CL uses the FixedRotationTransformDisplayBounds as the rounded corner frame while the token is in fixed-rotation. Fix: 346772491 Flag: NA Test: run WindowPolicyTests#testWindowInsets during fixed-rotation Change-Id: I356de4483e2e9b95e410cf7144d70c36f02443ca --- services/core/java/com/android/server/wm/InsetsPolicy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/InsetsPolicy.java b/services/core/java/com/android/server/wm/InsetsPolicy.java index 3c556bf7b126..6288a429af81 100644 --- a/services/core/java/com/android/server/wm/InsetsPolicy.java +++ b/services/core/java/com/android/server/wm/InsetsPolicy.java @@ -424,7 +424,9 @@ private InsetsState adjustInsetsForRoundedCorners(WindowToken token, InsetsState // Use task bounds to calculating rounded corners if the task is not floating. final InsetsState state = copyState ? new InsetsState(originalState) : originalState; - state.setRoundedCornerFrame(task.getBounds()); + state.setRoundedCornerFrame(token.isFixedRotationTransforming() + ? token.getFixedRotationTransformDisplayBounds() + : task.getBounds()); return state; } }