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

Commit 8e8fd8be authored by Winson Chung's avatar Winson Chung
Browse files

Add property for apps to request support for showing multi-instance entry points

- Currently, this is controlled by an allow-list, but we want to ensure
  that all apps can request to be launched in multiple instances in
  cases where SystemUI desires

Bug: 262864589
Test: atest WMShellUnitTests
Change-Id: I3d30132ddb3613560d4a8ecb28d4ea41aac9fe3b
parent c4a0eca0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -53961,6 +53961,7 @@ package android.view {
    field public static final String PROPERTY_COMPAT_ALLOW_SANDBOXING_VIEW_BOUNDS_APIS = "android.window.PROPERTY_COMPAT_ALLOW_SANDBOXING_VIEW_BOUNDS_APIS";
    field public static final String PROPERTY_COMPAT_ENABLE_FAKE_FOCUS = "android.window.PROPERTY_COMPAT_ENABLE_FAKE_FOCUS";
    field public static final String PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION = "android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION";
    field @FlaggedApi("com.android.window.flags.supports_multi_instance_system_ui") public static final String PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI = "android.window.PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI";
  }
  public static class WindowManager.BadTokenException extends java.lang.RuntimeException {
+24 −0
Original line number Diff line number Diff line
@@ -1496,6 +1496,30 @@ public interface WindowManager extends ViewManager {
    String PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED =
            "android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED";

    /**
     * Activity or Application level {@link android.content.pm.PackageManager.Property
     * PackageManager.Property} for an app to declare that System UI should be shown for this
     * app/component to allow it to be launched as multiple instances.  This property only affects
     * SystemUI behavior and does _not_ affect whether a component can actually be launched into
     * multiple instances, which is determined by the Activity's {@code launchMode} or the launching
     * Intent's flags.  If the property is set on the Application, then all components within that
     * application will use that value unless specified per component.
     *
     * The value must be a boolean string.
     *
     * <p><b>Syntax:</b>
     * <pre>
     * &lt;activity&gt;
     *   &lt;property
     *     android:name="android.window.PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI"
     *     android:value="true|false"/&gt;
     * &lt;/activity&gt;
     * </pre>
     */
    @FlaggedApi(Flags.FLAG_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI)
    public static final String PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI =
            "android.window.PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI";

    /**
     * Request for app's keyboard shortcuts to be retrieved asynchronously.
     *
+8 −0
Original line number Diff line number Diff line
@@ -75,3 +75,11 @@ flag {
    bug: "259497289"
    is_fixed_read_only: true
}

flag {
    name: "supports_multi_instance_system_ui"
    namespace: "multitasking"
    description: "Feature flag to enable a multi-instance system ui component property."
    bug: "262864589"
    is_fixed_read_only: true
}
 No newline at end of file