diff options
author | Winson Chung <winsonc@google.com> | 2011-11-23 15:38:42 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-23 15:38:42 -0800 |
commit | 65f9e9d45b8ba9aa819be2c4fca1722db7784868 (patch) | |
tree | e35ecf0ff78f3205471b07252e2b6f85aea099ef | |
parent | 97d6f9a705711870ee9a06fe4f28050228fcfb13 (diff) | |
parent | 96ef409ebdc798a82786e5dcecfd7d897be0ed30 (diff) | |
download | android_packages_apps_Trebuchet-65f9e9d45b8ba9aa819be2c4fca1722db7784868.tar.gz android_packages_apps_Trebuchet-65f9e9d45b8ba9aa819be2c4fca1722db7784868.tar.bz2 android_packages_apps_Trebuchet-65f9e9d45b8ba9aa819be2c4fca1722db7784868.zip |
Merge "Preventing springloaded mode from snapping back due to timeout. (Bug 5649189)" into ics-mr1
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 02a81a7b7..60f57c287 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -2054,9 +2054,18 @@ public class Workspace extends SmoothPagedView return true; } - // Don't accept the drop if there's no room for the item if (!mDragTargetLayout.findCellForSpanIgnoring(null, spanX, spanY, ignoreView)) { + // Don't show the message if we are dropping on the AllApps button and the hotseat + // is full + if (mTargetCell != null && mLauncher.isHotseatLayout(mDragTargetLayout)) { + Hotseat hotseat = mLauncher.getHotseat(); + if (Hotseat.isAllAppsButtonRank( + hotseat.getOrderInHotseat(mTargetCell[0], mTargetCell[1]))) { + return false; + } + } + mLauncher.showOutOfSpaceMessage(); return false; } @@ -2639,7 +2648,7 @@ public class Workspace extends SmoothPagedView return cl; } - if (!exact && overlaps(cl, dragView, (int) originX, (int) originY, mTempInverseMatrix)) { + if (!exact) { // Get the center of the cell layout in screen coordinates final float[] cellLayoutCenter = mTempCellLayoutCenterCoordinates; cellLayoutCenter[0] = cl.getWidth()/2; @@ -2725,7 +2734,7 @@ public class Workspace extends SmoothPagedView } } if (layout == null) { - layout = findMatchingPageForDragOver(d.dragView, d.x, d.y, true); + layout = findMatchingPageForDragOver(d.dragView, d.x, d.y, false); } if (layout != mDragTargetLayout) { // Cancel all intermediate folder states |