am c87775d8: Fixing rank migration code to handle null values correctly.

* commit 'c87775d8e63c7b5722c23ef95c782f574b847d73':
  Fixing rank migration code to handle null values correctly.
This commit is contained in:
Sunny Goyal
2015-02-11 23:01:53 +00:00
committed by Android Git Automerger
@@ -620,7 +620,8 @@ public class LauncherProvider extends ContentProvider {
new String[] {Integer.toString(LauncherSettings.Favorites.ITEM_TYPE_FOLDER)});
while (c.moveToNext()) {
db.execSQL("UPDATE favorites SET rank=cellX+(cellY*?) WHERE container=?;",
db.execSQL("UPDATE favorites SET rank=cellX+(cellY*?) WHERE "
+ "container=? AND cellX IS NOT NULL AND cellY IS NOT NULL;",
new Object[] {c.getLong(1) + 1, c.getLong(0)});
}