Code example for ContentResolver

Methods: unregisterContentObserver

0
        } 
 
        public void unobserve() { 
            ContentResolver resolver = mContext.getContentResolver();
 
            resolver.unregisterContentObserver(this);
        } 
 
        @Override 
        public void onChangeUri(Uri uri, boolean selfChange) {
            ContentResolver resolver = mContext.getContentResolver();
            Resources res = mContext.getResources();
 
            // first check if our widget buttons have changed 
            if(uri.equals(Settings.System.getUriFor(Settings.System.WIDGET_BUTTONS))) {
                setupWidget(); 
            // now check if we change visibility 
            } else if(uri.equals(Settings.System.getUriFor(Settings.System.EXPANDED_VIEW_WIDGET))) {
                updateVisibility(); 
            // now check for scrollbar hiding 
            } else if(uri.equals(Settings.System.getUriFor(Settings.System.EXPANDED_HIDE_SCROLLBAR))) {