Fixing crash due to checking hotseat items for collisions incorrectly.
Change-Id: I6ad2a3bd46b975959077683331a4ff7b946cc488
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 95aefe6..e059fee 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3495,9 +3495,11 @@
/*
* 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,