Fix crash/flicker with taskbar when canceling drag and drop
The surfaceControl transaction is performed more than once so close
the transaction at the end of the animation.
Test: manual - start a drag from taskbar into split and then pull it
back so that it doesn't complete
=> ensure taskbar doesn't flicker / no crash in logs
Bug: 228006271
Change-Id: I38c8efe310596bbbbf09f361c266a7fefc1b2eea
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user