Merge "Dispatch taskInfoChanged after the app transition is finished." into sc-v2-dev am: 763d7172c0

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

Change-Id: I0dcbac7aa73ec6c7ce2be63bdfbf34f59524bf11
This commit is contained in:
Yuncheol Heo
2021-09-02 00:49:30 +00:00
committed by Automerger Merge Worker

View File

@@ -4900,6 +4900,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// getting visible so we also wait for them.
forAllWindows(mWmService::makeWindowFreezingScreenIfNeededLocked, true);
}
// dispatchTaskInfoChangedIfNeeded() right after ActivityRecord#setVisibility() can report
// the stale visible state, because the state will be updated after the app transition.
// So tries to report the actual visible state again where the state is changed.
if (task != null) task.dispatchTaskInfoChangedIfNeeded(false /* force */);
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS,
"commitVisibility: %s: visible=%b mVisibleRequested=%b", this,
isVisible(), mVisibleRequested);