From 7a7d096bd37f51cbc7618cdfc2eb72b5a2975515 Mon Sep 17 00:00:00 2001 From: Chris Li Date: Wed, 28 Sep 2022 15:25:33 +0800 Subject: [PATCH] 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 --- services/core/java/com/android/server/wm/ActivityRecord.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index b8486e7aa2b47..1f43fd5d8b4a1 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -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; }