Skip to content
Commit 83c300c0 authored by Mariia Sandrikova's avatar Mariia Sandrikova
Browse files

[1/n] Camera Compat: Force rotate activities

Camera compatibility treatment that handles orientation mismatch between camera buffers and an app window that can lead to camera issues like sideways or stretched viewfinder.

The treatment is enabled for internal displays that have ignoreOrientationRequest display setting enabled and when a flag config_windowManagerCameraCompatTreatmentEnabled is true. It's only applied to activities that have fixed orientation and are in fullscreen.

Main parts of the solution:
- Listen for the camera changes in DisplayRotationCompatPolicy to trigger orientation update when necessary
- Incorporate DisplayRotationCompatPolicy#getOrientation in orientation resolution logic in DisplayContent
- Don't trigger orientation updates too quickly to avoid orientation flickering during the camera flip or fold-unfold for foldable devices

Bug: 218352945
Test: atest WmTests:DisplayRotationCompatPolicyTests
Change-Id: Iaa3a3efa4e0fa89fbb58c7dbc59c125600972224
parent 4475e902
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