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

Commit 7199acdb authored by Tony Wickham's avatar Tony Wickham
Browse files

Add null check to AbstractStateChangeTouchController#onDragEnd()

Fixes: 171444185
Change-Id: I32eec545c849164463e2820603bfb6dc26260f11
parent 64594c80
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -396,6 +396,12 @@ public abstract class AbstractStateChangeTouchController

    @Override
    public void onDragEnd(float velocity) {
        if (mCurrentAnimation == null) {
            // Unlikely, but we may have been canceled just before onDragEnd(). We assume whoever
            // canceled us will handle a new state transition to clean up.
            return;
        }

        boolean fling = mDetector.isFling(velocity);

        boolean blockedFling = fling && mFlingBlockCheck.isBlocked();