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

Commit 5aca2dbb authored by Tony Huang's avatar Tony Huang Committed by Automerger Merge Worker
Browse files

Merge "Remove the special logic of the divider bar z-ordering" into tm-qpr-dev...

Merge "Remove the special logic of the divider bar z-ordering" into tm-qpr-dev am: 4f8c3f08 am: 525db9b3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18320962



Change-Id: I4cfd1dd9599570aa7c6259352b7a041d9f0cfd18
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8c4836a4 525db9b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3367,7 +3367,7 @@ package android.window {
    method @NonNull public android.window.WindowContainerTransaction reparentTasks(@Nullable android.window.WindowContainerToken, @Nullable android.window.WindowContainerToken, @Nullable int[], @Nullable int[], boolean);
    method @NonNull public android.window.WindowContainerTransaction reparentTasks(@Nullable android.window.WindowContainerToken, @Nullable android.window.WindowContainerToken, @Nullable int[], @Nullable int[], boolean);
    method @NonNull public android.window.WindowContainerTransaction scheduleFinishEnterPip(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect);
    method @NonNull public android.window.WindowContainerTransaction scheduleFinishEnterPip(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect);
    method @NonNull public android.window.WindowContainerTransaction setActivityWindowingMode(@NonNull android.window.WindowContainerToken, int);
    method @NonNull public android.window.WindowContainerTransaction setActivityWindowingMode(@NonNull android.window.WindowContainerToken, int);
    method @NonNull public android.window.WindowContainerTransaction setAdjacentRoots(@NonNull android.window.WindowContainerToken, @NonNull android.window.WindowContainerToken, boolean);
    method @NonNull public android.window.WindowContainerTransaction setAdjacentRoots(@NonNull android.window.WindowContainerToken, @NonNull android.window.WindowContainerToken);
    method @NonNull public android.window.WindowContainerTransaction setAdjacentTaskFragments(@NonNull android.os.IBinder, @Nullable android.os.IBinder, @Nullable android.window.WindowContainerTransaction.TaskFragmentAdjacentParams);
    method @NonNull public android.window.WindowContainerTransaction setAdjacentTaskFragments(@NonNull android.os.IBinder, @Nullable android.os.IBinder, @Nullable android.window.WindowContainerTransaction.TaskFragmentAdjacentParams);
    method @NonNull public android.window.WindowContainerTransaction setAppBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect);
    method @NonNull public android.window.WindowContainerTransaction setAppBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect);
    method @NonNull public android.window.WindowContainerTransaction setBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect);
    method @NonNull public android.window.WindowContainerTransaction setBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect);
+0 −4
Original line number Original line Diff line number Diff line
@@ -237,10 +237,6 @@ public interface WindowManagerPolicyConstants {
     */
     */
    int LAYER_OFFSET_THUMBNAIL = WINDOW_LAYER_MULTIPLIER - 1;
    int LAYER_OFFSET_THUMBNAIL = WINDOW_LAYER_MULTIPLIER - 1;


    // TODO(b/207185041): Remove this divider workaround after we full remove leagacy split and
    //                    make app pair split only have single root then we can just attach the
    //                    divider to the single root task in shell.
    int SPLIT_DIVIDER_LAYER = TYPE_LAYER_MULTIPLIER * 3;
    int WATERMARK_LAYER = TYPE_LAYER_MULTIPLIER * 100;
    int WATERMARK_LAYER = TYPE_LAYER_MULTIPLIER * 100;
    int STRICT_MODE_LAYER = TYPE_LAYER_MULTIPLIER * 101;
    int STRICT_MODE_LAYER = TYPE_LAYER_MULTIPLIER * 101;
    int WINDOW_FREEZE_LAYER = TYPE_LAYER_MULTIPLIER * 200;
    int WINDOW_FREEZE_LAYER = TYPE_LAYER_MULTIPLIER * 200;
+4 −27
Original line number Original line Diff line number Diff line
@@ -384,12 +384,10 @@ public final class WindowContainerTransaction implements Parcelable {
     */
     */
    @NonNull
    @NonNull
    public WindowContainerTransaction setAdjacentRoots(
    public WindowContainerTransaction setAdjacentRoots(
            @NonNull WindowContainerToken root1, @NonNull WindowContainerToken root2,
            @NonNull WindowContainerToken root1, @NonNull WindowContainerToken root2) {
            boolean moveTogether) {
        mHierarchyOps.add(HierarchyOp.createForAdjacentRoots(
        mHierarchyOps.add(HierarchyOp.createForAdjacentRoots(
                root1.asBinder(),
                root1.asBinder(),
                root2.asBinder(),
                root2.asBinder()));
                moveTogether));
        return this;
        return this;
    }
    }


@@ -1106,9 +1104,6 @@ public final class WindowContainerTransaction implements Parcelable {


        private boolean mReparentTopOnly;
        private boolean mReparentTopOnly;


        // TODO(b/207185041): Remove this once having a single-top root for split screen.
        private boolean mMoveAdjacentTogether;

        @Nullable
        @Nullable
        private int[]  mWindowingModes;
        private int[]  mWindowingModes;


@@ -1171,12 +1166,10 @@ public final class WindowContainerTransaction implements Parcelable {
        }
        }


        /** Create a hierarchy op for setting adjacent root tasks. */
        /** Create a hierarchy op for setting adjacent root tasks. */
        public static HierarchyOp createForAdjacentRoots(IBinder root1, IBinder root2,
        public static HierarchyOp createForAdjacentRoots(IBinder root1, IBinder root2) {
                boolean moveTogether) {
            return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS)
            return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS)
                    .setContainer(root1)
                    .setContainer(root1)
                    .setReparentContainer(root2)
                    .setReparentContainer(root2)
                    .setMoveAdjacentTogether(moveTogether)
                    .build();
                    .build();
        }
        }


@@ -1223,7 +1216,6 @@ public final class WindowContainerTransaction implements Parcelable {
            mInsetsProviderFrame = copy.mInsetsProviderFrame;
            mInsetsProviderFrame = copy.mInsetsProviderFrame;
            mToTop = copy.mToTop;
            mToTop = copy.mToTop;
            mReparentTopOnly = copy.mReparentTopOnly;
            mReparentTopOnly = copy.mReparentTopOnly;
            mMoveAdjacentTogether = copy.mMoveAdjacentTogether;
            mWindowingModes = copy.mWindowingModes;
            mWindowingModes = copy.mWindowingModes;
            mActivityTypes = copy.mActivityTypes;
            mActivityTypes = copy.mActivityTypes;
            mLaunchOptions = copy.mLaunchOptions;
            mLaunchOptions = copy.mLaunchOptions;
@@ -1245,7 +1237,6 @@ public final class WindowContainerTransaction implements Parcelable {
            }
            }
            mToTop = in.readBoolean();
            mToTop = in.readBoolean();
            mReparentTopOnly = in.readBoolean();
            mReparentTopOnly = in.readBoolean();
            mMoveAdjacentTogether = in.readBoolean();
            mWindowingModes = in.createIntArray();
            mWindowingModes = in.createIntArray();
            mActivityTypes = in.createIntArray();
            mActivityTypes = in.createIntArray();
            mLaunchOptions = in.readBundle();
            mLaunchOptions = in.readBundle();
@@ -1300,10 +1291,6 @@ public final class WindowContainerTransaction implements Parcelable {
            return mReparentTopOnly;
            return mReparentTopOnly;
        }
        }


        public boolean getMoveAdjacentTogether() {
            return mMoveAdjacentTogether;
        }

        public int[] getWindowingModes() {
        public int[] getWindowingModes() {
            return mWindowingModes;
            return mWindowingModes;
        }
        }
@@ -1356,8 +1343,7 @@ public final class WindowContainerTransaction implements Parcelable {
                    return "{reorder: " + mContainer + " to " + (mToTop ? "top" : "bottom") + "}";
                    return "{reorder: " + mContainer + " to " + (mToTop ? "top" : "bottom") + "}";
                case HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS:
                case HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS:
                    return "{SetAdjacentRoot: container=" + mContainer
                    return "{SetAdjacentRoot: container=" + mContainer
                            + " adjacentRoot=" + mReparent + " mMoveAdjacentTogether="
                            + " adjacentRoot=" + mReparent + "}";
                            + mMoveAdjacentTogether + "}";
                case HIERARCHY_OP_TYPE_LAUNCH_TASK:
                case HIERARCHY_OP_TYPE_LAUNCH_TASK:
                    return "{LaunchTask: " + mLaunchOptions + "}";
                    return "{LaunchTask: " + mLaunchOptions + "}";
                case HIERARCHY_OP_TYPE_SET_LAUNCH_ADJACENT_FLAG_ROOT:
                case HIERARCHY_OP_TYPE_SET_LAUNCH_ADJACENT_FLAG_ROOT:
@@ -1413,7 +1399,6 @@ public final class WindowContainerTransaction implements Parcelable {
            }
            }
            dest.writeBoolean(mToTop);
            dest.writeBoolean(mToTop);
            dest.writeBoolean(mReparentTopOnly);
            dest.writeBoolean(mReparentTopOnly);
            dest.writeBoolean(mMoveAdjacentTogether);
            dest.writeIntArray(mWindowingModes);
            dest.writeIntArray(mWindowingModes);
            dest.writeIntArray(mActivityTypes);
            dest.writeIntArray(mActivityTypes);
            dest.writeBundle(mLaunchOptions);
            dest.writeBundle(mLaunchOptions);
@@ -1458,8 +1443,6 @@ public final class WindowContainerTransaction implements Parcelable {


            private boolean mReparentTopOnly;
            private boolean mReparentTopOnly;


            private boolean mMoveAdjacentTogether;

            @Nullable
            @Nullable
            private int[]  mWindowingModes;
            private int[]  mWindowingModes;


@@ -1515,11 +1498,6 @@ public final class WindowContainerTransaction implements Parcelable {
                return this;
                return this;
            }
            }


            Builder setMoveAdjacentTogether(boolean moveAdjacentTogether) {
                mMoveAdjacentTogether = moveAdjacentTogether;
                return this;
            }

            Builder setWindowingModes(@Nullable int[] windowingModes) {
            Builder setWindowingModes(@Nullable int[] windowingModes) {
                mWindowingModes = windowingModes;
                mWindowingModes = windowingModes;
                return this;
                return this;
@@ -1570,7 +1548,6 @@ public final class WindowContainerTransaction implements Parcelable {
                hierarchyOp.mInsetsProviderFrame = mInsetsProviderFrame;
                hierarchyOp.mInsetsProviderFrame = mInsetsProviderFrame;
                hierarchyOp.mToTop = mToTop;
                hierarchyOp.mToTop = mToTop;
                hierarchyOp.mReparentTopOnly = mReparentTopOnly;
                hierarchyOp.mReparentTopOnly = mReparentTopOnly;
                hierarchyOp.mMoveAdjacentTogether = mMoveAdjacentTogether;
                hierarchyOp.mLaunchOptions = mLaunchOptions;
                hierarchyOp.mLaunchOptions = mLaunchOptions;
                hierarchyOp.mActivityIntent = mActivityIntent;
                hierarchyOp.mActivityIntent = mActivityIntent;
                hierarchyOp.mPendingIntent = mPendingIntent;
                hierarchyOp.mPendingIntent = mPendingIntent;
+1 −2
Original line number Original line Diff line number Diff line
@@ -1025,8 +1025,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        wct.reparent(mMainStage.mRootTaskInfo.token, mRootTaskInfo.token, true);
        wct.reparent(mMainStage.mRootTaskInfo.token, mRootTaskInfo.token, true);
        wct.reparent(mSideStage.mRootTaskInfo.token, mRootTaskInfo.token, true);
        wct.reparent(mSideStage.mRootTaskInfo.token, mRootTaskInfo.token, true);
        // Make the stages adjacent to each other so they occlude what's behind them.
        // Make the stages adjacent to each other so they occlude what's behind them.
        wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token,
        wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token);
                true /* moveTogether */);
        wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token);
        wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token);
        mTaskOrganizer.applyTransaction(wct);
        mTaskOrganizer.applyTransaction(wct);
    }
    }
+1 −11
Original line number Original line Diff line number Diff line
@@ -4567,22 +4567,12 @@ class Task extends TaskFragment {
        moveToFront(reason, null);
        moveToFront(reason, null);
    }
    }


    void moveToFront(String reason, Task task) {
        if (mMoveAdjacentTogether && getAdjacentTaskFragment() != null) {
            final Task adjacentTask = getAdjacentTaskFragment().asTask();
            if (adjacentTask != null) {
                adjacentTask.moveToFrontInner(reason + " adjacentTaskToTop", null /* task */);
            }
        }
        moveToFrontInner(reason, task);
    }

    /**
    /**
     * @param reason The reason for moving the root task to the front.
     * @param reason The reason for moving the root task to the front.
     * @param task If non-null, the task will be moved to the top of the root task.
     * @param task If non-null, the task will be moved to the top of the root task.
     */
     */
    @VisibleForTesting
    @VisibleForTesting
    void moveToFrontInner(String reason, Task task) {
    void moveToFront(String reason, Task task) {
        if (!isAttached()) {
        if (!isAttached()) {
            return;
            return;
        }
        }
Loading