Skip to content
Commit 32f5bd10 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Transform displayMetrics if needed

Display#getRotation returns ROTATION_0 for displays that are not
active. Display#getRealMetrics relies on rotation to flip width/height
when the display is rotated. This results in incorrect metrics being
reported from getRearDisplayMetrics() when the rear display is off
and the device is rotated.

This CL adjusts the rear display metrics so that they are reflective
of the actual device rotation.

Bug: 281952366
Test: atest WindowAreaComponentImplTests
Test: Run CTS tests starting in different initial orientations


Change-Id: I0b60039217f706b7829550d21c4f883778ca1f6d
parent b3ea5063
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment