Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4686865e authored by Kenneth Ford's avatar Kenneth Ford Committed by Android (Google) Code Review
Browse files

Merge "Adds PROPERTY_COMPAT_ALLOW_SMALL_COVER_SCREEN" into main

parents 894f417b 7c988fe3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -54454,6 +54454,7 @@ package android.view {
    method @FlaggedApi("com.android.window.flags.surface_control_input_receiver") public default boolean transferTouchGesture(@NonNull android.window.InputTransferToken, @NonNull android.window.InputTransferToken);
    method @FlaggedApi("com.android.window.flags.surface_control_input_receiver") public default void unregisterSurfaceControlInputReceiver(@NonNull android.view.SurfaceControl);
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") public default void unregisterTrustedPresentationListener(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    field @FlaggedApi("com.android.window.flags.cover_display_opt_in") public static final int COMPAT_SMALL_COVER_SCREEN_OPT_IN = 1; // 0x1
    field public static final String PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE = "android.window.PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE";
    field public static final String PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED = "android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED";
    field @FlaggedApi("com.android.window.flags.untrusted_embedding_state_sharing") public static final String PROPERTY_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING_STATE_SHARING = "android.window.PROPERTY_ALLOW_UNTRUSTED_ACTIVITY_EMBEDDING_STATE_SHARING";
@@ -54466,6 +54467,7 @@ package android.view {
    field public static final String PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE = "android.window.PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE";
    field @FlaggedApi("com.android.window.flags.app_compat_properties_api") public static final String PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES = "android.window.PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES";
    field public static final String PROPERTY_COMPAT_ALLOW_SANDBOXING_VIEW_BOUNDS_APIS = "android.window.PROPERTY_COMPAT_ALLOW_SANDBOXING_VIEW_BOUNDS_APIS";
    field @FlaggedApi("com.android.window.flags.cover_display_opt_in") public static final String PROPERTY_COMPAT_ALLOW_SMALL_COVER_SCREEN = "android.window.PROPERTY_COMPAT_ALLOW_SMALL_COVER_SCREEN";
    field @FlaggedApi("com.android.window.flags.app_compat_properties_api") public static final String PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE = "android.window.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE";
    field @FlaggedApi("com.android.window.flags.app_compat_properties_api") public static final String PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE = "android.window.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE";
    field public static final String PROPERTY_COMPAT_ENABLE_FAKE_FOCUS = "android.window.PROPERTY_COMPAT_ENABLE_FAKE_FOCUS";
+42 −0
Original line number Diff line number Diff line
@@ -1547,6 +1547,48 @@ public interface WindowManager extends ViewManager {
    public static final String PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI =
            "android.window.PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI";

    /**
     * Application or Activity level
     * {@link android.content.pm.PackageManager.Property PackageManager.Property} to provide any
     * preferences for showing all or specific Activities on small cover displays of foldable
     * style devices.
     *
     * <p>The only supported value for the property is {@link #COMPAT_SMALL_COVER_SCREEN_OPT_IN}.
     *
     * <p><b>Syntax:</b>
     * <pre>
     * &lt;application&gt;
     *   &lt;property
     *     android:name="android.window.PROPERTY_COMPAT_ALLOW_SMALL_COVER_SCREEN"
     *     android:value=1 <!-- COMPAT_COVER_SCREEN_OPT_IN -->/&gt;
     * &lt;/application&gt;
     * </pre>
     */
    @FlaggedApi(Flags.FLAG_COVER_DISPLAY_OPT_IN)
    String PROPERTY_COMPAT_ALLOW_SMALL_COVER_SCREEN =
            "android.window.PROPERTY_COMPAT_ALLOW_SMALL_COVER_SCREEN";

    /**
     * Value applicable for the {@link #PROPERTY_COMPAT_ALLOW_SMALL_COVER_SCREEN} property to
     * provide a signal to the system that an application or its specific activities explicitly
     * opt into being displayed on small foldable device cover screens that measure at least 1.5
     * inches for the shorter dimension and at least 2.4 inches for the longer dimension.
     */
    @CompatSmallScreenPolicy
    @FlaggedApi(Flags.FLAG_COVER_DISPLAY_OPT_IN)
    int COMPAT_SMALL_COVER_SCREEN_OPT_IN = 1;

    /**
     * @hide
     */
    @IntDef({
            COMPAT_SMALL_COVER_SCREEN_OPT_IN,
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface CompatSmallScreenPolicy {}



    /**
     * Request for app's keyboard shortcuts to be retrieved asynchronously.
     *
+8 −0
Original line number Diff line number Diff line
@@ -70,3 +70,11 @@ flag {
    description: "Refines embedded activity back navigation behavior"
    bug: "293642394"
}

flag {
    namespace: "windowing_sdk"
    name: "cover_display_opt_in"
    description: "Properties to allow apps and activities to opt-in to cover display rendering"
    bug: "312530526"
    is_fixed_read_only: true
}
 No newline at end of file