am aa1e5728: Merge "Small fix to deal with ugly widget dropping situations" into ics-mr1
* commit 'aa1e57286d5435fff0ad1de894cf9d3d730b5e59':
Small fix to deal with ugly widget dropping situations
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 0598cd9..79e9942 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -2960,7 +2960,8 @@
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(cellLayout, loc);
resetTransitionTransform(cellLayout);
- float dragViewScale = r.width() / d.dragView.getMeasuredWidth();
+ float dragViewScale = Math.min(r.width() / d.dragView.getMeasuredWidth(),
+ r.height() / d.dragView.getMeasuredHeight());
// The animation will scale the dragView about its center, so we need to center about
// the final location.
loc[0] -= (d.dragView.getMeasuredWidth() - cellLayoutScale * r.width()) / 2;