Merge "Clear mEnterTransitionCoordinator after content shows." into tm-qpr-dev am: 3d8c880d4c

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

Change-Id: I9e7d3374d4c8934099f57675a2b6b753bae52f74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-07-18 15:42:06 +00:00
committed by Automerger Merge Worker

View File

@@ -263,6 +263,11 @@ class ActivityTransitionState {
// After orientation change, the onResume can come in before the top Activity has
// left, so if the Activity is not top, wait a second for the top Activity to exit.
if (mEnterTransitionCoordinator == null || activity.isTopOfTask()) {
if (mEnterTransitionCoordinator != null) {
mEnterTransitionCoordinator.runAfterTransitionsComplete(() -> {
mEnterTransitionCoordinator = null;
});
}
restoreExitedViews();
restoreReenteringViews();
} else {
@@ -271,6 +276,11 @@ class ActivityTransitionState {
public void run() {
if (mEnterTransitionCoordinator == null ||
mEnterTransitionCoordinator.isWaitingForRemoteExit()) {
if (mEnterTransitionCoordinator != null) {
mEnterTransitionCoordinator.runAfterTransitionsComplete(() -> {
mEnterTransitionCoordinator = null;
});
}
restoreExitedViews();
restoreReenteringViews();
} else if (mEnterTransitionCoordinator.isReturning()) {