Allowing activity visible behind translucent adjacent TaskFragments

An activity that behind the adjacent TaskFragments were invisible
regardless if the TaskFragments are translucent or not.

Allowing the activity to be visible in that case, just like a
TaskFragment can be visible while it is behind translucent
adjacent TaskFragments.

Bug: 203086979
Test: atest SplitActivityLifecycleTest
Change-Id: Ib487940778c856e2dd916376e98940fa17ee9012
This commit is contained in:
Louis Chang
2021-10-27 17:16:34 +08:00
parent 5170817dea
commit a4bf8c8410

View File

@@ -119,8 +119,12 @@ class EnsureActivitiesVisibleHelper {
if (adjacentTaskFragments != null && adjacentTaskFragments.contains(
childTaskFragment)) {
// Everything behind two adjacent TaskFragments are occluded.
mBehindFullyOccludedContainer = true;
if (!childTaskFragment.isTranslucent(starting)
&& !childTaskFragment.getAdjacentTaskFragment().isTranslucent(
starting)) {
// Everything behind two adjacent TaskFragments are occluded.
mBehindFullyOccludedContainer = true;
}
continue;
}