Loading core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3393,7 +3393,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 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 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 setAppBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect); method @NonNull public android.window.WindowContainerTransaction setBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect); Loading core/java/android/view/WindowManagerPolicyConstants.java +0 −4 Original line number Diff line number Diff line Loading @@ -237,10 +237,6 @@ public interface WindowManagerPolicyConstants { */ 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 STRICT_MODE_LAYER = TYPE_LAYER_MULTIPLIER * 101; int WINDOW_FREEZE_LAYER = TYPE_LAYER_MULTIPLIER * 200; Loading core/java/android/window/WindowContainerTransaction.java +4 −27 Original line number Diff line number Diff line Loading @@ -384,12 +384,10 @@ public final class WindowContainerTransaction implements Parcelable { */ @NonNull public WindowContainerTransaction setAdjacentRoots( @NonNull WindowContainerToken root1, @NonNull WindowContainerToken root2, boolean moveTogether) { @NonNull WindowContainerToken root1, @NonNull WindowContainerToken root2) { mHierarchyOps.add(HierarchyOp.createForAdjacentRoots( root1.asBinder(), root2.asBinder(), moveTogether)); root2.asBinder())); return this; } Loading Loading @@ -1106,9 +1104,6 @@ public final class WindowContainerTransaction implements Parcelable { private boolean mReparentTopOnly; // TODO(b/207185041): Remove this once having a single-top root for split screen. private boolean mMoveAdjacentTogether; @Nullable private int[] mWindowingModes; Loading Loading @@ -1171,12 +1166,10 @@ public final class WindowContainerTransaction implements Parcelable { } /** Create a hierarchy op for setting adjacent root tasks. */ public static HierarchyOp createForAdjacentRoots(IBinder root1, IBinder root2, boolean moveTogether) { public static HierarchyOp createForAdjacentRoots(IBinder root1, IBinder root2) { return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS) .setContainer(root1) .setReparentContainer(root2) .setMoveAdjacentTogether(moveTogether) .build(); } Loading Loading @@ -1223,7 +1216,6 @@ public final class WindowContainerTransaction implements Parcelable { mInsetsProviderFrame = copy.mInsetsProviderFrame; mToTop = copy.mToTop; mReparentTopOnly = copy.mReparentTopOnly; mMoveAdjacentTogether = copy.mMoveAdjacentTogether; mWindowingModes = copy.mWindowingModes; mActivityTypes = copy.mActivityTypes; mLaunchOptions = copy.mLaunchOptions; Loading @@ -1245,7 +1237,6 @@ public final class WindowContainerTransaction implements Parcelable { } mToTop = in.readBoolean(); mReparentTopOnly = in.readBoolean(); mMoveAdjacentTogether = in.readBoolean(); mWindowingModes = in.createIntArray(); mActivityTypes = in.createIntArray(); mLaunchOptions = in.readBundle(); Loading Loading @@ -1300,10 +1291,6 @@ public final class WindowContainerTransaction implements Parcelable { return mReparentTopOnly; } public boolean getMoveAdjacentTogether() { return mMoveAdjacentTogether; } public int[] getWindowingModes() { return mWindowingModes; } Loading Loading @@ -1356,8 +1343,7 @@ public final class WindowContainerTransaction implements Parcelable { return "{reorder: " + mContainer + " to " + (mToTop ? "top" : "bottom") + "}"; case HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS: return "{SetAdjacentRoot: container=" + mContainer + " adjacentRoot=" + mReparent + " mMoveAdjacentTogether=" + mMoveAdjacentTogether + "}"; + " adjacentRoot=" + mReparent + "}"; case HIERARCHY_OP_TYPE_LAUNCH_TASK: return "{LaunchTask: " + mLaunchOptions + "}"; case HIERARCHY_OP_TYPE_SET_LAUNCH_ADJACENT_FLAG_ROOT: Loading Loading @@ -1413,7 +1399,6 @@ public final class WindowContainerTransaction implements Parcelable { } dest.writeBoolean(mToTop); dest.writeBoolean(mReparentTopOnly); dest.writeBoolean(mMoveAdjacentTogether); dest.writeIntArray(mWindowingModes); dest.writeIntArray(mActivityTypes); dest.writeBundle(mLaunchOptions); Loading Loading @@ -1458,8 +1443,6 @@ public final class WindowContainerTransaction implements Parcelable { private boolean mReparentTopOnly; private boolean mMoveAdjacentTogether; @Nullable private int[] mWindowingModes; Loading Loading @@ -1515,11 +1498,6 @@ public final class WindowContainerTransaction implements Parcelable { return this; } Builder setMoveAdjacentTogether(boolean moveAdjacentTogether) { mMoveAdjacentTogether = moveAdjacentTogether; return this; } Builder setWindowingModes(@Nullable int[] windowingModes) { mWindowingModes = windowingModes; return this; Loading Loading @@ -1570,7 +1548,6 @@ public final class WindowContainerTransaction implements Parcelable { hierarchyOp.mInsetsProviderFrame = mInsetsProviderFrame; hierarchyOp.mToTop = mToTop; hierarchyOp.mReparentTopOnly = mReparentTopOnly; hierarchyOp.mMoveAdjacentTogether = mMoveAdjacentTogether; hierarchyOp.mLaunchOptions = mLaunchOptions; hierarchyOp.mActivityIntent = mActivityIntent; hierarchyOp.mPendingIntent = mPendingIntent; Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +1 −2 Original line number Diff line number Diff line Loading @@ -1025,8 +1025,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, wct.reparent(mMainStage.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. wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token, true /* moveTogether */); wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token); wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token); mTaskOrganizer.applyTransaction(wct); } Loading services/core/java/com/android/server/wm/Task.java +1 −11 Original line number Diff line number Diff line Loading @@ -4567,22 +4567,12 @@ class Task extends TaskFragment { 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 task If non-null, the task will be moved to the top of the root task. */ @VisibleForTesting void moveToFrontInner(String reason, Task task) { void moveToFront(String reason, Task task) { if (!isAttached()) { return; } Loading Loading
core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3393,7 +3393,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 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 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 setAppBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect); method @NonNull public android.window.WindowContainerTransaction setBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect); Loading
core/java/android/view/WindowManagerPolicyConstants.java +0 −4 Original line number Diff line number Diff line Loading @@ -237,10 +237,6 @@ public interface WindowManagerPolicyConstants { */ 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 STRICT_MODE_LAYER = TYPE_LAYER_MULTIPLIER * 101; int WINDOW_FREEZE_LAYER = TYPE_LAYER_MULTIPLIER * 200; Loading
core/java/android/window/WindowContainerTransaction.java +4 −27 Original line number Diff line number Diff line Loading @@ -384,12 +384,10 @@ public final class WindowContainerTransaction implements Parcelable { */ @NonNull public WindowContainerTransaction setAdjacentRoots( @NonNull WindowContainerToken root1, @NonNull WindowContainerToken root2, boolean moveTogether) { @NonNull WindowContainerToken root1, @NonNull WindowContainerToken root2) { mHierarchyOps.add(HierarchyOp.createForAdjacentRoots( root1.asBinder(), root2.asBinder(), moveTogether)); root2.asBinder())); return this; } Loading Loading @@ -1106,9 +1104,6 @@ public final class WindowContainerTransaction implements Parcelable { private boolean mReparentTopOnly; // TODO(b/207185041): Remove this once having a single-top root for split screen. private boolean mMoveAdjacentTogether; @Nullable private int[] mWindowingModes; Loading Loading @@ -1171,12 +1166,10 @@ public final class WindowContainerTransaction implements Parcelable { } /** Create a hierarchy op for setting adjacent root tasks. */ public static HierarchyOp createForAdjacentRoots(IBinder root1, IBinder root2, boolean moveTogether) { public static HierarchyOp createForAdjacentRoots(IBinder root1, IBinder root2) { return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS) .setContainer(root1) .setReparentContainer(root2) .setMoveAdjacentTogether(moveTogether) .build(); } Loading Loading @@ -1223,7 +1216,6 @@ public final class WindowContainerTransaction implements Parcelable { mInsetsProviderFrame = copy.mInsetsProviderFrame; mToTop = copy.mToTop; mReparentTopOnly = copy.mReparentTopOnly; mMoveAdjacentTogether = copy.mMoveAdjacentTogether; mWindowingModes = copy.mWindowingModes; mActivityTypes = copy.mActivityTypes; mLaunchOptions = copy.mLaunchOptions; Loading @@ -1245,7 +1237,6 @@ public final class WindowContainerTransaction implements Parcelable { } mToTop = in.readBoolean(); mReparentTopOnly = in.readBoolean(); mMoveAdjacentTogether = in.readBoolean(); mWindowingModes = in.createIntArray(); mActivityTypes = in.createIntArray(); mLaunchOptions = in.readBundle(); Loading Loading @@ -1300,10 +1291,6 @@ public final class WindowContainerTransaction implements Parcelable { return mReparentTopOnly; } public boolean getMoveAdjacentTogether() { return mMoveAdjacentTogether; } public int[] getWindowingModes() { return mWindowingModes; } Loading Loading @@ -1356,8 +1343,7 @@ public final class WindowContainerTransaction implements Parcelable { return "{reorder: " + mContainer + " to " + (mToTop ? "top" : "bottom") + "}"; case HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS: return "{SetAdjacentRoot: container=" + mContainer + " adjacentRoot=" + mReparent + " mMoveAdjacentTogether=" + mMoveAdjacentTogether + "}"; + " adjacentRoot=" + mReparent + "}"; case HIERARCHY_OP_TYPE_LAUNCH_TASK: return "{LaunchTask: " + mLaunchOptions + "}"; case HIERARCHY_OP_TYPE_SET_LAUNCH_ADJACENT_FLAG_ROOT: Loading Loading @@ -1413,7 +1399,6 @@ public final class WindowContainerTransaction implements Parcelable { } dest.writeBoolean(mToTop); dest.writeBoolean(mReparentTopOnly); dest.writeBoolean(mMoveAdjacentTogether); dest.writeIntArray(mWindowingModes); dest.writeIntArray(mActivityTypes); dest.writeBundle(mLaunchOptions); Loading Loading @@ -1458,8 +1443,6 @@ public final class WindowContainerTransaction implements Parcelable { private boolean mReparentTopOnly; private boolean mMoveAdjacentTogether; @Nullable private int[] mWindowingModes; Loading Loading @@ -1515,11 +1498,6 @@ public final class WindowContainerTransaction implements Parcelable { return this; } Builder setMoveAdjacentTogether(boolean moveAdjacentTogether) { mMoveAdjacentTogether = moveAdjacentTogether; return this; } Builder setWindowingModes(@Nullable int[] windowingModes) { mWindowingModes = windowingModes; return this; Loading Loading @@ -1570,7 +1548,6 @@ public final class WindowContainerTransaction implements Parcelable { hierarchyOp.mInsetsProviderFrame = mInsetsProviderFrame; hierarchyOp.mToTop = mToTop; hierarchyOp.mReparentTopOnly = mReparentTopOnly; hierarchyOp.mMoveAdjacentTogether = mMoveAdjacentTogether; hierarchyOp.mLaunchOptions = mLaunchOptions; hierarchyOp.mActivityIntent = mActivityIntent; hierarchyOp.mPendingIntent = mPendingIntent; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +1 −2 Original line number Diff line number Diff line Loading @@ -1025,8 +1025,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, wct.reparent(mMainStage.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. wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token, true /* moveTogether */); wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token); wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token); mTaskOrganizer.applyTransaction(wct); } Loading
services/core/java/com/android/server/wm/Task.java +1 −11 Original line number Diff line number Diff line Loading @@ -4567,22 +4567,12 @@ class Task extends TaskFragment { 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 task If non-null, the task will be moved to the top of the root task. */ @VisibleForTesting void moveToFrontInner(String reason, Task task) { void moveToFront(String reason, Task task) { if (!isAttached()) { return; } Loading