Add nullcheck for VelocityTracker

Bug:134712476
Change-Id:I7834507a4e9aadf4d89c0ed6f3eba812df7425cd
This commit is contained in:
Samuel Fufa 2019-09-06 11:32:56 -07:00
parent f5197fce3d
commit 6ef5b8abf4
1 changed files with 1 additions and 0 deletions

View File

@ -106,6 +106,7 @@ public class FlingToDeleteHelper {
* @return the vector at which the item was flung, or null if no fling was detected.
*/
private PointF isFlingingToDelete() {
if (mVelocityTracker == null) return null;
if (mDropTarget == null) {
mDropTarget = (ButtonDropTarget) mLauncher.findViewById(R.id.delete_target_text);
}