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

This commit is contained in:
Evan Rosky
2020-03-10 15:56:39 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 16 deletions

View File

@@ -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());
}
}

View File

@@ -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