Methods Summary |
---|
public void | deliverResult(android.database.Cursor cursor)
if (isReset()) {
// An async query came in while the loader is stopped
if (cursor != null) {
cursor.close();
}
return;
}
Cursor oldCursor = mCursor;
mCursor = cursor;
if (isStarted()) {
super.deliverResult(cursor);
}
if (oldCursor != null && oldCursor != cursor && !oldCursor.isClosed()) {
oldCursor.close();
}
|
public void | dump(java.lang.String prefix, java.io.FileDescriptor fd, java.io.PrintWriter writer, java.lang.String[] args)
super.dump(prefix, fd, writer, args);
writer.print(prefix); writer.print("mUri="); writer.println(mUri);
writer.print(prefix); writer.print("mProjection=");
writer.println(Arrays.toString(mProjection));
writer.print(prefix); writer.print("mSelection="); writer.println(mSelection);
writer.print(prefix); writer.print("mSelectionArgs=");
writer.println(Arrays.toString(mSelectionArgs));
writer.print(prefix); writer.print("mSortOrder="); writer.println(mSortOrder);
writer.print(prefix); writer.print("mCursor="); writer.println(mCursor);
writer.print(prefix); writer.print("mContentChanged="); writer.println(mContentChanged);
|
public java.lang.String[] | getProjection()
return mProjection;
|
public java.lang.String | getSelection()
return mSelection;
|
public java.lang.String[] | getSelectionArgs()
return mSelectionArgs;
|
public java.lang.String | getSortOrder()
return mSortOrder;
|
public android.net.Uri | getUri()
return mUri;
|
public android.database.Cursor | loadInBackground()
Cursor cursor = getContext().getContentResolver().query(mUri, mProjection, mSelection,
mSelectionArgs, mSortOrder);
if (cursor != null) {
// Ensure the cursor window is filled
cursor.getCount();
cursor.registerContentObserver(mObserver);
}
return cursor;
|
public void | onCanceled(android.database.Cursor cursor)
if (cursor != null && !cursor.isClosed()) {
cursor.close();
}
|
protected void | onReset()
super.onReset();
// Ensure the loader is stopped
onStopLoading();
if (mCursor != null && !mCursor.isClosed()) {
mCursor.close();
}
mCursor = null;
|
protected void | onStartLoading()Starts an asynchronous load of the contacts list data. When the result is ready the callbacks
will be called on the UI thread. If a previous load has been completed and is still valid
the result may be passed to the callbacks immediately.
Must be called from the UI thread
if (mCursor != null) {
deliverResult(mCursor);
}
if (takeContentChanged() || mCursor == null) {
forceLoad();
}
|
protected void | onStopLoading()Must be called from the UI thread
// Attempt to cancel the current load task if possible.
cancelLoad();
|
public void | setProjection(java.lang.String[] projection)
mProjection = projection;
|
public void | setSelection(java.lang.String selection)
mSelection = selection;
|
public void | setSelectionArgs(java.lang.String[] selectionArgs)
mSelectionArgs = selectionArgs;
|
public void | setSortOrder(java.lang.String sortOrder)
mSortOrder = sortOrder;
|
public void | setUri(android.net.Uri uri)
mUri = uri;
|