Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 741f63b4 authored by Arthur Hung's avatar Arthur Hung
Browse files

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
parent 9950dab6
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -179,11 +179,9 @@ class DragDropController {

                        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");
                        }