Home
last modified time | relevance | path

Searched refs:AsyncTask (Results 1 – 25 of 108) sorted by relevance

12345

/frameworks/support/v4/honeycomb/android/support/v4/os/
DAsyncTaskCompatHoneycomb.java19 import android.os.AsyncTask;
27 AsyncTask<Params, Progress, Result> task, in executeParallel()
29 task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params); in executeParallel()
/frameworks/support/v4/java/android/support/v4/os/
DAsyncTaskCompat.java19 import android.os.AsyncTask;
36 public static <Params, Progress, Result> AsyncTask<Params, Progress, Result> executeParallel( in executeParallel()
37 AsyncTask<Params, Progress, Result> task, in executeParallel()
/frameworks/base/docs/html/training/improving-layouts/
Dsmooth-scrolling.jd18 <li><a href="#AsyncTask">Use a Background Thread</a></li>
38 <h2 id="AsyncTask">Use a Background Thread</h2>
41 on drawing the UI. In many cases, using {@link android.os.AsyncTask} provides a simple way to
42 perform your work outside the main thread. {@link android.os.AsyncTask} automatically queues up all
43 the {@link android.os.AsyncTask#execute execute()} requests and performs them serially. This
47 <p>In the sample code below, an {@link android.os.AsyncTask} is used to load
52 // Using an AsyncTask to load the slow images in a background thread
53 new AsyncTask&lt;ViewHolder, Void, Bitmap>() {
77 android.os.AsyncTask} so you can enable it to run across multiple processor cores. Instead of
78 calling {@link android.os.AsyncTask#execute execute()} you can specify {@link
[all …]
/frameworks/base/core/java/android/os/
DAsyncTask.java177 public abstract class AsyncTask<Params, Progress, Result> { class
269 synchronized (AsyncTask.class) { in getHandler()
285 public AsyncTask() { in AsyncTask() method in AsyncTask
538 public final AsyncTask<Params, Progress, Result> execute(Params... params) { in execute()
575 public final AsyncTask<Params, Progress, Result> executeOnExecutor(Executor exec, in executeOnExecutor()
668 final AsyncTask mTask;
671 AsyncTaskResult(AsyncTask task, Data... data) { in AsyncTaskResult()
/frameworks/base/docs/html/training/basics/network-ops/
Dconnecting.jd20 <li><a href="#AsyncTask">Perform Network Operations on a Separate Thread</a></li>
87 <h2 id="AsyncTask">Perform Network Operations on a Separate Thread</h2>
91 thread from the UI. The {@link android.os.AsyncTask} class provides one of the
101 android.os.AsyncTask}. <code>DownloadWebpageTask</code> implements the following
102 {@link android.os.AsyncTask} methods:</p>
106 <li>{@link android.os.AsyncTask#doInBackground doInBackground()} executes
111 <li>{@link android.os.AsyncTask#onPostExecute onPostExecute()} takes the
131 // When user clicks button, calls AsyncTask.
146 // Uses AsyncTask to create a task away from the main UI thread. This task takes a
148 // has been established, the AsyncTask downloads the contents of the webpage as
[all …]
/frameworks/opt/chips/src/com/android/ex/chips/
DDefaultPhotoManager.java22 import android.os.AsyncTask;
87 final AsyncTask<Void, Void, byte[]> photoLoadTask = new AsyncTask<Void, Void, byte[]>() { in fetchPhotoAsync()
143 photoLoadTask.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); in fetchPhotoAsync()
/frameworks/base/docs/html/training/displaying-bitmaps/
Dprocess-bitmap.jd14 <li><a href="#async-task">Use an AsyncTask</a></li>
48 {@link android.os.AsyncTask} and shows you how to handle concurrency issues.</p>
50 <h2 id="async-task">Use an AsyncTask</h2>
52 <p>The {@link android.os.AsyncTask} class provides an easy way to execute some work in a background
55 android.widget.ImageView} using {@link android.os.AsyncTask} and <a
61 class BitmapWorkerTask extends AsyncTask&lt;Integer, Void, Bitmap&gt; {
91 {@link android.os.AsyncTask} does not prevent the {@link android.widget.ImageView} and anything it
94 android.os.AsyncTask#onPostExecute(Result) onPostExecute()}. The {@link android.widget.ImageView}
111 android.os.AsyncTask} as demonstrated in the previous section. In order to be efficient with memory,
113 android.os.AsyncTask}, there is no guarantee that when it completes, the associated view has not
[all …]
/frameworks/base/tests/MusicServiceDemo/src/com/example/android/musicservicedemo/browser/
DMusicProviderTask.java19 import android.os.AsyncTask;
27 public class MusicProviderTask extends AsyncTask<Void, Void, Void> {
/frameworks/base/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/
DTextureBase.java22 import android.os.AsyncTask;
32 class SingleImageLoaderTask extends AsyncTask<TextureBase, Void, Boolean> {
DColladaScene.java33 import android.os.AsyncTask;
71 private class ColladaLoaderTask extends AsyncTask<String, Void, Boolean> {
111 private class A3DLoaderTask extends AsyncTask<String, Void, Boolean> {
/frameworks/base/core/java/android/print/
DPrintFileDocumentAdapter.java20 import android.os.AsyncTask;
90 mWriteFileAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, in onWrite()
94 private final class WriteFileAsyncTask extends AsyncTask<Void, Void, Void> {
/frameworks/base/test-runner/src/android/test/
DLoaderTestCase.java21 import android.os.AsyncTask;
40 new AsyncTask<Void, Void, Void>() { in AsyncTask() method
/frameworks/base/docs/html/training/articles/
Dperf-anr.jd95 operations is with the {@link android.os.AsyncTask}
96 class. Simply extend {@link android.os.AsyncTask} and implement the
97 {@link android.os.AsyncTask#doInBackground doInBackground()} method to perform the work.
99 {@link android.os.AsyncTask#publishProgress publishProgress()}, which invokes the
100 {@link android.os.AsyncTask#onProgressUpdate onProgressUpdate()} callback method. From your
101 implementation of {@link android.os.AsyncTask#onProgressUpdate onProgressUpdate()} (which
105 private class DownloadFilesTask extends AsyncTask&lt;URL, Integer, Long> {
132 call {@link android.os.AsyncTask#execute execute()}:</p>
139 <p>Although it's more complicated than {@link android.os.AsyncTask}, you might want to instead
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
DProviderExecutor.java19 import android.os.AsyncTask;
76 public <P> void execute(AsyncTask<P, ?, ?> task, P... params) { in execute()
DRootsCache.java32 import android.os.AsyncTask;
112 new UpdateTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); in updateAsync()
119 new UpdateTask(packageName).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); in updatePackageAsync()
158 private class UpdateTask extends AsyncTask<Void, Void, Void> {
DCreateDirectoryFragment.java31 import android.os.AsyncTask;
85 private class CreateDirectoryTask extends AsyncTask<Void, Void, DocumentInfo> {
/frameworks/base/tests/LargeAssetTest/src/com/android/largeassettest/
DLargeAssetTest.java22 import android.os.AsyncTask;
63 class Validator extends AsyncTask<AssetManager, Integer, Boolean> {
/frameworks/base/packages/SystemUI/src/com/android/systemui/recent/
DRecentTasksLoader.java32 import android.os.AsyncTask;
64 private AsyncTask<Void, ArrayList<TaskDescription>, Void> mTaskLoader;
65 private AsyncTask<Void, TaskDescription, Void> mThumbnailLoader;
428 mTaskLoader = new AsyncTask<Void, ArrayList<TaskDescription>, Void>() { in loadTasksInBackground()
532 mTaskLoader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); in loadTasksInBackground()
541 mThumbnailLoader = new AsyncTask<Void, TaskDescription, Void>() { in loadThumbnailsAndIconsInBackground()
584 mThumbnailLoader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); in loadThumbnailsAndIconsInBackground()
/frameworks/base/docs/html/guide/components/
Dprocesses-and-threads.jd294 thread. Perhaps the best solution, though, is to extend the {@link android.os.AsyncTask} class,
298 <h4 id="AsyncTask">Using AsyncTask</h4>
300 <p>{@link android.os.AsyncTask} allows you to perform asynchronous work on your user
304 <p>To use it, you must subclass {@link android.os.AsyncTask} and implement the {@link
305 android.os.AsyncTask#doInBackground doInBackground()} callback method, which runs in a pool of
307 android.os.AsyncTask#onPostExecute onPostExecute()}, which delivers the result from {@link
308 android.os.AsyncTask#doInBackground doInBackground()} and runs in the UI thread, so you can safely
309 update your UI. You can then run the task by calling {@link android.os.AsyncTask#execute execute()}
312 <p>For example, you can implement the previous example using {@link android.os.AsyncTask} this
320 private class DownloadImageTask extends AsyncTask&lt;String, Void, Bitmap&gt; {
[all …]
/frameworks/base/core/java/android/content/
DAsyncTaskLoader.java19 import android.os.AsyncTask;
57 final class LoadTask extends AsyncTask<Void, Void, D> implements Runnable {
137 this(context, AsyncTask.THREAD_POOL_EXECUTOR); in AsyncTaskLoader()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/
DPageContentRepository.java28 import android.os.AsyncTask;
466 mOpenTask.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); in open()
476 new AsyncTask<Void, Void, Void>() { in close() method
506 }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); in close()
633 renderTask.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); in renderPage()
653 private final class OpenTask extends AsyncTask<Void, Void, Integer> {
738 private final class RenderPageTask extends AsyncTask<Void, Void, RenderedPage> {
DNotificationController.java28 import android.os.AsyncTask;
332 new AsyncTask<Void, Void, Void>() { in handleCancelPrintJob() method
354 }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null); in handleCancelPrintJob()
371 new AsyncTask<Void, Void, Void>() { in handleRestartPrintJob() method
391 }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null); in handleRestartPrintJob()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DUserInfoController.java31 import android.os.AsyncTask;
52 private AsyncTask<Void, Void, Pair<String, Drawable>> mUserInfoTask;
142 mUserInfoTask = new AsyncTask<Void, Void, Pair<String, Drawable>>() { in queryForUserInformation()
/frameworks/base/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/
DTestAppLoadingScreen.java29 import android.os.AsyncTask;
65 private class LoadingScreenLoaderTask extends AsyncTask<String, Void, Boolean> {
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/
DBrightnessController.java23 import android.os.AsyncTask;
206 AsyncTask.execute(new Runnable() { in onChanged()
218 AsyncTask.execute(new Runnable() { in onChanged()

12345