Merge "Sync surface position for legacy app transition animation" into tm-qpr-dev
This commit is contained in:
@@ -2336,6 +2336,11 @@ class TaskFragment extends WindowContainer<WindowContainer> {
|
|||||||
if (mTaskFragmentOrganizer != null
|
if (mTaskFragmentOrganizer != null
|
||||||
&& (mLastSurfaceSize.x != 0 || mLastSurfaceSize.y != 0)) {
|
&& (mLastSurfaceSize.x != 0 || mLastSurfaceSize.y != 0)) {
|
||||||
t.setWindowCrop(mSurfaceControl, 0, 0);
|
t.setWindowCrop(mSurfaceControl, 0, 0);
|
||||||
|
final SurfaceControl.Transaction syncTransaction = getSyncTransaction();
|
||||||
|
if (t != syncTransaction) {
|
||||||
|
// Avoid restoring to old window crop if the sync transaction is applied later.
|
||||||
|
syncTransaction.setWindowCrop(mSurfaceControl, 0, 0);
|
||||||
|
}
|
||||||
mLastSurfaceSize.set(0, 0);
|
mLastSurfaceSize.set(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3271,9 +3271,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) {
|
final SurfaceControl.Transaction syncTransaction = getSyncTransaction();
|
||||||
|
if (t != syncTransaction) {
|
||||||
// Avoid restoring to old position if the sync transaction is applied later.
|
// Avoid restoring to old position if the sync transaction is applied later.
|
||||||
mSyncTransaction.setPosition(mSurfaceControl, 0, 0);
|
syncTransaction.setPosition(mSurfaceControl, 0, 0);
|
||||||
}
|
}
|
||||||
mLastSurfacePosition.set(0, 0);
|
mLastSurfacePosition.set(0, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user