Merge "Mark display ready when it loses active child" into tm-qpr-dev am: d4dc599bf4

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

Change-Id: I6a933e4e18211ff05a455f72091a89b064d1bddb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Evan Rosky
2022-07-08 01:02:26 +00:00
committed by Automerger Merge Worker

View File

@@ -3760,6 +3760,15 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
* hierarchy change implies a configuration change.
*/
private void onSyncReparent(WindowContainer oldParent, WindowContainer newParent) {
// Check if this is changing displays. If so, mark the old display as "ready" for
// transitions. This is to work around the problem where setting readiness against this
// container will only set the new display as ready and leave the old display as unready.
if (mSyncState != SYNC_STATE_NONE && oldParent != null
&& oldParent.getDisplayContent() != null && (newParent == null
|| oldParent.getDisplayContent() != newParent.getDisplayContent())) {
mTransitionController.setReady(oldParent.getDisplayContent());
}
if (newParent == null || newParent.mSyncState == SYNC_STATE_NONE) {
if (mSyncState == SYNC_STATE_NONE) {
return;