diff options
author | 2021-05-03 15:43:11 +0000 | |
---|---|---|
committer | 2021-05-03 15:43:11 +0000 | |
commit | 52e3d9a45e151cb502bd71fac7540d69739345f7 (patch) | |
tree | 9e11e6b16ee3ef11f1610125f0defce4c6d03244 | |
parent | 1d92fd8123416adb447db3082431617c544de547 (diff) | |
parent | ead969a489f92b41ed0abf71ff0b8d84b181dbf9 (diff) |
Merge "Make sure tasks below home task is invisible while in split" into sc-dev
-rw-r--r-- | services/core/java/com/android/server/wm/Task.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 7c95edd24718..9aabdac58f69 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -4315,11 +4315,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)) { |