Fix crash/flicker with taskbar when canceling drag and drop am: 729eb8458b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17776925

Change-Id: I4aaa28e1aa1a097b1484cc3c18d572e7f94c78e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Mady Mellor
2022-04-15 23:15:32 +00:00
committed by Automerger Merge Worker
@@ -477,7 +477,6 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im
tx.setScale(dragSurface, scale, scale);
tx.setAlpha(dragSurface, alpha);
tx.apply();
tx.close();
}
});
mReturnAnimator.addListener(new AnimatorListenerAdapter() {
@@ -498,6 +497,7 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im
}
private void cleanUpSurface() {
tx.close();
maybeOnDragEnd();
// Synchronize removing the drag surface with the next draw after calling
// maybeOnDragEnd()
@@ -508,7 +508,6 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im
syncer.addToSync(syncId, viewRoot.getView());
syncer.addTransactionToSync(syncId, transaction);
syncer.markSyncReady(syncId);
mReturnAnimator = null;
}
});