Code example for ContentResolver

Methods: registerContentObserver

0
        else 
            removeBookmarkPre11(cr, uri);
    } 
 
    public void registerBookmarkObserverPre11(ContentResolver cr, ContentObserver observer) {
        cr.registerContentObserver(Browser.BOOKMARKS_URI, false, observer);
    } 
 
    public void registerBookmarkObserverPost11(ContentResolver cr, ContentObserver observer) {
        cr.registerContentObserver(BOOKMARKS_CONTENT_URI_POST_11, false, observer);
    } 
 
    public void registerBookmarkObserver(ContentResolver cr, ContentObserver observer) {
        if (Build.VERSION.SDK_INT >= 11)
            registerBookmarkObserverPost11(cr, observer);
        else 
            registerBookmarkObserverPre11(cr, observer);
    } 
 
    public BitmapDrawable getFaviconForUrl(ContentResolver cr, String uri) {
        Cursor c = cr.query(Browser.BOOKMARKS_URI,