Add null check to AbstractStateChangeTouchController#onDragEnd()

Fixes: 171444185
Change-Id: I32eec545c849164463e2820603bfb6dc26260f11
This commit is contained in:
Tony Wickham
2020-11-23 16:09:07 -08:00
parent 64594c803a
commit 7199acdbad

View File

@@ -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();