summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-11-22 12:25:14 -0800
committerWinson Chung <winsonc@google.com>2011-11-22 14:21:08 -0800
commit96ef409ebdc798a82786e5dcecfd7d897be0ed30 (patch)
tree486692c7db4c22fc99d32edb34e9c10b1bd2c675 /src/com/android
parent31186d0535ce2147e0d094c1409782d0b1aa5ea0 (diff)
downloadandroid_packages_apps_Trebuchet-96ef409ebdc798a82786e5dcecfd7d897be0ed30.tar.gz
android_packages_apps_Trebuchet-96ef409ebdc798a82786e5dcecfd7d897be0ed30.tar.bz2
android_packages_apps_Trebuchet-96ef409ebdc798a82786e5dcecfd7d897be0ed30.zip
Preventing springloaded mode from snapping back due to timeout. (Bug 5649189)
- Also allowing drop on all apps button to cancel a drag Change-Id: I27252bd34c591882d8c5f80389d8fd6f4f6e4791
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher2/Workspace.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index ea7c0be7a..e12209468 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;
}
@@ -2637,7 +2646,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;
@@ -2723,7 +2732,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