Skip to content

Commit

Permalink
Take fixed rotation into account when setting the rounded corner frame
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Tiger committed Jun 12, 2024
1 parent 7c02512 commit 1223a7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/core/java/com/android/server/wm/InsetsPolicy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 1223a7a

Please sign in to comment.