Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5702,6 +5702,9 @@ TODO(b/255532890) Enable when ignoreOrientationRequest is set --> <bool name="config_letterboxIsEnabledForTranslucentActivities">false</bool> <!-- Whether per-app user aspect ratio override settings is enabled --> <bool name="config_appCompatUserAppAspectRatioSettingsIsEnabled">false</bool> <!-- Whether sending compat fake focus for split screen resumed activities is enabled. Needed because some game engines wait to get focus before drawing the content of the app which isn't guaranteed by default in multi-window modes. --> Loading core/res/res/values/symbols.xml +6 −3 Original line number Diff line number Diff line Loading @@ -4430,9 +4430,6 @@ <!-- Set to true to make assistant show in front of the dream/screensaver. --> <java-symbol type="bool" name="config_assistantOnTopOfDream"/> <!-- Set to true to enable letterboxing on translucent activities. --> <java-symbol type="bool" name="config_letterboxIsEnabledForTranslucentActivities" /> <java-symbol type="string" name="config_overrideComponentUiPackage" /> <java-symbol type="string" name="notification_channel_network_status" /> Loading Loading @@ -4528,6 +4525,12 @@ <java-symbol type="dimen" name="config_letterboxDefaultMinAspectRatioForUnresizableApps" /> <java-symbol type="bool" name="config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled" /> <java-symbol type="bool" name="config_letterboxIsDisplayAspectRatioForFixedOrientationLetterboxEnabled" /> <!-- Set to true to enable letterboxing on translucent activities. --> <java-symbol type="bool" name="config_letterboxIsEnabledForTranslucentActivities" /> <!-- Whether per-app user aspect ratio override settings is enabled --> <java-symbol type="bool" name="config_appCompatUserAppAspectRatioSettingsIsEnabled" /> <java-symbol type="bool" name="config_isCompatFakeFocusEnabled" /> <java-symbol type="bool" name="config_isWindowManagerCameraCompatTreatmentEnabled" /> <java-symbol type="bool" name="config_isWindowManagerCameraCompatSplitScreenAspectRatioEnabled" /> Loading services/core/java/com/android/server/wm/LetterboxConfiguration.java +18 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,13 @@ final class LetterboxConfiguration { private static final boolean DEFAULT_VALUE_ENABLE_LETTERBOX_TRANSLUCENT_ACTIVITY = true; // Whether per-app user aspect ratio override settings is enabled private static final String KEY_ENABLE_USER_ASPECT_RATIO_SETTINGS = "enable_app_compat_user_aspect_ratio_settings"; // TODO(b/288142656): Enable user aspect ratio settings by default. private static final boolean DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_SETTINGS = false; /** * Override of aspect ratio for fixed orientation letterboxing that is set via ADB with * set-fixed-orientation-letterbox-aspect-ratio or via {@link Loading Loading @@ -345,6 +352,10 @@ final class LetterboxConfiguration { DEFAULT_VALUE_ENABLE_LETTERBOX_TRANSLUCENT_ACTIVITY, mContext.getResources().getBoolean( R.bool.config_letterboxIsEnabledForTranslucentActivities)) .addDeviceConfigEntry(KEY_ENABLE_USER_ASPECT_RATIO_SETTINGS, DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_SETTINGS, mContext.getResources().getBoolean( R.bool.config_appCompatUserAppAspectRatioSettingsIsEnabled)) .build(); } Loading Loading @@ -1207,4 +1218,11 @@ final class LetterboxConfiguration { boolean isDisplayRotationImmersiveAppCompatPolicyEnabled() { return mDeviceConfig.getFlagValue(KEY_ENABLE_DISPLAY_ROTATION_IMMERSIVE_APP_COMPAT_POLICY); } /** * Whether per-app user aspect ratio override settings is enabled */ boolean isUserAppAspectRatioSettingsEnabled() { return mDeviceConfig.getFlagValue(KEY_ENABLE_USER_ASPECT_RATIO_SETTINGS); } } Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5702,6 +5702,9 @@ TODO(b/255532890) Enable when ignoreOrientationRequest is set --> <bool name="config_letterboxIsEnabledForTranslucentActivities">false</bool> <!-- Whether per-app user aspect ratio override settings is enabled --> <bool name="config_appCompatUserAppAspectRatioSettingsIsEnabled">false</bool> <!-- Whether sending compat fake focus for split screen resumed activities is enabled. Needed because some game engines wait to get focus before drawing the content of the app which isn't guaranteed by default in multi-window modes. --> Loading
core/res/res/values/symbols.xml +6 −3 Original line number Diff line number Diff line Loading @@ -4430,9 +4430,6 @@ <!-- Set to true to make assistant show in front of the dream/screensaver. --> <java-symbol type="bool" name="config_assistantOnTopOfDream"/> <!-- Set to true to enable letterboxing on translucent activities. --> <java-symbol type="bool" name="config_letterboxIsEnabledForTranslucentActivities" /> <java-symbol type="string" name="config_overrideComponentUiPackage" /> <java-symbol type="string" name="notification_channel_network_status" /> Loading Loading @@ -4528,6 +4525,12 @@ <java-symbol type="dimen" name="config_letterboxDefaultMinAspectRatioForUnresizableApps" /> <java-symbol type="bool" name="config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled" /> <java-symbol type="bool" name="config_letterboxIsDisplayAspectRatioForFixedOrientationLetterboxEnabled" /> <!-- Set to true to enable letterboxing on translucent activities. --> <java-symbol type="bool" name="config_letterboxIsEnabledForTranslucentActivities" /> <!-- Whether per-app user aspect ratio override settings is enabled --> <java-symbol type="bool" name="config_appCompatUserAppAspectRatioSettingsIsEnabled" /> <java-symbol type="bool" name="config_isCompatFakeFocusEnabled" /> <java-symbol type="bool" name="config_isWindowManagerCameraCompatTreatmentEnabled" /> <java-symbol type="bool" name="config_isWindowManagerCameraCompatSplitScreenAspectRatioEnabled" /> Loading
services/core/java/com/android/server/wm/LetterboxConfiguration.java +18 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,13 @@ final class LetterboxConfiguration { private static final boolean DEFAULT_VALUE_ENABLE_LETTERBOX_TRANSLUCENT_ACTIVITY = true; // Whether per-app user aspect ratio override settings is enabled private static final String KEY_ENABLE_USER_ASPECT_RATIO_SETTINGS = "enable_app_compat_user_aspect_ratio_settings"; // TODO(b/288142656): Enable user aspect ratio settings by default. private static final boolean DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_SETTINGS = false; /** * Override of aspect ratio for fixed orientation letterboxing that is set via ADB with * set-fixed-orientation-letterbox-aspect-ratio or via {@link Loading Loading @@ -345,6 +352,10 @@ final class LetterboxConfiguration { DEFAULT_VALUE_ENABLE_LETTERBOX_TRANSLUCENT_ACTIVITY, mContext.getResources().getBoolean( R.bool.config_letterboxIsEnabledForTranslucentActivities)) .addDeviceConfigEntry(KEY_ENABLE_USER_ASPECT_RATIO_SETTINGS, DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_SETTINGS, mContext.getResources().getBoolean( R.bool.config_appCompatUserAppAspectRatioSettingsIsEnabled)) .build(); } Loading Loading @@ -1207,4 +1218,11 @@ final class LetterboxConfiguration { boolean isDisplayRotationImmersiveAppCompatPolicyEnabled() { return mDeviceConfig.getFlagValue(KEY_ENABLE_DISPLAY_ROTATION_IMMERSIVE_APP_COMPAT_POLICY); } /** * Whether per-app user aspect ratio override settings is enabled */ boolean isUserAppAspectRatioSettingsEnabled() { return mDeviceConfig.getFlagValue(KEY_ENABLE_USER_ASPECT_RATIO_SETTINGS); } }