summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-27 10:10:53 +0000
committernebkat <nebkat@teamhacksung.org>2012-12-27 10:10:53 +0000
commit32fdce8214caa36a21c7f00664a0a10740139232 (patch)
tree3213e494ee57c398d0e3d7ce5ae39d87d6c2628b /src
parent8901992c72caa891a396f557ee76f42f1d7fbe15 (diff)
downloadandroid_packages_apps_Trebuchet-32fdce8214caa36a21c7f00664a0a10740139232.tar.gz
android_packages_apps_Trebuchet-32fdce8214caa36a21c7f00664a0a10740139232.tar.bz2
android_packages_apps_Trebuchet-32fdce8214caa36a21c7f00664a0a10740139232.zip
Workspace: Hotseat fixes
Change-Id: If1d46d8a22347722a06bed0e553646fd3c16a044
Diffstat (limited to 'src')
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index c7d6e7587..944ac849f 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -2670,7 +2670,8 @@ public class Workspace extends PagedView
return false;
}
- boolean aboveShortcut = (dropOverView.getTag() instanceof ShortcutInfo);
+ boolean aboveShortcut = ((ItemInfo) dropOverView.getTag()).itemType ==
+ LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
boolean willBecomeShortcut =
(info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION ||
info.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT);
@@ -2787,7 +2788,7 @@ public class Workspace extends PagedView
// We want the point to be mapped to the dragTarget.
if (dropTargetLayout != null) {
if (mLauncher.isHotseatLayout(dropTargetLayout)) {
- mLauncher.getHotseat().mapPointFromChildToSelf(dropTargetLayout, mDragViewVisualCenter);
+ mapPointFromSelfToHotseatLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
} else {
mapPointFromSelfToChild(dropTargetLayout, mDragViewVisualCenter, null);
}
@@ -3380,7 +3381,7 @@ public class Workspace extends PagedView
if (mDragTargetLayout != null) {
// We want the point to be mapped to the dragTarget.
if (mLauncher.isHotseatLayout(mDragTargetLayout)) {
- mLauncher.getHotseat().mapPointFromChildToSelf(mDragTargetLayout, mDragViewVisualCenter);
+ mapPointFromSelfToHotseatLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
} else {
mapPointFromSelfToChild(mDragTargetLayout, mDragViewVisualCenter, null);
}
@@ -3607,7 +3608,8 @@ public class Workspace extends PagedView
final PendingAddItemInfo pendingInfo = (PendingAddItemInfo) dragInfo;
boolean findNearestVacantCell = true;
- if (pendingInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT) {
+ if (pendingInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT ||
+ pendingInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_LAUNCHER_ACTION) {
mTargetCell = findNearestArea(touchXY[0], touchXY[1], spanX, spanY,
cellLayout, mTargetCell);
float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],