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
Loading
Please register or sign in to comment