Home
last modified time | relevance | path

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

123456789

/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/task/
DConnectMobileNetworkTaskRoboTest.java1 package com.android.managedprovisioning.task;
19 import com.android.managedprovisioning.task.AbstractProvisioningTask.Callback;
66 ConnectMobileNetworkTask task = buildTask(callback); in run_withoutConnection_noCallbackSuccess() local
68 runTask(task); in run_withoutConnection_noCallbackSuccess()
70 assertThat(callback.getSuccessCount(task)).isEqualTo(0); in run_withoutConnection_noCallbackSuccess()
76 ConnectMobileNetworkTask task = buildTask(callback); in connectToNetwork_afterRun_callbackSuccess() local
78 runTask(task); in connectToNetwork_afterRun_callbackSuccess()
82 assertThat(callback.getSuccessCount(task)).isEqualTo(1); in connectToNetwork_afterRun_callbackSuccess()
83 assertThat(callback.getErrorCount(task)).isEqualTo(0); in connectToNetwork_afterRun_callbackSuccess()
89 ConnectMobileNetworkTask task = buildTask(callback); in connectToNetworkTwice_afterRun_oneCallbackSuccess() local
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/scheduling/
DTaskQueue.java44 for (Task task : queue) { in toBundles()
45 result.add(Tasks.toBundle(task)); in toBundles()
54 Task task = Tasks.createTask(context, pendingTask); in fromBundles() local
55 task.onRestore(pendingTask); in fromBundles()
56 add(task); in fromBundles()
70 public boolean add(Task task) { in add() argument
71 if (task.getId().id == Task.TASK_INVALID) { in add()
74 if (task.getId().id != Task.TASK_ALLOW_DUPLICATES) { in add()
75 Task oldTask = getTask(task.getId()); in add()
77 oldTask.onDuplicatedTaskAdded(task); in add()
[all …]
DRetryPolicy.java38 private BaseTask task; field in RetryPolicy
64 public void onCreate(BaseTask task, Bundle extras) { in onCreate() argument
65 this.task = task; in onCreate()
73 + this.task in onCreate()
76 this.task.setExecutionTime(this.task.getTimeMillis() + retryDelayMillis); in onCreate()
78 PhoneAccountHandle phoneAccountHandle = task.getPhoneAccountHandle(); in onCreate()
80 VvmLog.e(TAG, "null phone account for phoneAccountHandle " + task.getPhoneAccountHandle()); in onCreate()
84 voicemailStatusEditor = VoicemailStatus.deferredEdit(task.getContext(), phoneAccountHandle); in onCreate()
94 VvmLog.i(TAG, task + " completed successfully"); in onCompleted()
97 VvmLog.i(TAG, "Retry limit for " + task + " reached"); in onCompleted()
[all …]
DPostponePolicy.java33 private BaseTask task; field in PostponePolicy
40 public void onCreate(BaseTask task, Bundle extras) { in onCreate() argument
41 this.task = task; in onCreate()
42 this.task.setExecutionTime(this.task.getTimeMillis() + postponeMillis); in onCreate()
62 if (task.hasStarted()) { in onDuplicatedTaskAdded()
65 VvmLog.i(TAG, "postponing " + task); in onDuplicatedTaskAdded()
66 task.setExecutionTime(task.getTimeMillis() + postponeMillis); in onDuplicatedTaskAdded()
DTaskExecutor.java207 Task task = (Task) msg.obj;
209 VvmLog.i(TAG, "executing task " + task);
210 task.onExecuteInBackgroundThread();
212 VvmLog.e(TAG, "Exception while executing task " + task + ":", throwable);
216 schedulerMessage.obj = task;
233 Task task = (Task) msg.obj;
234 getTasks().remove(task);
235 task.onCompleted();
281 void addTask(Task task) {
283 getTasks().add(task);
[all …]
DMinimalIntervalPolicy.java30 BaseTask task; field in MinimalIntervalPolicy
39 public void onCreate(BaseTask task, Bundle extras) { in onCreate() argument
40 this.task = task; in onCreate()
41 id = this.task.getId(); in onCreate()
49 if (!task.hasFailed()) { in onCompleted()
51 BaseTask.createIntent(task.getContext(), BlockerTask.class, id.phoneAccountHandle); in onCompleted()
54 task.getContext().sendBroadcast(intent); in onCompleted()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/provisioning/
DDeviceOwnerProvisioningController.java26 import com.android.managedprovisioning.task.AbstractProvisioningTask;
27 import com.android.managedprovisioning.task.AddWifiNetworkTask;
28 import com.android.managedprovisioning.task.ConnectMobileNetworkTask;
29 import com.android.managedprovisioning.task.CopyAccountToUserTask;
30 import com.android.managedprovisioning.task.DeleteNonRequiredAppsTask;
31 import com.android.managedprovisioning.task.DeviceOwnerInitializeProvisioningTask;
32 import com.android.managedprovisioning.task.DisallowAddUserTask;
33 import com.android.managedprovisioning.task.DownloadPackageTask;
34 import com.android.managedprovisioning.task.InstallPackageTask;
35 import com.android.managedprovisioning.task.SetDevicePolicyTask;
[all …]
DProfileOwnerProvisioningController.java29 import com.android.managedprovisioning.task.AbstractProvisioningTask;
30 import com.android.managedprovisioning.task.CopyAccountToUserTask;
31 import com.android.managedprovisioning.task.CreateManagedProfileTask;
32 import com.android.managedprovisioning.task.DeleteNonRequiredAppsTask;
33 import com.android.managedprovisioning.task.DisableInstallShortcutListenersTask;
34 import com.android.managedprovisioning.task.InstallExistingPackageTask;
35 import com.android.managedprovisioning.task.ManagedProfileSettingsTask;
36 import com.android.managedprovisioning.task.SetDevicePolicyTask;
37 import com.android.managedprovisioning.task.StartManagedProfileTask;
94 public synchronized void onSuccess(AbstractProvisioningTask task) { in onSuccess() argument
[all …]
DAdminIntegratedFlowPrepareController.java25 import com.android.managedprovisioning.task.AbstractProvisioningTask;
26 import com.android.managedprovisioning.task.AddWifiNetworkTask;
27 import com.android.managedprovisioning.task.ConnectMobileNetworkTask;
28 import com.android.managedprovisioning.task.DownloadPackageTask;
29 import com.android.managedprovisioning.task.InstallPackageTask;
30 import com.android.managedprovisioning.task.VerifyPackageTask;
78 protected int getErrorMsgId(AbstractProvisioningTask task, int errorCode) { in getErrorMsgId() argument
79 if (task instanceof AddWifiNetworkTask) { in getErrorMsgId()
81 } else if (task instanceof DownloadPackageTask) { in getErrorMsgId()
88 } else if (task instanceof VerifyPackageTask) { in getErrorMsgId()
[all …]
DAbstractProvisioningController.java36 import com.android.managedprovisioning.task.AbstractProvisioningTask;
97 for (AbstractProvisioningTask task : tasks) { in addTasks()
98 mTasks.add(task); in addTasks()
105 protected abstract int getErrorMsgId(AbstractProvisioningTask task, int errorCode); in getErrorMsgId() argument
106 protected abstract boolean getRequireFactoryReset(AbstractProvisioningTask task, int errorCode); in getRequireFactoryReset() argument
158 public synchronized void onSuccess(AbstractProvisioningTask task) { in onSuccess() argument
173 public synchronized void onError(AbstractProvisioningTask task, int errorCode) { in onError() argument
176 mProvisioningAnalyticsTracker.logProvisioningError(mContext, task, errorCode); in onError()
177 mCallback.error(getErrorTitle(), getErrorMsgId(task, errorCode), in onError()
178 getRequireFactoryReset(task, errorCode)); in onError()
[all …]
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/
DTestTimer.java48 Task task = mTaskList.getFirst(); in fastForwardTo() local
49 if (!task.isCancelled()) { in fastForwardTo()
50 task.run(); in fastForwardTo()
78 Task task = iter.next(); in purge() local
79 if (task.isCancelled()) { in purge()
88 public void schedule(TimerTask task, Date time) { in schedule() argument
90 scheduleAtTime(task, executeTime); in schedule()
94 public void schedule(TimerTask task, Date firstTime, long period) { in schedule() argument
99 public void schedule(TimerTask task, long delay) { in schedule() argument
101 scheduleAtTime(task, executeTime); in schedule()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/recorder/
DSeriesRecordingScheduler.java111 SeriesRecordingUpdateTask task = iter.next();
113 task.getSeriesRecordings(),
117 task.cancel(true);
122 FetchSeriesInfoTask task =
124 if (task != null) {
125 task.cancel(true);
241 FetchSeriesInfoTask task = mFetchSeriesInfoTasks.get(mFetchSeriesInfoTasks.keyAt(i)); in stop() local
242 task.cancel(true); in stop()
245 for (SeriesRecordingUpdateTask task : mScheduleTasks) { in stop()
246 task.cancel(true); in stop()
[all …]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/
DEmailAsyncTask.java54 private void add(EmailAsyncTask<?, ?, ?> task) { in add() argument
56 mTasks.add(task); in add()
60 private void remove(EmailAsyncTask<?, ?, ?> task) { in remove() argument
62 mTasks.remove(task); in remove()
72 for (EmailAsyncTask<?, ?, ?> task : mTasks) { in cancelAllInterrupt()
73 task.cancel(true); in cancelAllInterrupt()
88 for (EmailAsyncTask<?, ?, ?> task : mTasks) { in cancelOthers()
89 if ((task != current) && task.getClass().equals(clazz)) { in cancelOthers()
90 task.cancel(true); in cancelOthers()
91 toRemove.add(task); in cancelOthers()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/
DOmtpService.java52 VisualVoicemailTask task, final PhoneAccountHandle phoneAccountHandle) { in onCellServiceConnected() argument
56 task.finish(); in onCellServiceConnected()
62 task.finish(); in onCellServiceConnected()
68 task.finish(); in onCellServiceConnected()
74 task.finish(); in onCellServiceConnected()
78 public void onSmsReceived(VisualVoicemailTask task, final VisualVoicemailSms sms) { in onSmsReceived() argument
82 task.finish(); in onSmsReceived()
94 task.finish(); in onSmsReceived()
105 task.finish(); in onSmsReceived()
110 final VisualVoicemailTask task, final PhoneAccountHandle phoneAccountHandle) { in onSimRemoved() argument
[all …]
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/
DImageBackend.java326 public boolean appendTasks(ImageToProcess img, TaskImageContainer task) { in appendTasks() argument
328 tasks.add(task); in appendTasks()
349 public boolean receiveImage(ImageToProcess img, TaskImageContainer task, in receiveImage() argument
352 return receiveImage(img, task, blockUntilImageRelease, closeOnImageRelease, in receiveImage()
375 public boolean receiveImage(ImageToProcess img, TaskImageContainer task, in receiveImage() argument
380 passTasks.add(task); in receiveImage()
592 for (TaskImageContainer task : tasks) { in initializeTaskDone()
593 sessionSet.add(task.mSession); in initializeTaskDone()
594 Integer currentCount = sessionTaskCount.get(task.mSession); in initializeTaskDone()
596 sessionTaskCount.put(task.mSession, 1); in initializeTaskDone()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DTaskIconCache.java89 public IconLoadRequest updateIconInBackground(Task task, Consumer<Task> callback) { in updateIconInBackground() argument
91 if (task.icon != null) { in updateIconInBackground()
93 callback.accept(task); in updateIconInBackground()
100 Drawable icon = mIconLoader.getIcon(task); in updateIconInBackground()
101 String contentDescription = loadContentDescriptionInBackground(task); in updateIconInBackground()
107 task.icon = icon; in updateIconInBackground()
108 task.titleDescription = contentDescription; in updateIconInBackground()
109 callback.accept(task); in updateIconInBackground()
126 private String loadContentDescriptionInBackground(Task task) { in loadContentDescriptionInBackground() argument
128 String label = mContentDescriptionCache.getAndInvalidateIfModified(task.key); in loadContentDescriptionInBackground()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/
DOtaControllerTest.java40 import com.android.managedprovisioning.task.AbstractProvisioningTask;
41 import com.android.managedprovisioning.task.CrossProfileIntentFiltersSetter;
42 import com.android.managedprovisioning.task.DeleteNonRequiredAppsTask;
43 import com.android.managedprovisioning.task.DisableInstallShortcutListenersTask;
44 import com.android.managedprovisioning.task.DisallowAddUserTask;
45 import com.android.managedprovisioning.task.InstallExistingPackageTask;
46 import com.android.managedprovisioning.task.MigrateSystemAppsSnapshotTask;
247 public synchronized void execute(int userId, AbstractProvisioningTask task) { in execute() argument
248 mTasks.add(Pair.create(userId, task)); in execute()
286 for (Pair<Integer, Class> task : tasks) { in assertTaskList()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/provisioning/
DDeviceOwnerProvisioningControllerTest.java34 import com.android.managedprovisioning.task.AbstractProvisioningTask;
35 import com.android.managedprovisioning.task.AddWifiNetworkTask;
36 import com.android.managedprovisioning.task.ConnectMobileNetworkTask;
37 import com.android.managedprovisioning.task.DeleteNonRequiredAppsTask;
38 import com.android.managedprovisioning.task.DeviceOwnerInitializeProvisioningTask;
39 import com.android.managedprovisioning.task.DisallowAddUserTask;
40 import com.android.managedprovisioning.task.DownloadPackageTask;
41 import com.android.managedprovisioning.task.InstallPackageTask;
42 import com.android.managedprovisioning.task.SetDevicePolicyTask;
43 import com.android.managedprovisioning.task.VerifyPackageTask;
[all …]
DProfileOwnerProvisioningControllerTest.java41 import com.android.managedprovisioning.task.AbstractProvisioningTask;
42 import com.android.managedprovisioning.task.CopyAccountToUserTask;
43 import com.android.managedprovisioning.task.CreateManagedProfileTask;
44 import com.android.managedprovisioning.task.DisableInstallShortcutListenersTask;
45 import com.android.managedprovisioning.task.InstallExistingPackageTask;
46 import com.android.managedprovisioning.task.ManagedProfileSettingsTask;
47 import com.android.managedprovisioning.task.SetDevicePolicyTask;
48 import com.android.managedprovisioning.task.StartManagedProfileTask;
147 AbstractProvisioningTask task = verifyTaskRun(InstallExistingPackageTask.class); in testCancel() local
169 mController.onSuccess(task); in testCancel()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DDisallowAddUserTaskTest.java17 package com.android.managedprovisioning.task;
77 final DisallowAddUserTask task = in testMaybeDisallowAddUsers_normalSystem() local
82 task.run(primaryUser.id); in testMaybeDisallowAddUsers_normalSystem()
87 verify(mCallback).onSuccess(task); in testMaybeDisallowAddUsers_normalSystem()
95 final DisallowAddUserTask task = in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser() local
105 task.run(primaryUser.id); in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
110 verify(mCallback).onSuccess(task); in testMaybeDisallowAddUsers_normalSystem_restrictionAlreadySetupForOneUser()
118 final DisallowAddUserTask task = in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner() local
123 task.run(meatUser.id); in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
130 verify(mCallback).onSuccess(task); in testMaybeDisallowAddUsers_splitUserSystem_meatUserDeviceOwner()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/
DProcessingTaskController.java42 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); in handleMessage() local
58 if (task != null) { in handleMessage()
59 task.processRequest((ProcessingTask.Request) msg.obj); in handleMessage()
89 public void add(ProcessingTask task) { in add() argument
90 task.added(this); in add()
91 mTasks.put(task.getType(), task); in add() local
/packages/apps/Launcher3/go/quickstep/src/com/android/quickstep/
DTaskListLoader.java88 for (Task task : tasks) { in loadTaskList()
89 int loadedPos = mTaskList.indexOf(task); in loadTaskList()
94 task.icon = loadedTask.icon; in loadTaskList()
95 task.titleDescription = loadedTask.titleDescription; in loadTaskList()
96 task.thumbnail = loadedTask.thumbnail; in loadTaskList()
110 public void loadTaskIconAndLabel(Task task, @Nullable Runnable onLoadedCallback) { in loadTaskIconAndLabel() argument
111 mRecentsModel.getIconCache().updateIconInBackground(task, in loadTaskIconAndLabel()
122 public void loadTaskThumbnail(Task task, @Nullable Runnable onLoadedCallback) { in loadTaskThumbnail() argument
123 mRecentsModel.getThumbnailCache().updateThumbnailInBackground(task, in loadTaskThumbnail()
130 void removeTask(Task task) { in removeTask() argument
[all …]
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
DDrawableDownloader.java228 DrawableLoader task = new DrawableLoader(null, mRecycledBitmaps) { in loadBitmapBlocking() local
238 return task.doInBackground(options); in loadBitmapBlocking()
259 DrawableLoader task = new DrawableLoader(imageView, mRecycledBitmaps) { in loadBitmap() local
269 imageView.setTag(R.id.imageDownloadTask, new SoftReference<DrawableLoader>(task)); in loadBitmap()
270 scheduleTask(task, options); in loadBitmap()
291 DrawableLoader task = new DrawableLoader(null, mRecycledBitmaps) { in getBitmap() local
306 callback.mTask = new SoftReference<DrawableLoader>(task); in getBitmap()
307 scheduleTask(task, options); in getBitmap()
310 private static void scheduleTask(DrawableLoader task, BitmapWorkerOptions options) { in scheduleTask() argument
312 task.executeOnExecutor(BITMAP_RESOURCE_DOWNLOADER_THREAD_POOL_EXECUTOR, options); in scheduleTask()
[all …]
DBitmapDownloader.java135 BitmapWorkerTask task = new BitmapWorkerTask(null) { in loadBitmapBlocking() local
146 return task.doInBackground(options); in loadBitmapBlocking()
167 BitmapWorkerTask task = new BitmapWorkerTask(imageView) { in loadBitmap() local
177 imageView.setTag(R.id.imageDownloadTask, new SoftReference<BitmapWorkerTask>(task)); in loadBitmap()
178 task.execute(options); in loadBitmap()
195 BitmapWorkerTask task = new BitmapWorkerTask(null) { in getBitmap() local
213 callback.mTask = new SoftReference<BitmapWorkerTask>(task); in getBitmap()
214 task.executeOnExecutor(BITMAP_DOWNLOADER_THREAD_POOL_EXECUTOR, options); in getBitmap()
223 BitmapWorkerTask task = null; in cancelDownload() local
229 task = softReference.get(); in cancelDownload()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/
DSingleThreadNamedTaskExecutor.java56 public void execute(NamedTask task) { in execute() argument
60 mQueue.add(task); in execute()
76 NamedTask task; in loop() local
78 task = mQueue.take(); in loop()
82 currentThread.setName(threadName + " " + task.getName()); in loop()
84 if (DBG) Log.d(TAG, "Running task " + task.getName()); in loop()
85 task.run(); in loop()
86 if (DBG) Log.d(TAG, "Task " + task.getName() + " complete"); in loop()
88 Log.e(TAG, "Task " + task.getName() + " failed", ex); in loop()

123456789