Merge "Avoid recursion for leaf task fragment in freeform mode" into main am: 30f6d64786

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2674876

Change-Id: Ifeff54f0984d5d34703a017035299308a3ecc062
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Chris Li
2023-07-26 01:44:12 +00:00
committed by Automerger Merge Worker

View File

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