Home | History | Annotate | Download | only in interactions

Lines Matching refs:loader

22 import android.content.Loader;
62 * the loader to complete.
71 * If the loader completes before the call to {@link #waitForLoaders(int...)}, the TestLoaderManager
72 * will have stored the fact that the loader has completed and correctly terminate immediately.
74 * It one needs to wait for the same loader multiple times, call {@link #reset()} between the them
131 List<Loader<?>> loaders = new ArrayList<Loader<?>>(loaderIds.length);
134 // This loader has already completed since the last reset, do not wait for it.
138 final AsyncTaskLoader<?> loader =
140 if (loader == null) {
141 Assert.fail("Loader does not exist: " + loaderId);
145 loaders.add(loader);
148 waitForLoaders(loaders.toArray(new Loader<?>[0]));
154 public static void waitForLoaders(Loader<?>... loaders) {
155 // We want to wait for each loader using a separate thread, so that we can
159 final AsyncTaskLoader<?> loader = (AsyncTaskLoader<?>) loaders[i];
164 loader.waitForLoader();
166 Log.e(TAG, "Exception while waiting for loader: " + loader.getId(), e);
167 Assert.fail("Exception while waiting for loader: " + loader.getId());
185 public <D> Loader<D> initLoader(final int id, Bundle args, final LoaderCallbacks<D> callback) {
188 public Loader<D> onCreateLoader(int id, Bundle args) {
193 public void onLoadFinished(Loader<D> loader, D data) {
194 callback.onLoadFinished(loader, data);
201 public void onLoaderReset(Loader<D> loader) {
202 callback.onLoaderReset(loader);
208 public <D> Loader<D> restartLoader(int id, Bundle args, LoaderCallbacks<D> callback) {
218 public <D> Loader<D> getLoader(int id) {