diff options
| author | 2022-12-28 21:07:31 +0000 | |
|---|---|---|
| committer | 2023-01-04 02:54:48 +0000 | |
| commit | 46dc79bb44b17ac594a538ce1a57d009e7809133 (patch) | |
| tree | 85c9f3b96ce82c8c98707777f331d9aac32aa470 /native/android/input.cpp | |
| parent | fa71876cc023e55bd939cf7f39a991abbb2eb4f9 (diff) | |
Per-app compat treatment for setRequestedOrientation loops.
Per-package controls introduced in this change:
- OVERRIDE_ENABLE_COMPAT_IGNORE_REQUESTED_ORIENTATION for device manufactures to opt in a package into the treatment.
- android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION for app developers to opt in/out from the treatment via a component property.
When enabled for the package and on the devices, treatment ignores app requested orientation in response to an app calling Activity#setRequestedOrientation if app is currently relaunching or has an active Camera Compat treatment.
This is needed to avoid getting into Activity#setRequestedOrientation loop when ignoreOrientationRequest is enabled. For example, the loop can look like this:
1) App sets default orientation to "unspecified" at runtime
2) App requests to "portrait" after checking some condition (e.g. display rotation).
3) (2) leads to fullscreen -> letterboxed bounds change and activity relaunch because app can't handle the corresponding config changes.
4) Loop goes back to (1)
Fix: 254631730
Test: atest WmTests:LetterboxUiControllerTest
Change-Id: I3dc88db4193d08215c36d9a69ef2cc53155b60c7
Diffstat (limited to 'native/android/input.cpp')
0 files changed, 0 insertions, 0 deletions