summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-07-11 16:12:41 -0700
committerWinson Chung <winsonc@google.com>2013-07-11 18:19:56 -0700
commitce376639c8287747e462fd67a7d2d511ac80c344 (patch)
tree31008e1cfbf14ed1534e6a8e3fec1cc1fa82d092
parent34a3340cfb462f2b62d4b5e8afb2707eb0d5fc5b (diff)
downloadandroid_packages_apps_Trebuchet-ce376639c8287747e462fd67a7d2d511ac80c344.tar.gz
android_packages_apps_Trebuchet-ce376639c8287747e462fd67a7d2d511ac80c344.tar.bz2
android_packages_apps_Trebuchet-ce376639c8287747e462fd67a7d2d511ac80c344.zip
Fixing crash due to checking hotseat items for collisions incorrectly.
Change-Id: I6ad2a3bd46b975959077683331a4ff7b946cc488
-rw-r--r--src/com/android/launcher3/Launcher.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 95aefe674..e059feebf 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3495,9 +3495,11 @@ public class Launcher extends Activity
/*
* TODO: FIX collision case
*/
- CellLayout cl = mWorkspace.getScreenWithId(item.screenId);
- if (cl != null && cl.isOccupied(item.cellX, item.cellY)) {
- throw new RuntimeException("OCCUPIED");
+ if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
+ CellLayout cl = mWorkspace.getScreenWithId(item.screenId);
+ if (cl != null && cl.isOccupied(item.cellX, item.cellY)) {
+ throw new RuntimeException("OCCUPIED");
+ }
}
workspace.addInScreenFromBind(shortcut, item.container, item.screenId, item.cellX,