Reland: Dispatch TaskOrg events before finishing surface placement

This ensures that calls to ITaskOrganizer.onTaskInfoChanged
are sent before an IWindowContainterTransactionCallback is
called back.

Bug: 178535312
Test: verified dispatching of task info changes happens before
onTransactionReady is called back
Test: exit PIP animation uses updated source rect hint in its
animation

Change-Id: I972f428b90899fbbf9ff428db82ba1d2c25ebcc4
This commit is contained in:
jorgegil@google.com
2021-02-08 16:23:39 -08:00
parent 7b3c0ef390
commit e35d411c50

View File

@@ -851,6 +851,8 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
mWmService.openSurfaceTransaction();
try {
applySurfaceChangesTransaction();
// Send any pending task-info changes that were queued-up during a layout deferment
mWmService.mAtmService.mTaskOrganizerController.dispatchPendingEvents();
mWmService.mSyncEngine.onSurfacePlacement();
} catch (RuntimeException e) {
Slog.wtf(TAG, "Unhandled exception in Window Manager", e);
@@ -863,8 +865,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
}
}
// Send any pending task-info changes that were queued-up during a layout deferment
mWmService.mAtmService.mTaskOrganizerController.dispatchPendingEvents();
mWmService.mAnimator.executeAfterPrepareSurfacesRunnables();
checkAppTransitionReady(surfacePlacer);