Finish converting tile usage to task-org
Right now, there are situations where WM and task-org are fighting
over surface positioning. Most notably this was visible when starting
the first minimized task.
This finishes making the tiles (root tasks) be de-facto task-org'd
tasks. This improves a lot of glitchiness in split-screen.
Bug: 149952263
Bug: 150954849
Test: launch an app into split-screen primary and notice that it
glitches less.
Change-Id: I727da6cf6c9b887cb698fe1b764f3835d566dec1
This commit is contained in:
@@ -649,14 +649,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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3970,12 +3970,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
|
||||
|
||||
Reference in New Issue
Block a user