Fix bug where dragging icons in folders causes error

The error was caused by delta being larger than the range, which leads to an UnsupportedOperationException: "Final position of the spring cannot be greater than the max value". With this change, delta will never be greater than range.

Fix: 261674632
Test: 1. Settings > Display > Display size and text >>> Set display size to the biggest
2. Make folder
3. Go to landscape mode
4. Open folder
5. Quickly drag icon in folder
6. Verify that Launcher doesn't stop and drag is successful

Change-Id: I6c81755750acf0de8693b98caad8e7dab3e9f58a
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java
index 09fe740..f54d05d 100644
--- a/src/com/android/launcher3/dragndrop/DragView.java
+++ b/src/com/android/launcher3/dragndrop/DragView.java
@@ -568,7 +568,8 @@
                     .setSpring(new SpringForce(0)
                             .setDampingRatio(DAMPENING_RATIO)
                             .setStiffness(STIFFNESS));
-            mDelta = view.getResources().getDisplayMetrics().density * PARALLAX_MAX_IN_DP;
+            mDelta = Math.min(
+                    range, view.getResources().getDisplayMetrics().density * PARALLAX_MAX_IN_DP);
         }
 
         public void animateToPos(float value) {