summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author tanxiaoyan <tanxiaoyan@xiaomi.com> 2023-07-25 16:09:45 +0800
committer tanxiaoyan <tanxiaoyan@xiaomi.com> 2023-07-25 20:19:45 +0800
commit7181301a2b2a6b43edcdc3d200f85a45060b0f97 (patch)
tree5e830a13a71461966a0de25282efc8d0552e3192
parente7627bd73223e4f20a49a92acf42f4275aaa8c5e (diff)
Avoid recursion for leaf task fragment in freeform mode
We should not traverse all leaf taskfragments when app create task fragment but is in freeform mode. Bug:292868273 Change-Id: I99aa05bf814009948e5ff8c58d1ebb26116c3b60 Signed-off-by: tanxiaoyan <tanxiaoyan@xiaomi.com>
-rw-r--r--services/core/java/com/android/server/wm/TaskFragment.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/services/core/java/com/android/server/wm/TaskFragment.java b/services/core/java/com/android/server/wm/TaskFragment.java
index d94716887247..15bc60c38b01 100644
--- a/services/core/java/com/android/server/wm/TaskFragment.java
+++ b/services/core/java/com/android/server/wm/TaskFragment.java
@@ -1089,21 +1089,13 @@ class TaskFragment extends WindowContainer<WindowContainer> {
}
final int otherWindowingMode = other.getWindowingMode();
- if (otherWindowingMode == WINDOWING_MODE_FULLSCREEN) {
- if (isTranslucent(other, starting)) {
- // Can be visible behind a translucent fullscreen TaskFragment.
- gotTranslucentFullscreen = true;
- continue;
- }
- return TASK_FRAGMENT_VISIBILITY_INVISIBLE;
- } else if (otherWindowingMode == WINDOWING_MODE_MULTI_WINDOW
- && other.matchParentBounds()) {
+ if (otherWindowingMode == WINDOWING_MODE_FULLSCREEN
+ || (otherWindowingMode != WINDOWING_MODE_PINNED && other.matchParentBounds())) {
if (isTranslucent(other, starting)) {
// Can be visible behind a translucent TaskFragment.
gotTranslucentFullscreen = true;
continue;
}
- // Multi-window TaskFragment that matches parent bounds would occlude other children
return TASK_FRAGMENT_VISIBILITY_INVISIBLE;
}