Make sure tasks below home task is invisible while in split

While in split mode, home task will be reparented to the secondary split
and leaving tasks not supporting split below. Because TaskDisplayArea
always adjusts home surface layer to the bottom, this makes sure those
tasks below home is invisible and won't occlude home task unexpectedly.

Fix: 185872271
Fix: 159767867
Test: dock translucent task to split primary while having task not
supporting split in recent, recent app won't be occluded.

Change-Id: Ie110ea302a0ec646b6c39f68606b31cd4c26697e
This commit is contained in:
Jerry Chang
2021-04-28 01:18:40 +08:00
parent f941b5a2f4
commit ead969a489

View File

@@ -4298,11 +4298,21 @@ class Task extends WindowContainer<WindowContainer> {
// the screen are opaque.
return TASK_VISIBILITY_INVISIBLE;
}
if (isAssistantType && gotRootSplitScreenTask) {
// Assistant stack can't be visible behind split-screen. In addition to this not
// making sense, it also works around an issue here we boost the z-order of the
// assistant window surfaces in window manager whenever it is visible.
return TASK_VISIBILITY_INVISIBLE;
if (gotRootSplitScreenTask) {
if (isAssistantType) {
// Assistant stack can't be visible behind split-screen. In addition to this not
// making sense, it also works around an issue here we boost the z-order of the
// assistant window surfaces in window manager whenever it is visible.
return TASK_VISIBILITY_INVISIBLE;
}
if (other.isHomeOrRecentsRootTask()) {
// While in split mode, home task will be reparented to the secondary split and
// leaving tasks not supporting split below. Due to
// TaskDisplayArea#assignRootTaskOrdering always adjusts home surface layer to
// the bottom, this makes sure those tasks below home is invisible and won't
// occlude home task unexpectedly.
return TASK_VISIBILITY_INVISIBLE;
}
}
if (other.mAdjacentTask != null) {
if (adjacentTasks.contains(other.mAdjacentTask)) {