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

Commit ba6bf9da authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Remove WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY" into sc-dev

parents 0ec65b00 6d5082d3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -429,7 +429,6 @@ package android.app {
    field public static final int ROTATION_UNDEFINED = -1; // 0xffffffff
    field public static final int WINDOWING_MODE_FREEFORM = 5; // 0x5
    field public static final int WINDOWING_MODE_FULLSCREEN = 1; // 0x1
    field public static final int WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY = 4; // 0x4
    field public static final int WINDOWING_MODE_MULTI_WINDOW = 6; // 0x6
    field public static final int WINDOWING_MODE_PINNED = 2; // 0x2
    field public static final int WINDOWING_MODE_SPLIT_SCREEN_PRIMARY = 3; // 0x3
+1 −7
Original line number Diff line number Diff line
@@ -1447,13 +1447,7 @@ public class ActivityOptions {
    }

    /**
     * Sets the windowing mode the activity should launch into. If the input windowing mode is
     * {@link android.app.WindowConfiguration#WINDOWING_MODE_SPLIT_SCREEN_SECONDARY} and the device
     * isn't currently in split-screen windowing mode, then the activity will be launched in
     * {@link android.app.WindowConfiguration#WINDOWING_MODE_FULLSCREEN} windowing mode. For clarity
     * on this you can use
     * {@link android.app.WindowConfiguration#WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY}
     *
     * Sets the windowing mode the activity should launch into.
     * @hide
     */
    @TestApi
+0 −11
Original line number Diff line number Diff line
@@ -106,19 +106,9 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu
     * {@link ActivityOptions#setLaunchWindowingMode(int)} will be launched in
     * {@link #WINDOWING_MODE_FULLSCREEN} if the display isn't currently in split-screen windowing
     * mode
     * @see #WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY
     */
    // TODO: Remove once split-screen is migrated to wm-shell.
    public static final int WINDOWING_MODE_SPLIT_SCREEN_SECONDARY = 4;
    /**
     * Alias for {@link #WINDOWING_MODE_SPLIT_SCREEN_SECONDARY} that makes it clear that the usage
     * points for APIs like {@link ActivityOptions#setLaunchWindowingMode(int)} that the container
     * will launch into fullscreen or split-screen secondary depending on if the device is currently
     * in fullscreen mode or split-screen mode.
     */
    // TODO: Remove once split-screen is migrated to wm-shell.
    public static final int WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY =
            WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
    /** Can be freely resized within its parent container. */
    // TODO: Remove once freeform is migrated to wm-shell.
    public static final int WINDOWING_MODE_FREEFORM = 5;
@@ -133,7 +123,6 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu
            WINDOWING_MODE_PINNED,
            WINDOWING_MODE_SPLIT_SCREEN_PRIMARY,
            WINDOWING_MODE_SPLIT_SCREEN_SECONDARY,
            WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY,
            WINDOWING_MODE_FREEFORM,
    })
    public @interface WindowingMode {}
+0 −2
Original line number Diff line number Diff line
@@ -15,8 +15,6 @@
 */
package com.android.systemui.statusbar;

import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
+0 −12
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
@@ -2933,17 +2932,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
                        || rootTask.mCreatedByOrganizer) {
                    return rootTask;
                }
                if (windowingMode == WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY
                        && container.getRootSplitScreenPrimaryTask() == rootTask
                        && candidateTask == rootTask.getTopMostTask()) {
                    // This is a special case when we try to launch an activity that is currently on
                    // top of root split-screen primary task, but is targeting split-screen
                    // secondary.
                    // In this case we don't want to move it to another root task.
                    // TODO(b/78788972): Remove after differentiating between preferred and required
                    // launch options.
                    return rootTask;
                }
            }
        }

Loading