Make LauncherModel.deleteItemFromDatabase write to disk async.

Fixes a bunch of StrictMode violations and removes TODOs.

Change-Id: I886bd071d4a8336c228d29c517a8ffc5223c0623
This commit is contained in:
Brad Fitzpatrick committed 2010-09-14 12:33:35 -07:00
1 parent 319226a894
commit 73013bf94f
3 files changed
+15 -9

No files matched your search

+6 -2
View File
@@ -269,8 +269,12 @@ public class LauncherModel extends BroadcastReceiver {
*/
static void deleteItemFromDatabase(Context context, ItemInfo item) {
final ContentResolver cr = context.getContentResolver();
cr.delete(LauncherSettings.Favorites.getContentUri(item.id, false), null, null);
final Uri uriToDelete = LauncherSettings.Favorites.getContentUri(item.id, false);
new Thread("deleteItemFromDatabase") {
public void run() {
cr.delete(uriToDelete, null, null);
}
}.start();
}
/**