Set restored aspect ratio for newly installed apps in a service.
Setting the restored user aspect ratio for a particular app needs to wait until that app is installed. Settings app, which handles the Backup and Restore of user aspect ratio settings, can be killed at any point post restore operation, meaning that it cannot be the one listening to the package-added signals. Therefore, if an app is not yet installed, the resolved aspect ratio by the Settings app is given to the UserAspectRatioService. This service stores the aspect ratios, listens to package-added signals, and sets the values when the apps are installed. Restore needs to be done in the Settings app, since only it has access to available user aspect ratio settings allowed on that device (set/overridden by the OEM), to be able to correctly resolve which aspect ratio should be set. Flag: com.android.window.flags.restore_user_aspect_ratio_settings_using_service Fix: 408430597 Test: m Change-Id: I1cb88826e51c377a1c7acae9ddf37e960ed0743e
Loading
Please register or sign in to comment