diff options
author | Abhisek Devkota <ciwrl@cyanogenmod.com> | 2014-03-04 22:49:48 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2014-03-04 22:49:48 +0000 |
commit | 99a7b0f03ce98a21c6dc44e7606643b99c2910d7 (patch) | |
tree | 97c921ab90826911dd550a50d4a6143c88a5a99a | |
parent | 97ce2ab7ec569f12c4d3ad638c6ae3af3531e35c (diff) | |
parent | d9bbfcbd622bf64d032a326fab43c47cb2f672cb (diff) | |
download | android_packages_apps_Trebuchet-99a7b0f03ce98a21c6dc44e7606643b99c2910d7.tar.gz android_packages_apps_Trebuchet-99a7b0f03ce98a21c6dc44e7606643b99c2910d7.tar.bz2 android_packages_apps_Trebuchet-99a7b0f03ce98a21c6dc44e7606643b99c2910d7.zip |
Merge "Trebuchet: fix icons disappearing from the hotseat (dock)." into cm-11.0
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index d79e6279b..bc97e0af2 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -1308,8 +1308,6 @@ public class LauncherModel extends BroadcastReceiver { AtomicBoolean deleteOnItemOverlap) { LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); - int countX = (int) grid.numColumns; - int countY = (int) grid.numRows; long containerIndex = item.screenId; if (item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { @@ -1333,7 +1331,7 @@ public class LauncherModel extends BroadcastReceiver { return true; } } else { - ItemInfo[][] items = new ItemInfo[countX + 1][countY + 1]; + ItemInfo[][] items = new ItemInfo[(int) grid.numHotseatIcons][1]; items[(int) item.screenId][0] = item; occupied.put((long) LauncherSettings.Favorites.CONTAINER_HOTSEAT, items); return true; @@ -1343,6 +1341,9 @@ public class LauncherModel extends BroadcastReceiver { return true; } + int countX = (int) grid.numColumns; + int countY = (int) grid.numRows; + if (!occupied.containsKey(item.screenId)) { ItemInfo[][] items = new ItemInfo[countX + 1][countY + 1]; occupied.put(item.screenId, items); |