am f52ab456: am 65f9e9d4: Merge "Preventing springloaded mode from snapping back due to timeout. (Bug 5649189)" into ics-mr1
* commit 'f52ab456d2d463293074015a02e961cb76134d1d': Preventing springloaded mode from snapping back due to timeout. (Bug 5649189)
This commit is contained in:
commit
bb1e76bee9
1 file changed
+12
-3
@@ -2054,9 +2054,18 @@ public class Workspace extends SmoothPagedView
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Don't accept the drop if there's no room for the item
|
// Don't accept the drop if there's no room for the item
|
||||||
if (!mDragTargetLayout.findCellForSpanIgnoring(null, spanX, spanY, ignoreView)) {
|
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();
|
mLauncher.showOutOfSpaceMessage();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2639,7 +2648,7 @@ public class Workspace extends SmoothPagedView
|
|||||||
return cl;
|
return cl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!exact && overlaps(cl, dragView, (int) originX, (int) originY, mTempInverseMatrix)) {
|
if (!exact) {
|
||||||
// Get the center of the cell layout in screen coordinates
|
// Get the center of the cell layout in screen coordinates
|
||||||
final float[] cellLayoutCenter = mTempCellLayoutCenterCoordinates;
|
final float[] cellLayoutCenter = mTempCellLayoutCenterCoordinates;
|
||||||
cellLayoutCenter[0] = cl.getWidth()/2;
|
cellLayoutCenter[0] = cl.getWidth()/2;
|
||||||
@@ -2725,7 +2734,7 @@ public class Workspace extends SmoothPagedView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (layout == null) {
|
if (layout == null) {
|
||||||
layout = findMatchingPageForDragOver(d.dragView, d.x, d.y, true);
|
layout = findMatchingPageForDragOver(d.dragView, d.x, d.y, false);
|
||||||
}
|
}
|
||||||
if (layout != mDragTargetLayout) {
|
if (layout != mDragTargetLayout) {
|
||||||
// Cancel all intermediate folder states
|
// Cancel all intermediate folder states
|
||||||
|
|||||||
Reference in new issue
Block a user