Trying to track down corrupt database / items disappearing
-> Adding logs for all database transactions
-> Adding sanity checks for items in folders, throwing exceptions
if they are violated
-> Reducing database upates when re-arranging items, only
update if values have changed
-> Removed some dead code from ItemInfo (isGesture?)
Change-Id: Ia5cd57d92082f633dbf4aa5d64612cbae2d82bb4
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 284db1b..c993f0e 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -2148,6 +2148,10 @@
// We do a null check here because the item info can be null in the case of the
// AllApps button in the hotseat.
if (info != null) {
+ if (info.cellX != lp.tmpCellX || info.cellY != lp.tmpCellY ||
+ info.spanX != lp.cellHSpan || info.spanY != lp.cellVSpan) {
+ info.requiresDbUpdate = true;
+ }
info.cellX = lp.cellX = lp.tmpCellX;
info.cellY = lp.cellY = lp.tmpCellY;
info.spanX = lp.cellHSpan;