Fix drag shadow does not render on screen when perform drag (1/2)
The drag shadow had been drawn in app process, we have to call
`DragState.updateDragSufraceLocked` so it could update the current
location and apply drag state's transaction directly.
Bug: 217279780
Test: atest DragDropTest
Change-Id: I97e74252e98cac0e6941bed58c8a64ae68cb6132
diff --git a/services/core/java/com/android/server/wm/DragDropController.java b/services/core/java/com/android/server/wm/DragDropController.java
index e0887e1..4ce0581 100644
--- a/services/core/java/com/android/server/wm/DragDropController.java
+++ b/services/core/java/com/android/server/wm/DragDropController.java
@@ -179,11 +179,9 @@
final SurfaceControl.Transaction transaction = mDragState.mTransaction;
transaction.setAlpha(surfaceControl, mDragState.mOriginalAlpha);
- transaction.setPosition(
- surfaceControl, touchX - thumbCenterX, touchY - thumbCenterY);
transaction.show(surfaceControl);
displayContent.reparentToOverlay(transaction, surfaceControl);
- callingWin.scheduleAnimation();
+ mDragState.updateDragSurfaceLocked(true, touchX, touchY);
if (SHOW_LIGHT_TRANSACTIONS) {
Slog.i(TAG_WM, "<<< CLOSE TRANSACTION performDrag");
}