diff --git a/core/api/current.txt b/core/api/current.txt index 93bbd8267d25f..805435a757d15 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -51539,6 +51539,7 @@ package android.view { method public default boolean isCrossWindowBlurEnabled(); method public default void removeCrossWindowBlurEnabledListener(@NonNull java.util.function.Consumer); method public void removeViewImmediate(android.view.View); + field public static final String PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE = "android.window.PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE"; } public static class WindowManager.BadTokenException extends java.lang.RuntimeException { diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 13ea7af7a623e..b8808eebee8e5 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -819,6 +819,33 @@ public interface WindowManager extends ViewManager { */ public static final String PARCEL_KEY_SHORTCUTS_ARRAY = "shortcuts_array"; + /** + * Application level {@link android.content.pm.PackageManager.Property} tag for developers to + * provide consent for their app to allow OEMs to manually provide ActivityEmbedding split + * rule configuration on behalf of the app. + * + *

If {@code true}, the system CAN override the windowing behaviors for the app, such as + * showing some activities side-by-side. In this case, it will report that ActivityEmbedding + * APIs are disabled for the app to avoid conflict. + * + *

If {@code false}, the system MUST NOT override the window behavior for the app. It should + * be used if the app wants to provide their own ActivityEmbedding split rules, or if the app + * wants to opt-out of system overrides for any other reason. + * + *

Default is {@code false}. + * + *

Example usage: + *

+     * <application>
+     *   <property
+     *     android:name="android.window.PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE"
+     *     android:value="true|false"/>
+     * </application>
+     * 
+ */ + String PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE = + "android.window.PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE"; + /** * Request for keyboard shortcuts to be retrieved asynchronously. *