/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
H A D | NamedTaskExecutor.java | 25 * Schedules a task for execution. Implementations should not throw 26 * {@link java.util.concurrent.RejectedExecutionException} if the task 29 void execute(NamedTask task); argument
|
H A D | SingleThreadNamedTaskExecutor.java | 56 public void execute(NamedTask task) { argument 60 mQueue.add(task); 76 NamedTask task; 78 task = mQueue.take(); 82 currentThread.setName(threadName + " " + task.getName()); 84 if (DBG) Log.d(TAG, "Running task " + task.getName()); 85 task.run(); 86 if (DBG) Log.d(TAG, "Task " + task.getName() + " complete"); 88 Log.e(TAG, "Task " + task [all...] |
H A D | BatchingNamedTaskExecutor.java | 48 public void execute(NamedTask task) { argument 50 if (DBG) Log.d(TAG, "Queuing " + task); 51 mQueuedTasks.add(task); 55 private void dispatch(NamedTask task) { argument 56 if (DBG) Log.d(TAG, "Dispatching " + task); 57 mExecutor.execute(task); 74 for (NamedTask task : batch) { 75 dispatch(task);
|
H A D | PerNameExecutor.java | 23 * Uses a separate executor for each task name. 51 public synchronized void execute(NamedTask task) { argument 55 String name = task.getName(); 61 executor.execute(task);
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/ |
H A D | ProcessingTaskController.java | 42 ProcessingTask task = mTasks.get(msg.what); 43 if (task != null) { 45 task.onResult((ProcessingTask.Result) msg.obj); 47 task.onUpdate((ProcessingTask.Update) msg.obj); 57 ProcessingTask task = mTasks.get(msg.what); 58 if (task != null) { 59 task.processRequest((ProcessingTask.Request) msg.obj); 89 public void add(ProcessingTask task) { argument 90 task.added(this); 91 mTasks.put(task [all...] |
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/ |
H A D | SingleThreadNamedTaskExecutorTest.java | 50 MockTask task = new MockTask(name, id); 51 mExecutor.execute(task); 52 return task;
|
H A D | MockTask.java | 22 * A task that knows how many times it has been run. 71 for (MockTask task : tasks) { 72 task.assertRanNever(message); 77 for (MockTask task : tasks) { 78 task.assertRanOnce(message);
|
H A D | MockNamedTaskExecutor.java | 23 * A simple executor that maintains a queue and executes one task synchronously every 31 public void execute(NamedTask task) { argument 32 mExecutor.execute(task);
|
H A D | MockExecutor.java | 23 * A simple executor that maintains a queue and executes one task synchronously every 33 public void execute(Runnable task) { argument 35 mQueue.addLast(task);
|
H A D | PerNameExecutorTest.java | 101 MockTask task = new MockTask(name, id); 102 mExecutor.execute(task); 103 return task; 107 * Run one task for each name.
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
H A D | AsyncTaskUtil.java | 49 public static <Param> void executeInParallel(AsyncTask<Param, ?, ?> task, Param... params) { argument 51 task.execute(params); 54 sMethodExecuteOnExecutor.invoke(task, sExecutor, params);
|
/packages/apps/Dialer/tests/src/com/android/dialer/util/ |
H A D | FakeAsyncTaskExecutor.java | 68 /** Encapsulates an async task with the params and identifier it was submitted with. */ 125 AsyncTask<T, ?, ?> task, T... params) { 130 Assert.assertNotNull("Already had a valid task.\n" 132 + "onPreExecute() method of another task being submitted?\n" 133 + "Sorry! Not that's not supported.", task); 134 mNextTask = task; 136 return task.executeOnExecutor(this, params); 141 public <T> AsyncTask<T, ?, ?> submit(Object identifier, AsyncTask<T, ?, ?> task, T... params) { argument 143 return mBlockingExecutor.submit(identifier, task, params); 147 * Runs a single task matchin 124 submit(Object identifier, AsyncTask<T, ?, ?> task, T... params) argument [all...] |
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/ |
H A D | EmailAsyncTask.java | 54 private void add(EmailAsyncTask<?, ?, ?> task) { argument 56 mTasks.add(task); 60 private void remove(EmailAsyncTask<?, ?, ?> task) { argument 62 mTasks.remove(task); 72 for (EmailAsyncTask<?, ?, ?> task : mTasks) { 73 task.cancel(true); 88 for (EmailAsyncTask<?, ?, ?> task : mTasks) { 89 if ((task != current) && task.getClass().equals(clazz)) { 90 task 104 containsTaskForTest(EmailAsyncTask<?, ?, ?> task) argument [all...] |
/packages/apps/Dialer/src/com/android/dialer/util/ |
H A D | AsyncTaskExecutor.java | 43 * The identifier supplied is any Object that can be used to identify the task later. Most 45 * accepted, though of course this won't help in identifying the task later. 47 <T> AsyncTask<T, ?, ?> submit(Object identifier, AsyncTask<T, ?, ?> task, T... params); argument
|
H A D | AsyncTaskExecutors.java | 94 public <T> AsyncTask<T, ?, ?> submit(Object identifer, AsyncTask<T, ?, ?> task, argument 97 return task.executeOnExecutor(mExecutor, params);
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | PreparePageFadeoutTexture.java | 68 PreparePageFadeoutTexture task = new PreparePageFadeoutTexture(rootPane); 69 if (task.isCancelled()) return; 74 root.addOnGLIdleListener(task); 75 texture = task.get();
|
/packages/apps/Camera2/src/com/android/camera/processing/ |
H A D | ProcessingService.java | 49 * {@code ProcessingTask} task: 53 * ProcessingTask task = new MyProcessingTask(...); 54 * ProcessingService.addTask(task); 195 ProcessingTask task; 196 while ((task = mProcessingServiceManager.popNextSession()) != null) { 197 mCurrentTask = task; 206 processAndNotify(task); 217 void processAndNotify(ProcessingTask task) { argument 218 if (task == null) { 222 CaptureSession session = task [all...] |
H A D | ProcessingServiceManager.java | 77 * Enqueues a new task. If the service is not already running, it will be 80 * @param task The task to be enqueued. 82 public synchronized void enqueueTask(ProcessingTask task) { argument 83 mQueue.add(task); 92 * Remove the next task from the queue and return it. 152 * is empty {@link #popNextSession()} returns null), the task will kill
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/ |
H A D | BitmapDownloader.java | 141 BitmapWorkerTask task = new BitmapWorkerTask(null) { 152 return task.doInBackground(options); 173 BitmapWorkerTask task = new BitmapWorkerTask(imageView) { 183 imageView.setTag(R.id.imageDownloadTask, new SoftReference<BitmapWorkerTask>(task)); 184 task.execute(options); 201 BitmapWorkerTask task = new BitmapWorkerTask(null) { 219 callback.mTask = new SoftReference<BitmapWorkerTask>(task); 220 task.executeOnExecutor(BITMAP_DOWNLOADER_THREAD_POOL_EXECUTOR, options); 228 BitmapWorkerTask task = null; 234 task [all...] |
H A D | DrawableDownloader.java | 233 DrawableLoader task = new DrawableLoader(null, mRecycledBitmaps) { 243 return task.doInBackground(options); 264 DrawableLoader task = new DrawableLoader(imageView, mRecycledBitmaps) { 274 imageView.setTag(R.id.imageDownloadTask, new SoftReference<DrawableLoader>(task)); 275 scheduleTask(task, options); 296 DrawableLoader task = new DrawableLoader(null, mRecycledBitmaps) { 311 callback.mTask = new SoftReference<DrawableLoader>(task); 312 scheduleTask(task, options); 315 private static void scheduleTask(DrawableLoader task, BitmapWorkerOptions options) { argument 317 task [all...] |
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
H A D | QueryTask.java | 28 * A task that gets suggestions from a corpus. 41 * Creates a new query task. 82 QueryTask<C> task = new QueryTask<C>(query, maxResults, provider, handler, 84 executor.execute(task);
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
H A D | SynchronousContactsProvider2.java | 125 protected void scheduleBackgroundTask(int task) { argument 126 performBackgroundTask(task, null); 130 protected void scheduleBackgroundTask(int task, Object arg) { argument 131 performBackgroundTask(task, arg);
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/dialog/ |
H A D | ClearFrequentsDialog.java | 51 final AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() { 64 task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
/packages/apps/Dialer/src/com/android/dialer/calllog/ |
H A D | ClearCallLogDialog.java | 59 final AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() { 76 task.execute();
|
/packages/apps/Email/tests/src/com/android/email/ |
H A D | ThrottleTest.java | 186 public void schedule(TimerTask task, long delay) { argument 188 task.run(); 192 e.mTask = task;
|