summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/trebuchet/Workspace.java
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-23 14:25:45 +0000
committernebkat <nebkat@teamhacksung.org>2012-12-24 10:04:49 +0000
commitfff81cad6963dfa977fa8063efa3d29797d9d8c2 (patch)
treee43abf973d2bdbccf2778df871a554464f5aabc2 /src/com/cyanogenmod/trebuchet/Workspace.java
parent10a908a32cab20d5fc0ee944a3b34b98a9648f68 (diff)
downloadandroid_packages_apps_Trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.tar.gz
android_packages_apps_Trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.tar.bz2
android_packages_apps_Trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.zip
Launcher actions
Change-Id: Ica0699f99d68b9f89d6f103eaadc56e632d87101
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/Workspace.java')
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index 4219e2bfa..08b0e7af3 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -2678,18 +2678,7 @@ public class Workspace extends SmoothPagedView
// Don't accept the drop if there's no room for the item
if (!foundCell) {
- // Don't show the message if we are dropping on the AllApps button and the hotseat
- // is full
- boolean isHotseat = mLauncher.isHotseatLayout(dropTargetLayout);
- if (mTargetCell != null && isHotseat) {
- Hotseat hotseat = mLauncher.getHotseat();
- if (hotseat.isAllAppsButtonRank(
- hotseat.getOrderInHotseat(mTargetCell[0], mTargetCell[1]))) {
- return false;
- }
- }
-
- mLauncher.showOutOfSpaceMessage(isHotseat);
+ mLauncher.showOutOfSpaceMessage(mLauncher.isHotseatLayout(dropTargetLayout));
return false;
}
}
@@ -3740,8 +3729,13 @@ public class Workspace extends SmoothPagedView
container, screen, mTargetCell, span, null);
break;
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
- mLauncher.processShortcutFromDrop(pendingInfo.componentName,
- container, screen, mTargetCell, null);
+ if (pendingInfo instanceof PendingAddActionInfo) {
+ mLauncher.processActionFromDrop(((PendingAddActionInfo)pendingInfo).action,
+ container, screen, mTargetCell, null);
+ } else {
+ mLauncher.processShortcutFromDrop(pendingInfo.componentName,
+ container, screen, mTargetCell, null);
+ }
break;
default:
throw new IllegalStateException("Unknown item type: " +