Make activity refresh for camera compat more robust.
Refresh for camera compat is a necessary step of the treatment for most apps, as camera needs to be set up again with new parameters. Previously, refresh has been tied to configuration change, which is caused by letterboxing as part of the simulate-requested-orientation treatment, or display rotation change for force-rotation treatment. However, there are scenarios where letterboxing is not applied, either because the app bounds already have desired aspect ratio, or that letterboxing is not applied for responsive apps as part of external-display treatment; but other parts of the camera compat treatment (like sandboxed display rotation and camera rotate-and-crop) could significantly alter camera setup without causing config change. Therefore, if any of these change, activity should be refreshed to trigger camera setup. If the app would relaunch due to config change, ActivityRefresher should still track this as refresh, but actual refresh is not needed. Flag: com.android.window.flags.enable_camera_compat_sandbox_display_rotation_on_external_displays_bugfix Bug: 440272833 Test: atest WmTests:AppCompatCameraSimReqOrientationPolicyTests Test atest WmTests:AppCompatCameraDisplayRotationPolicyTests Test atest WmTests:ActivityRefresherTests Change-Id: I571a51cd9cfd80b35db9de21a58c62fc97532543
Loading
Please register or sign in to comment