Bug 721776 - Bookmark is removed from bookmark list only after reboot when removed (r=mfinkle)

This commit is contained in:
Brian Nicholson 2012-02-07 14:47:56 +00:00
parent aa6eea1787
commit 47310bffbf
2 changed files with 15 additions and 1 deletions

View File

@ -477,7 +477,8 @@ public class AwesomeBar extends Activity implements GeckoEventListener {
GeckoApp.mAppContext.mMainHandler.post(new Runnable() {
public void run() {
Toast.makeText(this, R.string.bookmark_removed,
mAwesomeTabs.refreshBookmarks();
Toast.makeText(AwesomeBar.this, R.string.bookmark_removed,
Toast.LENGTH_SHORT).show();
}
});

View File

@ -747,4 +747,17 @@ public class AwesomeBarTabs extends TabHost {
}
});
}
public void refreshBookmarks() {
new AsyncTask<Void, Void, Cursor>() {
protected Cursor doInBackground(Void... arg0) {
ContentResolver resolver = mContext.getContentResolver();
return BrowserDB.getAllBookmarks(resolver);
}
protected void onPostExecute(Cursor cursor) {
mBookmarksAdapter.changeCursor(cursor);
}
}.execute();
}
}