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

Commit a56b2b97 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Prevent animated drag shadow from being dragged.

Make sure that touch events do not affect the drag shadow
while it is being animated at the end of an unconsumed drop.

Change-Id: I4ead3148f5e67db8fb312b9f9b0383815f8b2809
parent 4657518d
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ class DragState {
        }
    }

    void broadcastDragEndedLw() {
    private void broadcastDragEndedLw() {
        final int myPid = Process.myPid();

        if (WindowManagerService.DEBUG_DRAG) {
@@ -313,6 +313,9 @@ class DragState {
    }

    void endDragLw() {
        if (mAnimation != null) {
            return;
        }
        if (!mDragResult) {
            mAnimation = createReturnAnimationLocked();
            mService.scheduleAnimationLocked();
@@ -322,7 +325,7 @@ class DragState {
    }


    void cleanUpDragLw() {
    private void cleanUpDragLw() {
        broadcastDragEndedLw();

        // stop intercepting input
@@ -336,6 +339,9 @@ class DragState {
    }

    void notifyMoveLw(float x, float y) {
        if (mAnimation != null) {
            return;
        }
        mCurrentX = x;
        mCurrentY = y;

@@ -410,6 +416,9 @@ class DragState {
    // result from the recipient.
    boolean notifyDropLw(WindowState touchedWin, DropPermissionHolder dropPermissionHolder,
            float x, float y) {
        if (mAnimation != null) {
            return false;
        }
        mCurrentX = x;
        mCurrentY = y;