Home
last modified time | relevance | path

Searched refs:task (Results 1 – 25 of 214) 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/modules/CaptivePortalLogin/src/com/android/captiveportallogin/
DDownloadService.java219 final DownloadTask task = new DownloadTask(mNextDownloadId.getAndIncrement(), in onStartCommand() local
221 mQueue.add(task); in onStartCommand()
223 startForeground(NOTE_DOWNLOAD_PROGRESS, makeProgressNotification(task, in onStartCommand()
263 final DownloadTask task; in run() local
265 task = mQueue.poll(); in run()
266 if (task == null) { in run()
273 processDownload(task); in run()
277 private void processDownload(@NonNull final DownloadTask task) { in processDownload() argument
280 nm.notify(NOTE_DOWNLOAD_PROGRESS, makeProgressNotification(task, null /* progress */)); in processDownload()
283 final URL url = new URL(task.mUrl); in processDownload()
[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.java114 SeriesRecordingUpdateTask task = iter.next();
116 task.getSeriesRecordings(),
120 task.cancel(true);
125 FetchSeriesInfoTask task =
127 if (task != null) {
128 task.cancel(true);
244 FetchSeriesInfoTask task = mFetchSeriesInfoTasks.get(mFetchSeriesInfoTasks.keyAt(i)); in stop() local
245 task.cancel(true); in stop()
248 for (SeriesRecordingUpdateTask task : mScheduleTasks) { in stop()
249 task.cancel(true); in stop()
[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/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/Launcher3/quickstep/src/com/android/quickstep/
DTaskIconCache.java88 public IconLoadRequest updateIconInBackground(Task task, Consumer<Task> callback) { in updateIconInBackground() argument
90 if (task.icon != null) { in updateIconInBackground()
92 callback.accept(task); in updateIconInBackground()
99 Drawable icon = mIconLoader.getIcon(task); in updateIconInBackground()
100 String contentDescription = loadContentDescriptionInBackground(task); in updateIconInBackground()
106 task.icon = icon; in updateIconInBackground()
107 task.titleDescription = contentDescription; in updateIconInBackground()
108 callback.accept(task); in updateIconInBackground()
125 private String loadContentDescriptionInBackground(Task task) { in loadContentDescriptionInBackground() argument
127 String label = mContentDescriptionCache.getAndInvalidateIfModified(task.key); in loadContentDescriptionInBackground()
[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 …]
DTaskHolder.java57 public void bindTask(@NonNull Task task, boolean willAnimate) { in bindTask() argument
58 mTask = task; in bindTask()
60 mTaskItemView.startContentAnimation(task.icon, task.thumbnail, task.titleDescription); in bindTask()
62 mTaskItemView.setIcon(task.icon); in bindTask()
63 mTaskItemView.setThumbnail(task.thumbnail); in bindTask()
64 mTaskItemView.setLabel(task.titleDescription); in bindTask()
/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()
DBatchingNamedTaskExecutor.java48 public void execute(NamedTask task) { in execute() argument
50 if (DBG) Log.d(TAG, "Queuing " + task); in execute()
51 mQueuedTasks.add(task); in execute()
55 private void dispatch(NamedTask task) { in dispatch() argument
56 if (DBG) Log.d(TAG, "Dispatching " + task); in dispatch()
57 mExecutor.execute(task); in dispatch()
74 for (NamedTask task : batch) { in executeNextBatch()
75 dispatch(task); in executeNextBatch()

123456789