Merge "Sync surface position for animation in core" into tm-qpr-dev

This commit is contained in:
Riddle Hsu
2022-07-07 09:14:44 +00:00
committed by Android (Google) Code Review

View File

@@ -3216,6 +3216,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
void resetSurfacePositionForAnimationLeash(Transaction t) { void resetSurfacePositionForAnimationLeash(Transaction t) {
t.setPosition(mSurfaceControl, 0, 0); t.setPosition(mSurfaceControl, 0, 0);
if (mSyncState != SYNC_STATE_NONE && t != mSyncTransaction) {
// Avoid restoring to old position if the sync transaction is applied later.
mSyncTransaction.setPosition(mSurfaceControl, 0, 0);
}
mLastSurfacePosition.set(0, 0); mLastSurfacePosition.set(0, 0);
} }