Code example for CursorLoader

Methods: cancelLoad, getContext, onReset

0
 
    protected final void onAbandon() 
    { 
        if(mObserverRegistered)
        { 
            getContext().getContentResolver().unregisterContentObserver(mObserver);
            mObserverRegistered = false;
        } 
    } 
 
    protected final void onReset() 
    { 
        cancelLoad();
        super.onReset(); 
        onAbandon(); 
    } 
 
    protected final void onStartLoading() 
    { 
        super.onStartLoading(); 
        if(!mObserverRegistered)