Home
last modified time | relevance | path

Searched refs:task (Results 1 – 25 of 164) sorted by relevance

1234567

/frameworks/base/libs/hwui/renderthread/
DRenderThread.cpp63 void TaskQueue::queue(RenderTask* task) { in queue() argument
66 LOG_ALWAYS_FATAL_IF(task->mNext || mTail == task, "Task is already in the queue!"); in queue()
69 if (mTail->mRunAt <= task->mRunAt) { in queue()
70 mTail->mNext = task; in queue()
71 mTail = task; in queue()
76 while (next && next->mRunAt <= task->mRunAt) { in queue()
81 task->mNext = mHead; in queue()
82 mHead = task; in queue()
84 previous->mNext = task; in queue()
86 task->mNext = next; in queue()
[all …]
DRenderProxy.cpp52 MethodInvokeRenderTask* task = new MethodInvokeRenderTask((RunnableMethod) Bridge_ ## method); \
53 ARGS(method) *args = (ARGS(method) *) task->payload()
69 mContext = (CanvasContext*) postAndWait(task); in RenderProxy()
90 postAndWait(task); in destroyContext()
103 post(task); in setFrameInterval()
115 post(task); in setSwapBehavior()
132 return (bool) postAndWait(task); in loadSystemProperties()
143 return (bool) postAndWait(task); in initialize()
155 postAndWait(task); in updateSurface()
166 return (bool) postAndWait(task); in pauseSurface()
[all …]
DRenderThread.h53 void queue(RenderTask* task);
54 void queueAtFront(RenderTask* task);
56 void remove(RenderTask* task);
76 ANDROID_API void queue(RenderTask* task);
77 ANDROID_API void queueAtFront(RenderTask* task);
78 void queueAt(RenderTask* task, nsecs_t runAtNs);
79 void remove(RenderTask* task);
/frameworks/base/services/core/java/com/android/server/am/
DTaskPersister.java116 TaskWriteQueueItem(TaskRecord task) { in TaskWriteQueueItem() argument
117 mTask = task; in TaskWriteQueueItem()
172 private void removeThumbnails(TaskRecord task) { in removeThumbnails() argument
173 final String taskString = Integer.toString(task.taskId); in removeThumbnails()
197 void wakeup(TaskRecord task, boolean flush) { in wakeup() argument
199 if (task != null) { in wakeup()
204 ((TaskWriteQueueItem) item).mTask == task) { in wakeup()
205 if (!task.inRecents) { in wakeup()
207 removeThumbnails(task); in wakeup()
212 if (queueNdx < 0 && task.isPersistable) { in wakeup()
[all …]
DActivityStack.java378 final TaskRecord task = mTaskHistory.get(taskNdx); in topRunningNonDelayedActivityLocked() local
379 final ArrayList<ActivityRecord> activities = task.mActivities; in topRunningNonDelayedActivityLocked()
401 TaskRecord task = mTaskHistory.get(taskNdx); in topRunningActivityLocked() local
402 if (task.taskId == taskId) { in topRunningActivityLocked()
405 ArrayList<ActivityRecord> activities = task.mActivities; in topRunningActivityLocked()
440 final TaskRecord task = mTaskHistory.get(taskNdx); in taskForIdLocked() local
441 if (task.taskId == id) { in taskForIdLocked()
442 return task; in taskForIdLocked()
451 final TaskRecord task = r.task; in isInStackLocked() local
452 if (task != null && task.mActivities.contains(r) && mTaskHistory.contains(task)) { in isInStackLocked()
[all …]
DActivityStackSupervisor.java392 stack = parent.task.stack; in isFrontStack()
450 prev.task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE); in resumeHomeStackTask()
468 TaskRecord task = stack.taskForIdLocked(id); in anyTaskForIdLocked() local
469 if (task != null) { in anyTaskForIdLocked()
470 return task; in anyTaskForIdLocked()
477 TaskRecord task = mService.recentTaskForIdLocked(id); in anyTaskForIdLocked() local
478 if (task == null) { in anyTaskForIdLocked()
483 if (!restoreRecentTaskLocked(task)) { in anyTaskForIdLocked()
488 return task; in anyTaskForIdLocked()
923 hist.task.taskId); in startActivityMayWait()
[all …]
/frameworks/opt/bitmap/src/com/android/bitmap/
DContiguousFIFOAggregator.java165 public void execute(final T key, final Runnable task) { in execute() argument
169 if (value == null || task == null) { in execute()
170 if (task != null) { in execute()
171 task.run(); in execute()
176 value.task = task; in execute()
203 if (value.task == null) { in maybeExecuteNow()
213 value.task.run(); in maybeExecuteNow()
301 Runnable task; field in ContiguousFIFOAggregator.Value
303 Value(final Callback<T> callback, final Runnable task) { in Value() argument
305 this.task = task; in Value()
[all …]
/frameworks/base/libs/hwui/thread/
DTaskProcessor.h36 virtual void process(const sp<TaskBase>& task) = 0;
45 bool add(const sp<Task<T> >& task);
47 virtual void onProcess(const sp<Task<T> >& task) = 0;
50 virtual void process(const sp<TaskBase>& task) { in process() argument
51 sp<Task<T> > realTask = static_cast<Task<T>* >(task.get()); in process()
61 bool TaskProcessor<T>::add(const sp<Task<T> >& task) { in add() argument
64 return mManager->addTask(task, self); in add()
DTaskManager.cpp62 bool TaskManager::addTaskBase(const sp<TaskBase>& task, const sp<TaskProcessorBase>& processor) { in addTaskBase() argument
64 TaskWrapper wrapper(task, processor); in addTaskBase()
102 const TaskWrapper& task = tasks.itemAt(i); in threadLoop() local
103 task.mProcessor->process(task.mTask); in threadLoop()
109 bool TaskManager::WorkerThread::addTask(TaskWrapper task) { in addTask() argument
115 ssize_t index = mTasks.add(task); in addTask()
DTaskManager.h61 bool addTask(const sp<Task<T> >& task, const sp<TaskProcessor<T> >& processor) { in addTask() argument
62 return addTaskBase(sp<TaskBase>(task), sp<TaskProcessorBase>(processor)); in addTask()
65 bool addTaskBase(const sp<TaskBase>& task, const sp<TaskProcessorBase>& processor);
70 TaskWrapper(const sp<TaskBase>& task, const sp<TaskProcessorBase>& processor): in TaskWrapper()
71 mTask(task), mProcessor(processor) { in TaskWrapper()
82 bool addTask(TaskWrapper task);
/frameworks/base/core/java/android/hardware/camera2/utils/
DTaskDrainer.java111 public void taskStarted(T task) { in taskStarted() argument
114 Log.v(TAG + "[" + mName + "]", "taskStarted " + task); in taskStarted()
121 if (!mTaskSet.add(task)) { in taskStarted()
122 throw new IllegalStateException("Task " + task + " was already started"); in taskStarted()
142 public void taskFinished(T task) { in taskFinished() argument
145 Log.v(TAG + "[" + mName + "]", "taskFinished " + task); in taskFinished()
148 if (!mTaskSet.remove(task)) { in taskFinished()
149 throw new IllegalStateException("Task " + task + " was already finished"); in taskFinished()
/frameworks/base/services/core/java/com/android/server/wm/
DTaskStack.java172 void addTask(Task task, boolean toTop) { in addTask() argument
178 if (!mService.isCurrentProfileLocked(task.mUserId)) { in addTask()
189 if (DEBUG_TASK_MOVEMENT) Slog.d(TAG, "addTask: task=" + task + " toTop=" + toTop in addTask()
191 mTasks.add(stackNdx, task); in addTask()
193 task.mStack = this; in addTask()
195 EventLog.writeEvent(EventLogTags.WM_TASK_MOVED, task.taskId, toTop ? 1 : 0, stackNdx); in addTask()
198 void moveTaskToTop(Task task) { in moveTaskToTop() argument
199 if (DEBUG_TASK_MOVEMENT) Slog.d(TAG, "moveTaskToTop: task=" + task + " Callers=" in moveTaskToTop()
201 mTasks.remove(task); in moveTaskToTop()
202 addTask(task, true); in moveTaskToTop()
[all …]
/frameworks/support/v4/java/android/support/v4/os/
DAsyncTaskCompat.java37 AsyncTask<Params, Progress, Result> task, in executeParallel() argument
39 if (task == null) { in executeParallel()
45 AsyncTaskCompatHoneycomb.executeParallel(task, params); in executeParallel()
48 task.execute(params); in executeParallel()
51 return task; in executeParallel()
/frameworks/base/docs/html/guide/components/
Dtasks-and-back-stack.jd17 <li><a href="#Starting">Starting a task</a></li>
55 experience by keeping both activities in the same <em>task</em>.</p>
57 <p>A task is a collection of activities that users interact with
64 <h3>Adding fragments to a task's back stack</h3>
84 launcher (or a shortcut on the Home screen), that application's task comes to the foreground. If no
85 task exists for the application (the application has not been used recently), then a new task
103 task adds an item to the back stack. When the user presses the <em>Back</em> button, the current
111 the task began). When all activities are removed from the stack, the task no longer exists.</p>
123 <p>A task is a cohesive unit that can move to the "background" when users begin a new task or go
125 task are
[all …]
Drecents.jd13 <li><a href="#flag-new-doc">Using the Intent flag to add a task</a></li>
14 <li><a href="#attr-doclaunch">Using the Activity attribute to add a task</a></li>
39 <p>The overview screen (also referred to as the recents screen, recent task list, or recent apps)
42 user can navigate through the list and select a task to resume, or the user can remove a task from
45 Google Drive may have a task for each of several Google documents. Each document appears as a
46 task in the overview screen.</p>
50 documents, each represented as a separate task.</p>
62 <p>Using the flags of the {@link android.content.Intent} class to add a task affords greater control
65 attributes you can choose between always opening the document in a new task or reusing an
66 existing task for the document.</p>
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/model/
DRecentsTaskLoadPlan.java140 Task task = new Task(taskKey, (t.id != RecentsTaskLoader.INVALID_TASK_ID), in preloadPlan() local
144 task.thumbnail = loader.getAndUpdateThumbnail(taskKey, mSystemServicesProxy, false); in preloadPlan()
145 if (DEBUG) Log.d(TAG, "\tthumbnail: " + taskKey + ", " + task.thumbnail); in preloadPlan()
146 loadedTasks.add(task); in preloadPlan()
173 Task task = tasks.get(i); in executePlan() local
174 Task.TaskKey taskKey = task.key; in executePlan()
187 boolean isRunningTask = (task.key.id == opts.runningTaskId); in executePlan()
197 if (task.activityIcon == null) { in executePlan()
199 task.activityIcon = loader.getAndUpdateActivityIcon(taskKey, t.taskDescription, in executePlan()
204 if (task.thumbnail == null || isRunningTask) { in executePlan()
[all …]
/frameworks/base/docs/html/training/multiple-threads/
Drun-code.jd33 that run on them. This lesson shows you how to run a task on a thread pool. To do this,
34 you add the task to the pool's work queue. When a thread becomes available, the
35 {@link java.util.concurrent.ThreadPoolExecutor} takes a task from the queue and runs it on the
39 This lesson also shows you how to stop a task that's running. You might want to do this if a
40 task starts, but then discovers that its work isn't necessary. Rather than wasting processor
41 time, you can cancel the thread the task is running on. For example, if you are downloading
42 images from the network and using a cache, you probably want to stop a task if it detects that
48 To start a task object on a thread in a particular thread pool, pass the
50 ThreadPoolExecutor.execute()}. This call adds the task to the thread pool's work queue. When an
51 idle thread becomes available, the manager takes the task that has been waiting the longest and
[all …]
/frameworks/base/libs/hwui/
DTessellationCache.cpp117 virtual void onProcess(const sp<Task<VertexBuffer*> >& task) { in onProcess() argument
118 TessellationTask* t = static_cast<TessellationTask*>(task.get()); in onProcess()
127 Buffer(const sp<Task<VertexBuffer*> >& task) in Buffer() argument
128 : mTask(task) in Buffer()
281 virtual void onProcess(const sp<Task<TessellationCache::vertexBuffer_pair_t*> >& task) { in onProcess() argument
282 ShadowTask* t = static_cast<ShadowTask*>(task.get()); in onProcess()
383 sp<ShadowTask> task = new ShadowTask(drawTransform, localClip, opaque, in precacheShadows() local
388 mShadowProcessor->add(task); in precacheShadows()
390 task->incStrong(NULL); // not using sp<>s, so manually ref while in the cache in precacheShadows()
391 mShadowCache.put(key, task.get()); in precacheShadows()
[all …]
/frameworks/base/docs/html/training/displaying-bitmaps/
Dprocess-bitmap.jd14 <li><a href="#async-task">Use an AsyncTask</a></li>
50 <h2 id="async-task">Use an AsyncTask</h2>
93 is still around when the task finishes, so you must also check the reference in {@link
96 configuration change happens before the task finishes.</p>
98 <p>To start loading the bitmap asynchronously, simply create a new task and execute it:</p>
102 BitmapWorkerTask task = new BitmapWorkerTask(imageView);
103 task.execute(resId);
121 which can later be checked when the task completes. Using a similar method, the {@link
125 back to the worker task. In this case, a {@link android.graphics.drawable.BitmapDrawable} is used so
126 that a placeholder image can be displayed in the {@link android.widget.ImageView} while the task
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/
DTaskStackView.java307 Task task = tv.getTask(); in synchronizeStackViewsWithModel() local
308 int taskIndex = mStack.indexOfTask(task); in synchronizeStackViewsWithModel()
310 mTmpTaskViewMap.put(task, tv); in synchronizeStackViewsWithModel()
318 Task task = tasks.get(i); in synchronizeStackViewsWithModel() local
320 TaskView tv = mTmpTaskViewMap.get(task); in synchronizeStackViewsWithModel()
321 int taskIndex = mStack.indexOfTask(task); in synchronizeStackViewsWithModel()
324 tv = mViewPool.pickUpViewFromPool(task, task); in synchronizeStackViewsWithModel()
694 Task task = tv.getTask(); in onFirstLayout() local
695 if (task.isLaunchTarget) { in onFirstLayout()
696 launchTargetTask = task; in onFirstLayout()
[all …]
DRecentsView.java166 Task task = tv.getTask(); in launchFocusedTask() local
168 onTaskViewClicked(stackView, tv, stack, task, false); in launchFocusedTask()
193 Task task = tasks.get(j); in launchPreviousTask() local
194 TaskView tv = stackView.getChildViewForTask(task); in launchPreviousTask()
195 onTaskViewClicked(stackView, tv, stack, task, false); in launchPreviousTask()
405 … final TaskStack stack, final Task task, final boolean lockToTask) { in onTaskViewClicked() argument
422 … transform = stackView.getStackAlgorithm().getStackTransform(task, stackScroll, transform, null); in onTaskViewClicked()
427 … transform = stackView.getStackAlgorithm().getStackTransform(task, stackScroll, transform, null); in onTaskViewClicked()
434 if (task.thumbnail != null && task.thumbnail.getWidth() > 0 && in onTaskViewClicked()
435 task.thumbnail.getHeight() > 0) { in onTaskViewClicked()
[all …]
/frameworks/base/tests/ActivityTests/src/com/google/android/test/activity/
DActivityTestMain.java102 final ActivityManager.RecentTaskInfo task, in addThumbnail() argument
116 if (task.id >= 0 && thumbs != null) { in addThumbnail()
117 mAm.moveTaskToFront(task.id, ActivityManager.MOVE_TASK_WITH_HOME); in addThumbnail()
120 startActivity(task.baseIntent); in addThumbnail()
131 if (task.id >= 0 && thumbs != null) { in addThumbnail()
132 mAm.removeTask(task.id); in addThumbnail()
378 ActivityManager.AppTask task = findDocTask(); in onCreateOptionsMenu()
379 if (task == null) { in onCreateOptionsMenu()
386 task.moveToFront(); in onCreateOptionsMenu()
393 ActivityManager.AppTask task = findDocTask(); in onCreateOptionsMenu()
[all …]
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
DRecentLoader.java177 final RecentTask task = new RecentTask(root.authority, root.rootId); in loadInBackground() local
178 mTasks.put(root, task); in loadInBackground()
183 for (RecentTask task : mTasks.values()) { in loadInBackground()
184 ProviderExecutor.forAuthority(task.authority).execute(task); in loadInBackground()
200 for (RecentTask task : mTasks.values()) { in loadInBackground()
201 if (task.isDone()) { in loadInBackground()
203 final Cursor cursor = task.get(); in loadInBackground()
307 for (RecentTask task : mTasks.values()) { in onReset()
308 IoUtils.closeQuietly(task); in onReset()
DProviderExecutor.java76 public <P> void execute(AsyncTask<P, ?, ?> task, P... params) { in execute() argument
77 if (task instanceof Preemptable) { in execute()
79 mPreemptable.add(new WeakReference<Preemptable>((Preemptable) task)); in execute()
81 task.executeOnExecutor(mNonPreemptingExecutor, params); in execute()
83 task.executeOnExecutor(this, params); in execute()
/frameworks/support/v4/java/android/support/v4/content/
DAsyncTaskLoader.java199 void dispatchOnCancelled(LoadTask task, D data) { in dispatchOnCancelled() argument
201 if (mCancellingTask == task) { in dispatchOnCancelled()
210 void dispatchOnLoadComplete(LoadTask task, D data) { in dispatchOnLoadComplete() argument
211 if (mTask != task) { in dispatchOnLoadComplete()
213 dispatchOnCancelled(task, data); in dispatchOnLoadComplete()
256 LoadTask task = mTask; in waitForLoader() local
257 if (task != null) { in waitForLoader()
259 task.done.await(); in waitForLoader()

1234567