diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-01-25 18:23:36 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-01-27 15:09:10 -0800 |
commit | dec3a908bfa395095e80e4a532cff98612b624de (patch) | |
tree | 77ea2c951253ef5ca2d63655dcd7071f328b41ed /src/com/android/launcher3/dragndrop/DragLayer.java | |
parent | 5cfd1158ec1e4a19689217e9fbddd0fd795b2611 (diff) | |
download | packages_apps_Trebuchet-dec3a908bfa395095e80e4a532cff98612b624de.tar.gz packages_apps_Trebuchet-dec3a908bfa395095e80e4a532cff98612b624de.tar.bz2 packages_apps_Trebuchet-dec3a908bfa395095e80e4a532cff98612b624de.zip |
Updating the preview generation logic so that it aligns better with
the drag source image
> Using common code for pending item drag (WidgetContainerView and PinItemDragListener)
> Adding a shortcut-circuit in Workspace when a pendingItem can create a shortcut
directly. Previously the multi-window drop was routing through onActivityResult which
was causing some state information to be lost.
Bug: 33584624
Change-Id: I0259870032185713caa9bff27092dbae6ce91199
Diffstat (limited to 'src/com/android/launcher3/dragndrop/DragLayer.java')
-rw-r--r-- | src/com/android/launcher3/dragndrop/DragLayer.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java index de416e3bc..1be40f7e2 100644 --- a/src/com/android/launcher3/dragndrop/DragLayer.java +++ b/src/com/android/launcher3/dragndrop/DragLayer.java @@ -673,15 +673,11 @@ public class DragLayer extends InsettableFrameLayout { // If duration < 0, this is a cue to compute the duration based on the distance if (duration < 0) { - if (mDragController != null && mDragController.isExternalDrag()) { - duration = 1; - } else { - duration = res.getInteger(R.integer.config_dropAnimMaxDuration); - if (dist < maxDist) { - duration *= mCubicEaseOutInterpolator.getInterpolation(dist / maxDist); - } - duration = Math.max(duration, res.getInteger(R.integer.config_dropAnimMinDuration)); + duration = res.getInteger(R.integer.config_dropAnimMaxDuration); + if (dist < maxDist) { + duration *= mCubicEaseOutInterpolator.getInterpolation(dist / maxDist); } + duration = Math.max(duration, res.getInteger(R.integer.config_dropAnimMinDuration)); } // Fall back to cubic ease out interpolator for the animation if none is specified |