Code example for AsyncTaskLoader

Methods: deliverResult

0
 
		Cursor oldCursor = mCursor;
		mCursor = data;
 
		if (isStarted()) {
			super.deliverResult(data);
		} 
 
		if (oldCursor != null && oldCursor != data && !oldCursor.isClosed()) {
			onReleaseResources(oldCursor);
		} 
	} 
 
	@Override 
	protected void onStartLoading() { 
		if (mCursor != null){
			deliverResult(mCursor);
		} 
         
        if (takeContentChanged() || mCursor == null) {