Exclude finishing ActivityRecord when checking overlay

Before, we kept the untrusted mode embedded activity hidden even if the
overlay is finishing, which will not include the visible change in
the CLOSE transition. Now, we exculde the finishing overlay so that the
embedded activity visibility will be updated in the CLOSE transition.

Bug: 207070762
Test: atest CtsWindowManagerDeviceTestCases:TaskFragmentTrustedModeTest
Change-Id: I0056c4881623732a1671175b12ff1908dd3bcff6
This commit is contained in:
Chris Li
2022-09-28 15:25:33 +08:00
parent d316c7d45c
commit 7a7d096bd3

View File

@@ -5812,8 +5812,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// in untrusted mode. Traverse bottom to top with boundary so that it will only check
// activities above this activity.
final ActivityRecord differentUidOverlayActivity = getTask().getActivity(
a -> a.getUid() != getUid(), this /* boundary */, false /* includeBoundary */,
false /* traverseTopToBottom */);
a -> !a.finishing && a.getUid() != getUid(), this /* boundary */,
false /* includeBoundary */, false /* traverseTopToBottom */);
return differentUidOverlayActivity != null;
}