FileDocCategorySizeDatePackage
RootsLoader.javaAPI DocAndroid 5.1 API2404Thu Mar 12 22:22:40 GMT 2015com.android.documentsui

RootsLoader

public class RootsLoader extends android.content.AsyncTaskLoader

Fields Summary
private final ForceLoadContentObserver
mObserver
private final RootsCache
mRoots
private final com.android.documentsui.DocumentsActivity.State
mState
private Collection
mResult
Constructors Summary
public RootsLoader(android.content.Context context, RootsCache roots, com.android.documentsui.DocumentsActivity.State state)


           
        super(context);
        mRoots = roots;
        mState = state;

        getContext().getContentResolver()
                .registerContentObserver(RootsCache.sNotificationUri, false, mObserver);
    
Methods Summary
public voiddeliverResult(java.util.Collection result)

        if (isReset()) {
            return;
        }
        Collection<RootInfo> oldResult = mResult;
        mResult = result;

        if (isStarted()) {
            super.deliverResult(result);
        }
    
public final java.util.CollectionloadInBackground()

        return mRoots.getMatchingRootsBlocking(mState);
    
protected voidonReset()

        super.onReset();

        // Ensure the loader is stopped
        onStopLoading();

        mResult = null;

        getContext().getContentResolver().unregisterContentObserver(mObserver);
    
protected voidonStartLoading()

        if (mResult != null) {
            deliverResult(mResult);
        }
        if (takeContentChanged() || mResult == null) {
            forceLoad();
        }
    
protected voidonStopLoading()

        cancelLoad();