diff options
author | Michael Jurka <mikejurka@google.com> | 2011-08-29 14:02:47 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-08-29 14:23:30 -0700 |
commit | b60fd0eafbb4e6e61b429c403f024dc903bc483a (patch) | |
tree | 041c870e297bccca1f848db73204a99e918b0b45 /src/com/android/launcher2/LauncherModel.java | |
parent | fe1f9b0bd47c611333d1f14261be80ffac08d152 (diff) | |
download | android_packages_apps_Trebuchet-b60fd0eafbb4e6e61b429c403f024dc903bc483a.tar.gz android_packages_apps_Trebuchet-b60fd0eafbb4e6e61b429c403f024dc903bc483a.tar.bz2 android_packages_apps_Trebuchet-b60fd0eafbb4e6e61b429c403f024dc903bc483a.zip |
Tagging where ItemInfos are created for debug purposes
Change-Id: Iad3ed8ef4f81f4990c027ab46fd25b03b089babb
Diffstat (limited to 'src/com/android/launcher2/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher2/LauncherModel.java | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index 4ad8922f4..ea51d0169 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -210,8 +210,10 @@ public class LauncherModel extends BroadcastReceiver { // the modelItem needs to match up perfectly with item if our model is to be // consistent with the database-- for now, just require modelItem == item String msg = "item: " + ((item != null) ? item.toString() : "null") + - "modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") + - "Error: ItemInfo passed to moveItemInDatabase doesn't match original"; + " modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") + + " creation tag of item: " + ((item != null) ? item.whereCreated : "null") + + " creation tag of modelItem: " + ((modelItem != null) ? modelItem.whereCreated : "null") + + " Error: ItemInfo passed to moveItemInDatabase doesn't match original"; throw new RuntimeException(msg); } @@ -258,8 +260,10 @@ public class LauncherModel extends BroadcastReceiver { // the modelItem needs to match up perfectly with item if our model is to be // consistent with the database-- for now, just require modelItem == item String msg = "item: " + ((item != null) ? item.toString() : "null") + - "modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") + - "Error: ItemInfo passed to resizeItemInDatabase doesn't match original"; + " modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") + + " creation tag of item: " + ((item != null) ? item.whereCreated : "null") + + " creation tag of modelItem: " + ((modelItem != null) ? modelItem.whereCreated : "null") + + " Error: ItemInfo passed to resizeItemInDatabase doesn't match original"; throw new RuntimeException(msg); } } @@ -306,7 +310,7 @@ public class LauncherModel extends BroadcastReceiver { try { while (c.moveToNext()) { - ItemInfo item = new ItemInfo(); + ItemInfo item = new ItemInfo("17"); item.cellX = c.getInt(cellXIndex); item.cellY = c.getInt(cellYIndex); item.spanX = c.getInt(spanXIndex); @@ -470,8 +474,10 @@ public class LauncherModel extends BroadcastReceiver { // the modelItem needs to match up perfectly with item if our model is to be // consistent with the database-- for now, just require modelItem == item String msg = "item: " + ((item != null) ? item.toString() : "null") + - "modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") + - "Error: ItemInfo passed to updateItemInDatabase doesn't match original"; + " modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") + + " creation tag of item: " + ((item != null) ? item.whereCreated : "null") + + " creation tag of modelItem: " + ((modelItem != null) ? modelItem.whereCreated : "null") + + " Error: ItemInfo passed to updateItemInDatabase doesn't match original"; throw new RuntimeException(msg); } } @@ -1059,7 +1065,7 @@ public class LauncherModel extends BroadcastReceiver { + id + " appWidgetId=" + appWidgetId); itemsToRemove.add(id); } else { - appWidgetInfo = new LauncherAppWidgetInfo(appWidgetId); + appWidgetInfo = new LauncherAppWidgetInfo(appWidgetId, "5"); appWidgetInfo.id = id; appWidgetInfo.screen = c.getInt(screenIndex); appWidgetInfo.cellX = c.getInt(cellXIndex); @@ -1345,7 +1351,7 @@ public class LauncherModel extends BroadcastReceiver { for (int j=0; i<N && j<batchSize; j++) { // This builds the icon bitmaps. mAllAppsList.add(new ApplicationInfo(packageManager, apps.get(i), - mIconCache, mLabelCache)); + mIconCache, mLabelCache, "6")); i++; } @@ -1541,7 +1547,7 @@ public class LauncherModel extends BroadcastReceiver { public ShortcutInfo getShortcutInfo(PackageManager manager, Intent intent, Context context, Cursor c, int iconIndex, int titleIndex, HashMap<Object, CharSequence> labelCache) { Bitmap icon = null; - final ShortcutInfo info = new ShortcutInfo(); + final ShortcutInfo info = new ShortcutInfo("7"); ComponentName componentName = intent.getComponent(); if (componentName == null) { @@ -1606,7 +1612,7 @@ public class LauncherModel extends BroadcastReceiver { int titleIndex) { Bitmap icon = null; - final ShortcutInfo info = new ShortcutInfo(); + final ShortcutInfo info = new ShortcutInfo("8"); info.itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT; // TODO: If there's an explicit component and we can't install that, delete it. @@ -1765,7 +1771,7 @@ public class LauncherModel extends BroadcastReceiver { } } - final ShortcutInfo info = new ShortcutInfo(); + final ShortcutInfo info = new ShortcutInfo("9"); if (icon == null) { if (fallbackIcon != null) { @@ -1833,7 +1839,7 @@ public class LauncherModel extends BroadcastReceiver { FolderInfo folderInfo = folders.get(id); if (folderInfo == null) { // No placeholder -- create a new instance - folderInfo = new FolderInfo(); + folderInfo = new FolderInfo("10"); folders.put(id, folderInfo); } return folderInfo; |