public class SummaryForAllUidLoader extends AsyncTaskLoader<NetworkStats>
Loader.ForceLoadContentObserver, Loader.OnLoadCanceledListener<D>, Loader.OnLoadCompleteListener<D>
Constructor and Description |
---|
SummaryForAllUidLoader(Context context,
INetworkStatsSession session,
Bundle args) |
Modifier and Type | Method and Description |
---|---|
static Bundle |
buildArgs(NetworkTemplate template,
long start,
long end) |
NetworkStats |
loadInBackground()
Called on a worker thread to perform the actual load and to return
the result of the load operation.
|
protected void |
onReset()
Subclasses must implement this to take care of resetting their loader,
as per
Loader.reset() . |
protected void |
onStartLoading()
Subclasses must implement this to take care of loading their data,
as per
Loader.startLoading() . |
protected void |
onStopLoading()
Subclasses must implement this to take care of stopping their loader,
as per
Loader.stopLoading() . |
cancelLoadInBackground, dump, isLoadInBackgroundCanceled, onCanceled, onCancelLoad, onForceLoad, onLoadInBackground, setUpdateThrottle, waitForLoader
abandon, cancelLoad, commitContentChanged, dataToString, deliverCancellation, deliverResult, forceLoad, getContext, getId, isAbandoned, isReset, isStarted, onAbandon, onContentChanged, registerListener, registerOnLoadCanceledListener, reset, rollbackContentChanged, startLoading, stopLoading, takeContentChanged, toString, unregisterListener, unregisterOnLoadCanceledListener
public static Bundle buildArgs(NetworkTemplate template, long start, long end)
protected void onStartLoading()
Loader
Loader.startLoading()
. This is not called by clients directly,
but as a result of a call to Loader.startLoading()
.onStartLoading
in class Loader<NetworkStats>
public NetworkStats loadInBackground()
AsyncTaskLoader
Loader.deliverResult(D)
on
the UI thread. If implementations need to process the results on the UI thread
they may override Loader.deliverResult(D)
and do so there.
To support cancellation, this method should periodically check the value of
AsyncTaskLoader.isLoadInBackgroundCanceled()
and terminate when it returns true.
Subclasses may also override AsyncTaskLoader.cancelLoadInBackground()
to interrupt the load
directly instead of polling AsyncTaskLoader.isLoadInBackgroundCanceled()
.
When the load is canceled, this method may either return normally or throw
OperationCanceledException
. In either case, the Loader
will
call AsyncTaskLoader.onCanceled(D)
to perform post-cancellation cleanup and to dispose of the
result object, if any.loadInBackground
in class AsyncTaskLoader<NetworkStats>
AsyncTaskLoader.isLoadInBackgroundCanceled()
,
AsyncTaskLoader.cancelLoadInBackground()
,
AsyncTaskLoader.onCanceled(D)
protected void onStopLoading()
Loader
Loader.stopLoading()
. This is not called by clients directly,
but as a result of a call to Loader.stopLoading()
.
This will always be called from the process's main thread.onStopLoading
in class Loader<NetworkStats>
protected void onReset()
Loader
Loader.reset()
. This is not called by clients directly,
but as a result of a call to Loader.reset()
.
This will always be called from the process's main thread.onReset
in class Loader<NetworkStats>