Lines Matching refs:loader

66          * @param id The ID whose loader is to be created.
73 * Called when a previously created loader has finished its load. Note
108 * @param loader The Loader that has finished.
111 public void onLoadFinished(Loader<D> loader, D data);
114 * Called when a previously created loader is being reset, and thus
118 * @param loader The Loader that is being reset.
120 public void onLoaderReset(Loader<D> loader);
124 * Ensures a loader is initialized and active. If the loader doesn't
126 * started) starts the loader. Otherwise the last created
127 * loader is re-used.
129 * <p>In either case, the given callback is associated with the loader, and
130 * will be called as the loader state changes. If at the point of call
131 * the caller is in its started state, and the requested loader
137 * @param id A unique identifier for this loader. Can be whatever you want.
139 * @param args Optional arguments to supply to the loader at construction.
140 * If a loader already exists (a new one does not need to be created), this
143 * changes in the state of the loader. Required.
152 * If a loader with the same id has previously been
153 * started it will automatically be destroyed when the new loader completes
154 * its work. The callback will be delivered before the old loader
157 * @param id A unique identifier for this loader. Can be whatever you want.
159 * @param args Optional arguments to supply to the loader at construction.
161 * changes in the state of the loader. Required.
167 * Stops and removes the loader with the given ID. If this loader
191 * Control whether the framework's internal loader manager debugging
193 * the framework performs loader operations.
204 // These are the currently active loaders. A loader is here
210 // to avoid destroying a loader while an application is still using it.
211 // It allows an application to restart a loader, but continue using its
212 // previously run loader until the new loader's data is available.
258 // If loader already started, don't restart.
298 // This loader was retained in a started state, but
307 // This loader has retained its data, either completely across
333 // Let the loader know we're done with it
388 public void onLoadCanceled(Loader<Object> loader) {
397 // This cancellation message is not coming from the current active loader.
407 // it. So now it is time, switch over to the new loader.
408 if (DEBUG) Log.v(TAG, " Switching to pending loader: " + pending);
417 public void onLoadComplete(Loader<Object> loader, Object data) {
426 // This data is not coming from the current active loader.
436 // it. So now it is time, switch over to the new loader.
437 if (DEBUG) Log.v(TAG, " Switching to pending loader: " + pending);
451 callOnLoadFinished(loader, data);
457 // We have now given the application the new loader with its
459 // loader. If there is a previous loader on the inactive list,
473 void callOnLoadFinished(Loader<Object> loader, Object data) {
481 if (DEBUG) Log.v(TAG, " onLoadFinished in " + loader + ": "
482 + loader.dataToString(data));
483 mCallbacks.onLoadFinished(loader, data);
546 Loader<Object> loader = callback.onCreateLoader(id, args);
547 info.mLoader = (Loader<Object>)loader;
600 throw new IllegalStateException("Called while creating a loader");
610 if (DEBUG) Log.v(TAG, " Created new loader " + info);
612 if (DEBUG) Log.v(TAG, " Re-using existing loader " + info);
617 // If the loader has already generated its data, report it now.
650 throw new IllegalStateException("Called while creating a loader");
659 // This loader now has data... we are probably being
661 // yet destroyed the last inactive loader. So just do
663 if (DEBUG) Log.v(TAG, " Removing last inactive loader: " + info);
669 // We already have an inactive loader for this ID that we are
675 if (DEBUG) Log.v(TAG, " Current loader is stopped; replacing");
682 if (DEBUG) Log.v(TAG, " Current loader is running; attempting to cancel");
685 if (DEBUG) Log.v(TAG, " Removing pending loader: " + info.mPendingLoader);
689 if (DEBUG) Log.v(TAG, " Enqueuing as new pending loader");
696 // Keep track of the previous instance of this loader so we can destroy
698 if (DEBUG) Log.v(TAG, " Making last loader inactive: " + info);
717 throw new IllegalStateException("Called while creating a loader");
745 throw new IllegalStateException("Called while creating a loader");