Home
last modified time | relevance | path

Searched refs:worker (Results 1 – 25 of 81) sorted by relevance

1234

/packages/apps/Car/Settings/src/com/android/car/settings/qc/
DSettingsQCBackgroundWorker.java94 SettingsQCBackgroundWorker worker = getInstance(uri); in getInstance() local
95 if (worker == null) { in getInstance()
98 worker = createInstance(context.getApplicationContext(), uri, workerClass); in getInstance()
99 LIVE_WORKERS.put(uri, worker); in getInstance()
101 worker.setQCItem(qcItem); in getInstance()
102 return worker; in getInstance()
118 for (SettingsQCBackgroundWorker worker : LIVE_WORKERS.values()) { in shutdown()
120 worker.close(); in shutdown()
129 SettingsQCBackgroundWorker worker = LIVE_WORKERS.get(uri); in shutdown() local
130 if (worker != null) { in shutdown()
[all …]
DSettingsQCProvider.java108 SettingsQCBackgroundWorker worker = SettingsQCBackgroundWorker.getInstance( in startBackgroundWorker() local
110 mSubscribedWorkers.put(uri, worker); in startBackgroundWorker()
111 worker.subscribe(); in startBackgroundWorker()
116 SettingsQCBackgroundWorker worker = mSubscribedWorkers.get(uri); in stopBackgroundWorker() local
117 if (worker != null) { in stopBackgroundWorker()
118 worker.unsubscribe(); in stopBackgroundWorker()
/packages/apps/Settings/src/com/android/settings/slices/
DSliceBackgroundWorker.java96 SliceBackgroundWorker worker = getInstance(uri); in getInstance() local
97 if (worker == null) { in getInstance()
100 worker = createInstance(context.getApplicationContext(), uri, workerClass); in getInstance()
101 LIVE_WORKERS.put(uri, worker); in getInstance()
103 return worker; in getInstance()
119 for (SliceBackgroundWorker worker : LIVE_WORKERS.values()) { in shutdown()
121 worker.close(); in shutdown()
220 final SliceBackgroundWorker worker = (SliceBackgroundWorker) msg.obj; in handleMessage() local
221 final Uri uri = worker.getUri(); in handleMessage()
222 final Context context = worker.getContext(); in handleMessage()
[all …]
DSettingsSliceProvider.java511 final SliceBackgroundWorker worker = SliceBackgroundWorker.getInstance( in startBackgroundWorker() local
513 mPinnedWorkers.put(uri, worker); in startBackgroundWorker()
514 worker.pin(); in startBackgroundWorker()
518 final SliceBackgroundWorker worker = mPinnedWorkers.get(uri); in stopBackgroundWorker() local
519 if (worker != null) { in stopBackgroundWorker()
521 worker.unpin(); in stopBackgroundWorker()
/packages/apps/Settings/tests/unit/src/com/android/settings/password/
DSaveAndFinishWorkerTest.java43 var worker = new SaveAndFinishWorker(); in testSetRequestWriteRepairModePassword_setLockCredentialFail() local
48 worker.setRequestWriteRepairModePassword(true); in testSetRequestWriteRepairModePassword_setLockCredentialFail()
49 worker.prepare(lpu, chosenCredential, currentCredential, userId); in testSetRequestWriteRepairModePassword_setLockCredentialFail()
50 var result = worker.saveAndVerifyInBackground(); in testSetRequestWriteRepairModePassword_setLockCredentialFail()
63 var worker = new SaveAndFinishWorker(); in testSetRequestWriteRepairModePassword_verifyCredentialFail() local
70 worker.setRequestWriteRepairModePassword(true); in testSetRequestWriteRepairModePassword_verifyCredentialFail()
71 worker.prepare(lpu, chosenCredential, currentCredential, userId); in testSetRequestWriteRepairModePassword_verifyCredentialFail()
72 var result = worker.saveAndVerifyInBackground(); in testSetRequestWriteRepairModePassword_verifyCredentialFail()
88 var worker = new SaveAndFinishWorker(); in testSetRequestWriteRepairModePassword_verifyCredentialSucceed() local
95 worker.setRequestWriteRepairModePassword(true); in testSetRequestWriteRepairModePassword_verifyCredentialSucceed()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/nfc/
DNfcPreferenceControllerTest.java192 final NfcSliceWorker worker = spy( in ncfSliceWorker_nfcBroadcast_noExtra_sliceDoesntUpdate() local
194 final NfcUpdateReceiver receiver = worker.new NfcUpdateReceiver(worker); in ncfSliceWorker_nfcBroadcast_noExtra_sliceDoesntUpdate()
199 verify(worker, times(0)).updateSlice(); in ncfSliceWorker_nfcBroadcast_noExtra_sliceDoesntUpdate()
204 final NfcSliceWorker worker = spy( in ncfSliceWorker_nfcBroadcast_turningOn_sliceDoesntUpdate() local
206 final NfcUpdateReceiver receiver = worker.new NfcUpdateReceiver(worker); in ncfSliceWorker_nfcBroadcast_turningOn_sliceDoesntUpdate()
212 verify(worker, times(0)).updateSlice(); in ncfSliceWorker_nfcBroadcast_turningOn_sliceDoesntUpdate()
217 final NfcSliceWorker worker = spy( in ncfSliceWorker_nfcBroadcast_turningOff_sliceDoesntUpdate() local
219 final NfcUpdateReceiver receiver = worker.new NfcUpdateReceiver(worker); in ncfSliceWorker_nfcBroadcast_turningOff_sliceDoesntUpdate()
225 verify(worker, times(0)).updateSlice(); in ncfSliceWorker_nfcBroadcast_turningOff_sliceDoesntUpdate()
230 final NfcSliceWorker worker = spy( in ncfSliceWorker_nfcBroadcast_nfcOn_sliceUpdates() local
[all …]
/packages/apps/Dialer/java/com/android/dialer/common/concurrent/
DDefaultDialerExecutorFactory.java63 @NonNull Worker<InputT, OutputT> worker) { in createUiTaskBuilder() argument
67 Assert.isNotNull(worker), in createUiTaskBuilder()
75 @NonNull Worker<InputT, OutputT> worker) { in createNonUiTaskBuilder() argument
76 return new NonUiTaskBuilder<>(Assert.isNotNull(worker), nonUiSerialExecutor, nonUiThreadPool); in createNonUiTaskBuilder()
82 private final Worker<InputT, OutputT> worker; field in DefaultDialerExecutorFactory.BaseTaskBuilder
92 Worker<InputT, OutputT> worker, in BaseTaskBuilder() argument
95 this.worker = worker; in BaseTaskBuilder()
125 Worker<InputT, OutputT> worker, in UiTaskBuilder() argument
128 super(worker, serialExecutor, parallelExecutor); in UiTaskBuilder()
140 super.worker, in build()
[all …]
DDialerUiTaskFragment.java45 private Worker<InputT, OutputT> worker; field in DialerUiTaskFragment
80 Worker<InputT, OutputT> worker, in create() argument
95 fragment.worker = worker; in create()
145 OutputT output = worker.doInBackground(input); in runTask()
DDialerExecutorFactory.java48 @NonNull Worker<InputT, OutputT> worker); in createUiTaskBuilder() argument
62 @NonNull Worker<InputT, OutputT> worker); in createNonUiTaskBuilder() argument
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DSaveLockWorkerTest.java39 SaveLockWorker worker = spy(new SaveLockWorker()); in testSaveLockSuccessReturnsTrue() local
41 doNothing().when(worker).saveLock(); in testSaveLockSuccessReturnsTrue()
43 assertThat(worker.saveAndVerifyInBackground()).isTrue(); in testSaveLockSuccessReturnsTrue()
51 SaveLockWorker worker = spy(new SaveLockWorker()); in testSaveLockFailureReturnsFalse() local
53 doThrow(new RuntimeException()).when(worker).saveLock(); in testSaveLockFailureReturnsFalse()
55 assertThat(worker.saveAndVerifyInBackground()).isFalse(); in testSaveLockFailureReturnsFalse()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/qc/
DSettingsQCProviderTest.java78 SettingsQCBackgroundWorker worker = mProvider.mSubscribedWorkers.get(QCTestUtils.URI); in onSubscribe_startsBackgroundWorker() local
79 assertThat(worker).isNotNull(); in onSubscribe_startsBackgroundWorker()
80 assertThat(worker instanceof TestSettingsQCBackgroundWorker).isTrue(); in onSubscribe_startsBackgroundWorker()
81 TestSettingsQCBackgroundWorker testWorker = (TestSettingsQCBackgroundWorker) worker; in onSubscribe_startsBackgroundWorker()
90 SettingsQCBackgroundWorker worker = mProvider.mSubscribedWorkers.get(QCTestUtils.URI); in onSubscribe_stopsBackgroundWorker() local
91 assertThat(worker).isNotNull(); in onSubscribe_stopsBackgroundWorker()
92 assertThat(worker instanceof TestSettingsQCBackgroundWorker).isTrue(); in onSubscribe_stopsBackgroundWorker()
93 TestSettingsQCBackgroundWorker testWorker = (TestSettingsQCBackgroundWorker) worker; in onSubscribe_stopsBackgroundWorker()
/packages/apps/Settings/src/com/android/settings/network/
DProviderModelSlice.java114 final NetworkProviderWorker worker = getWorker(); in getSlice() local
115 if (worker != null) { in getSlice()
116 maxListSize = worker.getApRowCount(); in getSlice()
136 worker != null ? worker.getNetworkTypeDescription() : "")); in getSlice()
149 List<WifiSliceItem> wifiList = (worker != null) ? worker.getResults() : null; in getSlice()
247 final NetworkProviderWorker worker = getWorker(); in getMobileDataDisableDialog()
248 if (worker != null) { in getMobileDataDisableDialog()
249 worker.updateSlice(); in getMobileDataDisableDialog()
282 final NetworkProviderWorker worker = getWorker(); in doCarrierNetworkAction() local
283 if (worker == null) { in doCarrierNetworkAction()
[all …]
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/spe/framework/
DAbstractJobService.java114 JobWorker worker = getJobWorker(params, jobId, jobName); in onStartJob() local
115 if (worker == null) { in onStartJob()
127 executionFuture = worker.getExecutionFuture(this, convertJobParameters(params)); in onStartJob()
134 executionFuture, jobId, jobName, params, worker.getBackoffPolicy()); in onStartJob()
146 JobWorker worker = getJobWorker(params, jobId, jobName); in onStopJob() local
149 if (worker == null) { in onStopJob()
163 FluentFuture.from(worker.getExecutionStopFuture(this, convertJobParameters(params))) in onStopJob()
181 boolean shouldReschedule = worker.getBackoffPolicy().shouldRetryOnExecutionStop(); in onStopJob()
220 JobWorker worker = mJobServiceFactory.getJobWorkerInstance(jobId); in getJobWorker() local
221 if (worker == null) { in getJobWorker()
[all …]
/packages/modules/OnDevicePersonalization/tests/cts/endtoend/src/com/android/ondevicepersonalization/cts/e2e/
DIsolatedWorkerTest.java71 IsolatedWorker worker = new TestWorker(); in testOnExecute() local
81 worker.onExecute(new ExecuteInput(inputParcel), receiver); in testOnExecute()
86 IsolatedWorker worker = new TestWorker(); in testOnRender() local
90 worker.onRender(input, receiver); in testOnRender()
96 IsolatedWorker worker = new TestWorker(); in testOnDownloadCompleted() local
100 worker.onDownloadCompleted( in testOnDownloadCompleted()
107 IsolatedWorker worker = new TestWorker(); in testOnEvent() local
111 worker.onEvent(input, receiver); in testOnEvent()
119 IsolatedWorker worker = new TestWorker(); in testOnTrainingExamples() local
123 worker.onTrainingExamples(input, receiver); in testOnTrainingExamples()
[all …]
/packages/modules/RemoteKeyProvisioning/app/tests/unit/src/com/android/rkpdapp/unittest/
DPeriodicProvisionerTests.java121 WorkInfo worker = getProvisionerWorkInfo(); in provisionWithNoHals() local
122 assertThat(worker.getState()).isEqualTo(WorkInfo.State.ENQUEUED); in provisionWithNoHals()
125 WorkManagerTestInitHelper.getTestDriver(sContext).setAllConstraintsMet(worker.getId()); in provisionWithNoHals()
128 worker = getProvisionerWorkInfo(); in provisionWithNoHals()
129 assertThat(worker.getState()).isEqualTo(WorkInfo.State.CANCELLED); in provisionWithNoHals()
132 WorkManagerTestInitHelper.getTestDriver(sContext).setAllConstraintsMet(worker.getId()); in provisionWithNoHals()
133 worker = getProvisionerWorkInfo(); in provisionWithNoHals()
134 assertThat(worker.getState()).isEqualTo(WorkInfo.State.CANCELLED); in provisionWithNoHals()
146 WorkInfo worker = getProvisionerWorkInfo(); in provisionWithNoHostNameWithoutServerUrl() local
147 WorkManagerTestInitHelper.getTestDriver(sContext).setAllConstraintsMet(worker.getId()); in provisionWithNoHostNameWithoutServerUrl()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsearch/src/com/android/adservices/service/appsearch/
DAppSearchConsentWorkerTest.java507 AppSearchConsentWorker worker = AppSearchConsentWorker.getInstance(); in runRecordNotificationDisplayedTestFailure() local
513 ? () -> worker.recordNotificationDisplayed(true) in runRecordNotificationDisplayedTestFailure()
514 : () -> worker.recordGaUxNotificationDisplayed(true)); in runRecordNotificationDisplayedTestFailure()
535 AppSearchConsentWorker worker = AppSearchConsentWorker.getInstance(); in runRecordNotificationDisplayedTestFailureTimeout() local
541 RuntimeException.class, () -> worker.recordNotificationDisplayed(true)); in runRecordNotificationDisplayedTestFailureTimeout()
546 () -> worker.recordGaUxNotificationDisplayed(true)); in runRecordNotificationDisplayedTestFailureTimeout()
605 AppSearchConsentWorker worker = AppSearchConsentWorker.getInstance(); in testSetCurrentPrivacySandboxFeature_failure() local
610 worker.setCurrentPrivacySandboxFeature( in testSetCurrentPrivacySandboxFeature_failure()
621 AppSearchConsentWorker worker = AppSearchConsentWorker.getInstance(); in testSetCurrentPrivacySandboxFeature_failure_timeout() local
626 worker.setCurrentPrivacySandboxFeature( in testSetCurrentPrivacySandboxFeature_failure_timeout()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/rollback/
DMeasurementRollbackCompatManager.java56 long currentApexVersion, int deletionApiType, MeasurementRollbackWorker<?> worker) { in MeasurementRollbackCompatManager() argument
59 mMeasurementRollbackWorker = worker; in MeasurementRollbackCompatManager()
120 MeasurementRollbackWorker<T> worker) { in needsToHandleRollbackReconciliationHelper() argument
122 worker.getAdServicesDeletionRollbackMetadata(mDeletionApiType); in needsToHandleRollbackReconciliationHelper()
128 worker.clearAdServicesDeletionOccurred(rollbackVersionAndStorageIdPair.second); in needsToHandleRollbackReconciliationHelper()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DFledgeMaintenanceTasksWorkerTests.java277 FledgeMaintenanceTasksWorker worker = in testClearExpiredFrequencyCapHistogramData_adFilteringEnabled_doesMaintenance() local
289 worker.clearInvalidFrequencyCapHistogramData(mPackageManagerMock); in testClearExpiredFrequencyCapHistogramData_adFilteringEnabled_doesMaintenance()
319 FledgeMaintenanceTasksWorker worker = in testClearExpiredFrequencyCapHistogramData_enrollmentDisabled_skipsBuyerMaintenance() local
331 worker.clearInvalidFrequencyCapHistogramData(mPackageManagerMock); in testClearExpiredFrequencyCapHistogramData_enrollmentDisabled_skipsBuyerMaintenance()
358 FledgeMaintenanceTasksWorker worker = in testClearExpiredFrequencyCapHistogramData_adFilteringDisabled_skipsMaintenance() local
370 worker.clearInvalidFrequencyCapHistogramData(mPackageManagerMock); in testClearExpiredFrequencyCapHistogramData_adFilteringDisabled_skipsMaintenance()
436 FledgeMaintenanceTasksWorker worker = in testRemovedExpiredKAnonEntites_withKAnonFeatureFlagEnabled_removesExpiredEntities() local
448 worker.clearExpiredKAnonMessageEntities(); in testRemovedExpiredKAnonEntites_withKAnonFeatureFlagEnabled_removesExpiredEntities()
462 FledgeMaintenanceTasksWorker worker = in testRemovedExpiredKAnonEntites_withKAnonFeatureFlagDisabled_doesNothing() local
474 worker.clearExpiredKAnonMessageEntities(); in testRemovedExpiredKAnonEntites_withKAnonFeatureFlagDisabled_doesNothing()
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/training/
DFederatedJobService.java51 FederatedComputeWorker worker = FederatedComputeWorker.getInstance(this); in onStartJob() local
53 worker.startTrainingRun(params.getJobId(), new OnJobFinishedCallback(params, this)); in onStartJob()
62 worker.finish(flRunnerResult); in onStartJob()
64 worker.cleanUpActiveRun(); in onStartJob()
72 worker.finish(null, ContributionResult.FAIL, false); in onStartJob()
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsetid/src/com/android/adservices/service/appsetid/
DAppSetIdWorkerTest.java57 AppSetIdWorker worker = newAppSetIdWorker(/* forSuccess= */ true); in testGetAppSetIdOnResult() local
59 worker.getAppSetId( in testGetAppSetIdOnResult()
90 AppSetIdWorker worker = newAppSetIdWorker(/* forSuccess= */ false); in testGetAppSetIdOnError() local
92 worker.getAppSetId( in testGetAppSetIdOnError()
/packages/modules/DeviceLock/DeviceLockController/src/com/android/devicelockcontroller/
DDeviceLockControllerWorkerFactory.java48 ListenableWorker worker = null; in createWorker() local
58 worker = (ListenableWorker) clazz.getConstructor( in createWorker()
70 return worker; in createWorker()
/packages/apps/Settings/src/com/android/settings/wifi/slice/
DConnectToWifiHandler.java56 final WifiScanWorker worker = getWifiScanWorker(intent); in onReceive() local
57 if (worker == null) { in onReceive()
60 final WifiEntry wifiEntry = worker.getWifiEntry(key); in onReceive()
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/spe/scheduling/
DPolicyJobScheduler.java123 JobWorker worker = mJobServiceFactory.getJobWorkerInstance(jobId); in scheduleJob() local
124 if (jobName == null || worker == null) { in scheduleJob()
131 if (!shouldSchedule(worker)) { in scheduleJob()
293 private boolean shouldSchedule(JobWorker worker) { in shouldSchedule() argument
294 return worker.getJobSchedulingEnablementStatus() == JOB_ENABLED_STATUS_ENABLED; in shouldSchedule()
/packages/apps/Dialer/java/com/android/dialer/calldetails/
DReportDialogFragment.java102 Worker<String, CachedContactInfo> worker = in lookupContactInfo() local
107 .createUiTaskBuilder(getFragmentManager(), "lookup_contact_info", worker) in lookupContactInfo()
125 Worker<Context, Pair<Context, Boolean>> worker = this::reportCallerId; in startReportCallerIdWorker() local
129 .createUiTaskBuilder(getFragmentManager(), "report_caller_id", worker) in startReportCallerIdWorker()
/packages/modules/ExtServices/native/
DImageHashManager.cpp62 PhashFingerprinter worker; in generatePHash() local
63 const int64_t result = worker.GenerateFingerprint(compressedBuffer.data()); in generatePHash()

1234