Bug 750707 - Add method to add reading list items in BrowserDB (r=margaret)

This commit is contained in:
Lucas Rocha 2012-06-02 14:23:45 -04:00
parent c240e65357
commit 092be0d57a
3 changed files with 14 additions and 0 deletions

View File

@ -266,6 +266,10 @@ public class AndroidBrowserDB implements BrowserDB.BrowserDBIface {
removeBookmarkPre11(cr, uri);
}
public void addReadingListItem(ContentResolver cr, String title, String uri) {
// Do nothing
}
public void registerBookmarkObserverPre11(ContentResolver cr, ContentObserver observer) {
cr.registerContentObserver(Browser.BOOKMARKS_URI, false, observer);
}

View File

@ -61,6 +61,8 @@ public class BrowserDB {
public void updateBookmark(ContentResolver cr, int id, String uri, String title, String keyword);
public void addReadingListItem(ContentResolver cr, String title, String uri);
public BitmapDrawable getFaviconForUrl(ContentResolver cr, String uri);
public void updateFaviconForUrl(ContentResolver cr, String uri, BitmapDrawable favicon);
@ -148,6 +150,10 @@ public class BrowserDB {
sDb.updateBookmark(cr, id, uri, title, keyword);
}
public static void addReadingListItem(ContentResolver cr, String title, String uri) {
sDb.addReadingListItem(cr, title, uri);
}
public static BitmapDrawable getFaviconForUrl(ContentResolver cr, String uri) {
return sDb.getFaviconForUrl(cr, uri);
}

View File

@ -506,6 +506,10 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
cr.delete(contentUri, urlEquals, urlArgs);
}
public void addReadingListItem(ContentResolver cr, String title, String uri) {
addBookmarkItem(cr, title, uri, Bookmarks.FIXED_READING_LIST_ID);
}
public void registerBookmarkObserver(ContentResolver cr, ContentObserver observer) {
cr.registerContentObserver(mBookmarksUriWithProfile, false, observer);
}