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

Commit ba592a2d authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Finish converting tile usage to task-org" into rvc-dev

parents d2d3e4d9 9032b8d9
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -647,14 +647,6 @@ class ActivityStack extends Task {

        if (prevWindowingMode != getWindowingMode()) {
            mDisplayContent.onStackWindowingModeChanged(this);

            if (inSplitScreenSecondaryWindowingMode()) {
                // When the stack is resized due to entering split screen secondary, offset the
                // windows to compensate for the new stack position.
                forAllWindows(w -> {
                    w.mWinAnimator.setOffsetPositionForStackResize(true);
                }, true);
            }
        }

        final DisplayContent display = getDisplay();
@@ -3883,9 +3875,10 @@ class ActivityStack extends Task {
            return;
        }
        if (mTile != null) {
            reparentSurfaceControl(getPendingTransaction(), mTile.getSurfaceControl());
            // don't use reparentSurfaceControl because we need to bypass taskorg check
            mSurfaceAnimator.reparent(getPendingTransaction(), mTile.getSurfaceControl());
        } else if (mTile == null && origTile != null) {
            reparentSurfaceControl(getPendingTransaction(), getParentSurfaceControl());
            mSurfaceAnimator.reparent(getPendingTransaction(), getParentSurfaceControl());
        }
    }

+6 −6
Original line number Diff line number Diff line
@@ -3971,12 +3971,12 @@ class Task extends WindowContainer<WindowContainer> {

    boolean isControlledByTaskOrganizer() {
        final Task rootTask = getRootTask();
        return rootTask == this && rootTask.mTaskOrganizer != null
                // TODO(task-hierarchy): Figure out how to control nested tasks.
                // For now, if this is in a tile let WM drive.
                && !(rootTask instanceof TaskTile)
                && !(rootTask instanceof ActivityStack
                        && ((ActivityStack) rootTask).getTile() != null);
        // if the rootTask is a "child" of a tile, then don't consider it a root task.
        // TODO: remove this along with removing tile.
        if (((ActivityStack) rootTask).getTile() != null) {
            return false;
        }
        return rootTask == this && rootTask.mTaskOrganizer != null;
    }

    @Override