From 1265095699e36fe31f60ba9e5d01eb519ca6b94e Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Tue, 12 Apr 2022 10:33:19 -0700 Subject: [PATCH] Don't include transient launches in visible-at-end tokens visible-at-end is supposed to track apps which are expected to be visible at the end of a transition. However, transient launches are temporary so their visibility is likely to change. Because of this, don't track them as visible-at-end so that their new visibility is actually committed. Bug: 226673164 Test: go to split, swipe to overview, restore split, check logs and make sure launcher has committed invisible. Change-Id: I8f38d266732ed1f6e8ab28647185e970e7abef04 --- services/core/java/com/android/server/wm/Transition.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java index 4d0dfe2086f0e..0bdc00b8b74d5 100644 --- a/services/core/java/com/android/server/wm/Transition.java +++ b/services/core/java/com/android/server/wm/Transition.java @@ -713,6 +713,9 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe for (int i = mParticipants.size() - 1; i >= 0; --i) { final WindowContainer wc = mParticipants.valueAt(i); if (wc.asWindowToken() == null || !wc.isVisibleRequested()) continue; + // don't include transient launches, though, since those are only temporarily visible. + if (mTransientLaunches != null && wc.asActivityRecord() != null + && mTransientLaunches.containsKey(wc.asActivityRecord())) continue; mVisibleAtTransitionEndTokens.add(wc.asWindowToken()); }