Home
last modified time | relevance | path

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

12

/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/Settings/tests/robotests/src/com/android/settings/nfc/
DNfcPreferenceControllerTest.java227 final NfcSliceWorker worker = spy(new NfcSliceWorker(mContext, getDummyUri())); in ncfSliceWorker_nfcBroadcast_noExtra_sliceDoesntUpdate() local
228 final NfcUpdateReceiver receiver = worker.new NfcUpdateReceiver(worker); in ncfSliceWorker_nfcBroadcast_noExtra_sliceDoesntUpdate()
233 verify(worker, times(0)).updateSlice(); in ncfSliceWorker_nfcBroadcast_noExtra_sliceDoesntUpdate()
238 final NfcSliceWorker worker = spy(new NfcSliceWorker(mContext, getDummyUri())); in ncfSliceWorker_nfcBroadcast_turningOn_sliceDoesntUpdate() local
239 final NfcUpdateReceiver receiver = worker.new NfcUpdateReceiver(worker); in ncfSliceWorker_nfcBroadcast_turningOn_sliceDoesntUpdate()
245 verify(worker, times(0)).updateSlice(); in ncfSliceWorker_nfcBroadcast_turningOn_sliceDoesntUpdate()
250 final NfcSliceWorker worker = spy(new NfcSliceWorker(mContext, getDummyUri())); in ncfSliceWorker_nfcBroadcast_turningOff_sliceDoesntUpdate() local
251 final NfcUpdateReceiver receiver = worker.new NfcUpdateReceiver(worker); in ncfSliceWorker_nfcBroadcast_turningOff_sliceDoesntUpdate()
257 verify(worker, times(0)).updateSlice(); in ncfSliceWorker_nfcBroadcast_turningOff_sliceDoesntUpdate()
262 final NfcSliceWorker worker = spy(new NfcSliceWorker(mContext, getDummyUri())); in ncfSliceWorker_nfcBroadcast_nfcOn_sliceUpdates() local
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DSavePatternWorkerTest.java40 SavePatternWorker worker = spy(new SavePatternWorker()); in testSaveLockSuccessReturnsTrue() local
42 doNothing().when(worker).saveLock(); in testSaveLockSuccessReturnsTrue()
44 assertThat(worker.saveAndVerifyInBackground()).isTrue(); in testSaveLockSuccessReturnsTrue()
52 SavePatternWorker worker = spy(new SavePatternWorker()); in testSaveLockFailureReturnsFalse() local
54 doThrow(new RuntimeException()).when(worker).saveLock(); in testSaveLockFailureReturnsFalse()
56 assertThat(worker.saveAndVerifyInBackground()).isFalse(); in testSaveLockFailureReturnsFalse()
DSavePasswordWorkerTest.java40 SavePasswordWorker worker = spy(new SavePasswordWorker()); in testSaveLockSuccessReturnsTrue() local
42 doNothing().when(worker).saveLock(); in testSaveLockSuccessReturnsTrue()
44 assertThat(worker.saveAndVerifyInBackground()).isTrue(); in testSaveLockSuccessReturnsTrue()
52 SavePasswordWorker worker = spy(new SavePasswordWorker()); in testSaveLockFailureReturnsFalse() local
54 doThrow(new RuntimeException()).when(worker).saveLock(); in testSaveLockFailureReturnsFalse()
56 assertThat(worker.saveAndVerifyInBackground()).isFalse(); in testSaveLockFailureReturnsFalse()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/slices/
DSliceBackgroundWorker.java85 SliceBackgroundWorker worker = getInstance(uri); in getInstance() local
86 if (worker == null) { in getInstance()
89 worker = createInstance(context.getApplicationContext(), uri, workerClass); in getInstance()
90 LIVE_WORKERS.put(uri, worker); in getInstance()
92 return worker; in getInstance()
108 for (SliceBackgroundWorker worker : LIVE_WORKERS.values()) { in shutdown()
110 worker.close(); in shutdown()
DSettingsSliceProvider.java332 final SliceBackgroundWorker worker = SliceBackgroundWorker.getInstance( in startBackgroundWorker() local
334 mPinnedWorkers.put(uri, worker); in startBackgroundWorker()
335 worker.onSlicePinned(); in startBackgroundWorker()
339 final SliceBackgroundWorker worker = mPinnedWorkers.get(uri); in stopBackgroundWorker() local
340 if (worker != null) { in stopBackgroundWorker()
342 worker.onSliceUnpinned(); in stopBackgroundWorker()
/packages/apps/Settings/src/com/android/settings/slices/
DSliceBackgroundWorker.java85 SliceBackgroundWorker worker = getInstance(uri); in getInstance() local
86 if (worker == null) { in getInstance()
89 worker = createInstance(context.getApplicationContext(), uri, workerClass); in getInstance()
90 LIVE_WORKERS.put(uri, worker); in getInstance()
92 return worker; in getInstance()
108 for (SliceBackgroundWorker worker : LIVE_WORKERS.values()) { in shutdown()
110 worker.close(); in shutdown()
DSettingsSliceProvider.java346 final SliceBackgroundWorker worker = SliceBackgroundWorker.getInstance( in startBackgroundWorker() local
348 mPinnedWorkers.put(uri, worker); in startBackgroundWorker()
349 worker.onSlicePinned(); in startBackgroundWorker()
353 final SliceBackgroundWorker worker = mPinnedWorkers.get(uri); in stopBackgroundWorker() local
354 if (worker != null) { in stopBackgroundWorker()
356 worker.onSliceUnpinned(); in stopBackgroundWorker()
/packages/apps/Settings/src/com/android/settings/wifi/slice/
DWifiSlice.java101 final WifiScanWorker worker = SliceBackgroundWorker.getInstance(getUri()); in getSlice() local
102 final List<AccessPoint> apList = worker != null ? worker.getResults() : null; in getSlice()
105 handleNetworkCallback(worker, isFirstApActive); in getSlice()
137 private void handleNetworkCallback(WifiScanWorker worker, boolean isFirstApActive) { in handleNetworkCallback() argument
138 if (worker == null) { in handleNetworkCallback()
142 worker.registerNetworkCallback(mWifiManager.getCurrentNetwork()); in handleNetworkCallback()
144 worker.unregisterNetworkCallback(); in handleNetworkCallback()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/slice/
DWifiSlice.java107 final WifiScanWorker worker = SliceBackgroundWorker.getInstance(getUri()); in getSlice() local
108 final List<AccessPoint> results = worker != null ? worker.getResults() : null; in getSlice()
111 handleCaptivePortalCallback(worker, isFirstApActive); in getSlice()
169 private void handleCaptivePortalCallback(WifiScanWorker worker, boolean isFirstApActive) { in handleCaptivePortalCallback() argument
170 if (worker == null) { in handleCaptivePortalCallback()
174 worker.registerCaptivePortalNetworkCallback(mWifiManager.getCurrentNetwork()); in handleCaptivePortalCallback()
176 worker.unregisterCaptivePortalNetworkCallback(); in handleCaptivePortalCallback()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/media/
DMediaOutputSlice.java66 void init(String packageName, MediaDeviceUpdateWorker worker) { in init() argument
68 mWorker = worker; in init()
177 final MediaDeviceUpdateWorker worker = getWorker(); in onNotifyChange() local
179 final MediaDevice device = worker.getMediaDeviceById(id); in onNotifyChange()
182 worker.connectDevice(device); in onNotifyChange()
/packages/apps/Settings/src/com/android/settings/media/
DMediaOutputSlice.java67 void init(String packageName, MediaDeviceUpdateWorker worker) { in init() argument
69 mWorker = worker; in init()
178 final MediaDeviceUpdateWorker worker = getWorker(); in onNotifyChange() local
180 final MediaDevice device = worker.getMediaDeviceById(id); in onNotifyChange()
183 worker.connectDevice(device); in onNotifyChange()
/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()
DCallDetailsHeaderViewHolder.java269 AssistedDialingNumberParseWorker worker, in createAssistedDialerNumberParserTask() argument
DCallDetailsActivityCommon.java363 AssistedDialingNumberParseWorker worker, in createAssistedDialerNumberParserTask() argument
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/slices/
DBatteryFixSlice.java98 final SliceBackgroundWorker worker = SliceBackgroundWorker.getInstance(getUri()); in getSlice() local
99 final List<BatteryTip> batteryTips = worker != null ? worker.getResults() : null; in getSlice()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DBatteryFixSlice.java103 final SliceBackgroundWorker worker = SliceBackgroundWorker.getInstance(getUri()); in getSlice() local
104 final List<BatteryTip> batteryTips = worker != null ? worker.getResults() : null; in getSlice()
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/
DAction.java90 public void sendBackgroundActions(final BackgroundWorker worker) { in sendBackgroundActions() argument
91 worker.queueBackgroundWork(mBackgroundActions); in sendBackgroundActions()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DBatteryFixSliceTest.java174 public static void setBatteryTipWorkerWorker(BatteryFixSlice.BatteryTipWorker worker) { in setBatteryTipWorkerWorker() argument
175 sBatteryTipWorkerWorker = worker; in setBatteryTipWorkerWorker()
/packages/apps/Messaging/tests/src/com/android/messaging/datamodel/
DFakeDataModel.java80 public FakeDataModel withBackgroundWorkerForActionService(final BackgroundWorker worker) { in withBackgroundWorkerForActionService() argument
81 mWorker = worker; in withBackgroundWorkerForActionService()
/packages/apps/Protips/src/com/android/protips/
DProtipWidget.java107 Runnable worker = new Runnable() { in onReceive() local
114 mAsyncHandler.post(worker); in onReceive()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/slice/
DWifiSliceTest.java158 final SliceBackgroundWorker worker = SliceBackgroundWorker.getInstance(mWifiSlice.getUri()); in setWorkerResults() local
159 doReturn(results).when(worker).getResults(); in setWorkerResults()
/packages/apps/Dialer/java/com/android/incallui/
DCallButtonPresenter.java337 SwapSimWorker worker = in swapSimClicked() local
346 .createNonUiTaskBuilder(worker) in swapSimClicked()

12