Loading core/java/android/content/pm/ActivityInfo.java +13 −0 Original line number Diff line number Diff line Loading @@ -1021,6 +1021,19 @@ public class ActivityInfo extends ComponentInfo implements Parcelable { @Retention(RetentionPolicy.SOURCE) public @interface SizeChangesSupportMode {} /** * This change id enables compat policy that ignores app requested orientation in * response to an app calling {@link android.app.Activity#setRequestedOrientation}. See * com.android.server.wm.LetterboxUiController#shouldIgnoreRequestedOrientation for * details. * @hide */ @ChangeId @Overridable @Disabled public static final long OVERRIDE_ENABLE_COMPAT_IGNORE_REQUESTED_ORIENTATION = 254631730L; // buganizer id /** * This change id forces the packages it is applied to never have Display API sandboxing * applied for a letterbox or SCM activity. The Display APIs will continue to provide Loading core/java/android/view/WindowManager.java +39 −0 Original line number Diff line number Diff line Loading @@ -813,6 +813,45 @@ public interface WindowManager extends ViewManager { int SCREENSHOT_VENDOR_GESTURE = 6; } /** * Activity level {@link android.content.pm.PackageManager.Property PackageManager * .Property} for an app to inform the system that the activity can be opted-in or opted-out * from the compatibility treatment that avoids {@link * android.app.Activity#setRequestedOrientation} loops. The loop can be trigerred by * ignoreRequestedOrientation display setting enabled on the device or by the landscape natural * orientation of the device. * * <p>The treatment is disabled by default but device manufacturers can enable the treatment * using their discretion to improve display compatibility. * * <p>With this property set to {@code true}, the system could ignore {@link * android.app.Activity#setRequestedOrientation} call from an app if one of the following * conditions are true: * <ul> * <li>Activity is relaunching due to the previous {@link * android.app.Activity#setRequestedOrientation} call. * <li>Camera compatibility force rotation treatment is active for the package. * </ul> * * <p>Setting this property to {@code false} informs the system that the activity must be * opted-out from the compatibility treatment even if the device manufacturer has opted the app * into the treatment. * * <p><b>Syntax:</b> * <pre> * <activity> * <property * android:name="android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION" * android:value="true|false"/> * </activity> * </pre> * * @hide */ // TODO(b/263984287): Make this public API. String PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION = "android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION"; /** * @hide */ Loading core/res/OWNERS +5 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,11 @@ toddke@google.com tsuji@google.com yamasani@google.com # WindowManager team # TODO(262451702): Move WindowManager configs out of config.xml in a separate file per-file core/res/res/values/config.xml = file:/services/core/java/com/android/server/wm/OWNERS per-file core/res/res/values/symbols.xml = file:/services/core/java/com/android/server/wm/OWNERS # Resources finalization per-file res/xml/public-staging.xml = file:/tools/aapt2/OWNERS per-file res/xml/public-final.xml = file:/tools/aapt2/OWNERS Loading core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -5328,6 +5328,11 @@ If given value is outside of this range, the option 0 (top) is assummed. --> <integer name="config_letterboxDefaultPositionForTabletopModeReachability">0</integer> <!-- Whether should ignore app requested orientation in response to an app calling Activity#setRequestedOrientation. See LetterboxUiController#shouldIgnoreRequestedOrientation for details. --> <bool name="config_letterboxIsPolicyForIgnoringRequestedOrientationEnabled">false</bool> <!-- Whether displaying letterbox education is enabled for letterboxed fullscreen apps. --> <bool name="config_letterboxIsEducationEnabled">false</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -4457,6 +4457,7 @@ <java-symbol type="integer" name="config_letterboxDefaultPositionForVerticalReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForBookModeReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForTabletopModeReachability" /> <java-symbol type="bool" name="config_letterboxIsPolicyForIgnoringRequestedOrientationEnabled" /> <java-symbol type="bool" name="config_letterboxIsEducationEnabled" /> <java-symbol type="dimen" name="config_letterboxDefaultMinAspectRatioForUnresizableApps" /> <java-symbol type="bool" name="config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled" /> Loading Loading
core/java/android/content/pm/ActivityInfo.java +13 −0 Original line number Diff line number Diff line Loading @@ -1021,6 +1021,19 @@ public class ActivityInfo extends ComponentInfo implements Parcelable { @Retention(RetentionPolicy.SOURCE) public @interface SizeChangesSupportMode {} /** * This change id enables compat policy that ignores app requested orientation in * response to an app calling {@link android.app.Activity#setRequestedOrientation}. See * com.android.server.wm.LetterboxUiController#shouldIgnoreRequestedOrientation for * details. * @hide */ @ChangeId @Overridable @Disabled public static final long OVERRIDE_ENABLE_COMPAT_IGNORE_REQUESTED_ORIENTATION = 254631730L; // buganizer id /** * This change id forces the packages it is applied to never have Display API sandboxing * applied for a letterbox or SCM activity. The Display APIs will continue to provide Loading
core/java/android/view/WindowManager.java +39 −0 Original line number Diff line number Diff line Loading @@ -813,6 +813,45 @@ public interface WindowManager extends ViewManager { int SCREENSHOT_VENDOR_GESTURE = 6; } /** * Activity level {@link android.content.pm.PackageManager.Property PackageManager * .Property} for an app to inform the system that the activity can be opted-in or opted-out * from the compatibility treatment that avoids {@link * android.app.Activity#setRequestedOrientation} loops. The loop can be trigerred by * ignoreRequestedOrientation display setting enabled on the device or by the landscape natural * orientation of the device. * * <p>The treatment is disabled by default but device manufacturers can enable the treatment * using their discretion to improve display compatibility. * * <p>With this property set to {@code true}, the system could ignore {@link * android.app.Activity#setRequestedOrientation} call from an app if one of the following * conditions are true: * <ul> * <li>Activity is relaunching due to the previous {@link * android.app.Activity#setRequestedOrientation} call. * <li>Camera compatibility force rotation treatment is active for the package. * </ul> * * <p>Setting this property to {@code false} informs the system that the activity must be * opted-out from the compatibility treatment even if the device manufacturer has opted the app * into the treatment. * * <p><b>Syntax:</b> * <pre> * <activity> * <property * android:name="android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION" * android:value="true|false"/> * </activity> * </pre> * * @hide */ // TODO(b/263984287): Make this public API. String PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION = "android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION"; /** * @hide */ Loading
core/res/OWNERS +5 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,11 @@ toddke@google.com tsuji@google.com yamasani@google.com # WindowManager team # TODO(262451702): Move WindowManager configs out of config.xml in a separate file per-file core/res/res/values/config.xml = file:/services/core/java/com/android/server/wm/OWNERS per-file core/res/res/values/symbols.xml = file:/services/core/java/com/android/server/wm/OWNERS # Resources finalization per-file res/xml/public-staging.xml = file:/tools/aapt2/OWNERS per-file res/xml/public-final.xml = file:/tools/aapt2/OWNERS Loading
core/res/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -5328,6 +5328,11 @@ If given value is outside of this range, the option 0 (top) is assummed. --> <integer name="config_letterboxDefaultPositionForTabletopModeReachability">0</integer> <!-- Whether should ignore app requested orientation in response to an app calling Activity#setRequestedOrientation. See LetterboxUiController#shouldIgnoreRequestedOrientation for details. --> <bool name="config_letterboxIsPolicyForIgnoringRequestedOrientationEnabled">false</bool> <!-- Whether displaying letterbox education is enabled for letterboxed fullscreen apps. --> <bool name="config_letterboxIsEducationEnabled">false</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -4457,6 +4457,7 @@ <java-symbol type="integer" name="config_letterboxDefaultPositionForVerticalReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForBookModeReachability" /> <java-symbol type="integer" name="config_letterboxDefaultPositionForTabletopModeReachability" /> <java-symbol type="bool" name="config_letterboxIsPolicyForIgnoringRequestedOrientationEnabled" /> <java-symbol type="bool" name="config_letterboxIsEducationEnabled" /> <java-symbol type="dimen" name="config_letterboxDefaultMinAspectRatioForUnresizableApps" /> <java-symbol type="bool" name="config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled" /> Loading