Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 995a1729 authored by Mina Karadzic's avatar Mina Karadzic
Browse files

Allow sandboxing display rotation only, for camera apps on external display.

To show upright preview, camera apps need to rotate the image received from the camera feed by the amount the display is rotated - this is a system approximation for how much the camera is rotated, given that camera framework is unaware of device rotation. However, most apps use the display the activity is currently running on, meaning this could be the external display unrelated to the camera rotation. This leads to stretched and sideways previews.

This treatment sandboxes display rotation to use the rotation of the internal display. No camera feed rotate-and-crop and letterboxing should occur, to keep the app as responsive as possible and preserve FOV.

Flag: com.android.window.flags.enable_camera_compat_sandbox_display_rotation_on_external_displays_bugfix
Bug: 395063101
Test: atest WmTests:AppCompatCameraSimReqOrientationPolicy
Change-Id: I7bc3a143c43bbab84b816b629df07ba782d5a92c
parent 4c2db666
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment