summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-08-25 13:56:59 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-25 13:56:59 -0700
commit3b1b5938f9ce17135f17ccc9da0a6bf84c84a0fd (patch)
tree46b5f0dbeebc62853320f3a022ba8c87e63bd051 /src
parentae915cecd36af4973061a1cb0b58c5be1be699a0 (diff)
parentc22a54d4263086f8f8d5844a33550c77b09b38bd (diff)
downloadandroid_packages_apps_Trebuchet-3b1b5938f9ce17135f17ccc9da0a6bf84c84a0fd.tar.gz
android_packages_apps_Trebuchet-3b1b5938f9ce17135f17ccc9da0a6bf84c84a0fd.tar.bz2
android_packages_apps_Trebuchet-3b1b5938f9ce17135f17ccc9da0a6bf84c84a0fd.zip
Merge "Tweaking the logging in the fail case, adding additional cases for where the db icon cache should be updated. (5205131)"
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/LauncherModel.java29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 1f722994c..7d6206222 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -209,11 +209,10 @@ public class LauncherModel extends BroadcastReceiver {
if (item != modelItem) {
// 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
- Log.e(TAG, "item: " + ((item != null) ? item.toString() : "null"));
- Log.e(TAG, "modelItem: " + ((modelItem != null) ? modelItem.toString() :
- "null"));
- throw new RuntimeException("Error: ItemInfo passed to moveItemInDatabase " +
- "doesn't match original");
+ String msg = "item: " + ((item != null) ? item.toString() : "null") +
+ "modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") +
+ "Error: ItemInfo passed to moveItemInDatabase doesn't match original";
+ throw new RuntimeException(msg);
}
// Items are added/removed from the corresponding FolderInfo elsewhere, such
@@ -258,11 +257,10 @@ public class LauncherModel extends BroadcastReceiver {
if (item != modelItem) {
// 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
- Log.e(TAG, "item: " + ((item != null) ? item.toString() : "null"));
- Log.e(TAG, "modelItem: " + ((modelItem != null) ? modelItem.toString() :
- "null"));
- throw new RuntimeException("Error: ItemInfo passed to moveItemInDatabase " +
- "doesn't match original");
+ String msg = "item: " + ((item != null) ? item.toString() : "null") +
+ "modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") +
+ "Error: ItemInfo passed to resizeItemInDatabase doesn't match original";
+ throw new RuntimeException(msg);
}
}
});
@@ -471,11 +469,10 @@ public class LauncherModel extends BroadcastReceiver {
if (item != modelItem) {
// 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
- Log.e(TAG, "item: " + ((item != null) ? item.toString() : "null"));
- Log.e(TAG, "modelItem: " + ((modelItem != null) ? modelItem.toString() :
- "null"));
- throw new RuntimeException("Error: ItemInfo passed to updateItemInDatabase " +
- "doesn't match original");
+ String msg = "item: " + ((item != null) ? item.toString() : "null") +
+ "modelItem: " + ((modelItem != null) ? modelItem.toString() : "null") +
+ "Error: ItemInfo passed to updateItemInDatabase doesn't match original";
+ throw new RuntimeException(msg);
}
}
});
@@ -522,12 +519,14 @@ public class LauncherModel extends BroadcastReceiver {
cr.delete(LauncherSettings.Favorites.getContentUri(info.id, false), null, null);
sItemsIdMap.remove(info.id);
sFolders.remove(info.id);
+ sDbIconCache.remove(info);
sWorkspaceItems.remove(info);
cr.delete(LauncherSettings.Favorites.CONTENT_URI_NO_NOTIFICATION,
LauncherSettings.Favorites.CONTAINER + "=" + info.id, null);
for (ItemInfo childInfo : info.contents) {
sItemsIdMap.remove(childInfo.id);
+ sDbIconCache.remove(childInfo);
}
}
});