private void updateCursorObserver ( ) { Cursor newObservedCursor = getDataObserverCount ( ) > 0 ? mCursor : null ; if ( newObservedCursor != mObservedCursor ) { if ( mObservedCursor != null ) { mObservedCursor . unregisterContentObserver ( mCursorContentObserver ) ; } mObservedCursor = newObservedCursor ; if ( mObservedCursor != null ) { mObservedCursor . registerContentObserver ( mCursorContentObserver ) ; } } }
Registers or unregisters with the cursor . Idempotent .