/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/shared/testing/ |
D | AnswerSyncCallbackTest.java | 56 protected String callCallback(AnswerSyncCallback<Void> callback) { in callCallback() argument 63 callback.answer(mMockInvocation); in callCallback() 78 AnswerSyncCallback<Void> callback = AnswerSyncCallback.forSingleVoidAnswer(); in testForSingleVoidAnswer() local 80 doAnswer(callback).when(mDarthVoider).voidVoid(); in testForSingleVoidAnswer() 84 callback.assertCalled(); in testForSingleVoidAnswer() 85 expect.withMessage("%%s.isCalled() aftercall", callback).that(callback.isCalled()).isTrue(); in testForSingleVoidAnswer() 90 AnswerSyncCallback<String> callback = AnswerSyncCallback.forSingleAnswer(ANSWER); in testForSingleAnswer() local 91 expect.withMessage("%%s.isCalled() before call", callback) in testForSingleAnswer() 92 .that(callback.isCalled()) in testForSingleAnswer() 94 when(mDarthVoider.toString()).then(callback); in testForSingleAnswer() [all …]
|
/packages/modules/RemoteKeyProvisioning/app/tests/unit/src/com/android/rkpdapp/unittest/ |
D | RegistrationBinderTest.java | 157 IGetKeyCallback callback = mock(IGetKeyCallback.class); 158 doReturn(new Binder()).when(callback).asBinder(); 159 mRegistration.getKey(KEY_ID, callback); 161 verify(callback, atLeastOnce()).asBinder(); 162 verify(callback).onSuccess(matches(FAKE_KEY)); 163 verifyNoMoreInteractions(callback); 172 IGetKeyCallback callback = mock(IGetKeyCallback.class); 173 doReturn(new Binder()).when(callback).asBinder(); 174 mRegistration.getKey(KEY_ID, callback); 176 verify(callback, atLeastOnce()).asBinder(); [all …]
|
/packages/modules/DeviceLock/service/java/com/android/server/devicelock/ |
D | DeviceLockControllerConnectorImpl.java | 84 OutcomeReceiver<Result, Exception> callback) { in callControllerApi() argument 104 mPendingCallbacks.add(callback); in callControllerApi() 111 removed = mPendingCallbacks.remove(callback); in callControllerApi() 115 mHandler.post(() -> callback.onError(new TimeoutException())); in callControllerApi() 120 mPendingCallbacks.remove(callback); in callControllerApi() 131 mHandler.post(() -> callback.onError(finalException)); in callControllerApi() 139 private boolean hasApiCallTimedOut(OutcomeReceiver callback) { in hasApiCallTimedOut() argument 142 removed = mPendingCallbacks.remove(callback); in hasApiCallTimedOut() 150 private RemoteCallback.OnResultListener checkTimeout(OutcomeReceiver callback, in checkTimeout() argument 153 if (hasApiCallTimedOut(callback)) { in checkTimeout() [all …]
|
D | DeviceLockControllerConnectorStub.java | 57 public void lockDevice(OutcomeReceiver<Void, Exception> callback) { in lockDevice() argument 59 if (setExceptionIfDeviceIsCleared(callback)) { in lockDevice() 65 callback.onResult(/* result= */ null); in lockDevice() 69 public void unlockDevice(OutcomeReceiver<Void, Exception> callback) { in unlockDevice() argument 71 if (setExceptionIfDeviceIsCleared(callback)) { in unlockDevice() 77 callback.onResult(/* result= */ null); in unlockDevice() 81 public void isDeviceLocked(OutcomeReceiver<Boolean, Exception> callback) { in isDeviceLocked() argument 85 if (setExceptionIfDeviceIsCleared(callback)) { in isDeviceLocked() 90 setException(callback, "isLocked called before setting the lock state"); in isDeviceLocked() 98 callback.onResult(isLocked); in isDeviceLocked() [all …]
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/testutils/ |
D | TestableNetworkCallbackTestJava.java | 31 final TestableNetworkCallback callback = new TestableNetworkCallback(); in testAllExpectOverloads() local 35 callback.expect(AVAILABLE, anyNetwork(), 10, "error", cb -> true); in testAllExpectOverloads() 39 callback.expect(AVAILABLE, 10, "error", cb -> true); in testAllExpectOverloads() 40 callback.expect(AVAILABLE, anyNetwork(), "error", cb -> true); in testAllExpectOverloads() 41 callback.expect(AVAILABLE, anyNetwork(), 10, cb -> true); in testAllExpectOverloads() 42 callback.expect(AVAILABLE, anyNetwork(), 10, "error"); in testAllExpectOverloads() 46 callback.expect(AVAILABLE, "error", cb -> true); in testAllExpectOverloads() 47 callback.expect(AVAILABLE, 10, cb -> true); in testAllExpectOverloads() 48 callback.expect(AVAILABLE, 10, "error"); in testAllExpectOverloads() 49 callback.expect(AVAILABLE, anyNetwork(), cb -> true); in testAllExpectOverloads() [all …]
|
/packages/modules/DeviceLock/DeviceLockController/src/com/android/devicelockcontroller/ |
D | SystemDeviceLockManagerImpl.java | 74 @NonNull OutcomeReceiver<Void, Exception> callback) { in addFinancedDeviceKioskRole() argument 76 Objects.requireNonNull(callback); in addFinancedDeviceKioskRole() 81 processResult(result, callback, in addFinancedDeviceKioskRole() 85 executor.execute(() -> callback.onError(new RuntimeException(e))); in addFinancedDeviceKioskRole() 92 @NonNull OutcomeReceiver<Void, Exception> callback) { in removeFinancedDeviceKioskRole() argument 94 Objects.requireNonNull(callback); in removeFinancedDeviceKioskRole() 99 processResult(result, callback, in removeFinancedDeviceKioskRole() 103 executor.execute(() -> callback.onError(new RuntimeException(e))); in removeFinancedDeviceKioskRole() 110 @NonNull OutcomeReceiver<Void, Exception> callback) { in setDlcExemptFromActivityBgStartRestrictionState() argument 112 Objects.requireNonNull(callback); in setDlcExemptFromActivityBgStartRestrictionState() [all …]
|
/packages/modules/Uwb/framework/tests/src/android/uwb/ |
D | RangingSessionTest.java | 79 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingOpened_OnOpenSuccessCalled() local 81 RangingSession session = new RangingSession(EXECUTOR, callback, adapter, handle); in testOnRangingOpened_OnOpenSuccessCalled() 88 verify(callback, times(1)).onOpened(eq(session)); in testOnRangingOpened_OnOpenSuccessCalled() 89 verify(callback, times(0)).onClosed(anyInt(), any()); in testOnRangingOpened_OnOpenSuccessCalled() 95 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingOpened_OnServiceDiscoveredConnectedCalled() local 97 RangingSession session = new RangingSession(EXECUTOR, callback, adapter, handle); in testOnRangingOpened_OnServiceDiscoveredConnectedCalled() 104 verify(callback, times(1)).onOpened(eq(session)); in testOnRangingOpened_OnServiceDiscoveredConnectedCalled() 105 verify(callback, times(0)).onClosed(anyInt(), any()); in testOnRangingOpened_OnServiceDiscoveredConnectedCalled() 108 verify(callback, times(1)).onServiceDiscovered(eq(PARAMS)); in testOnRangingOpened_OnServiceDiscoveredConnectedCalled() 111 verify(callback, times(1)).onServiceConnected(eq(PARAMS)); in testOnRangingOpened_OnServiceDiscoveredConnectedCalled() [all …]
|
D | RangingManagerTest.java | 72 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOpenSession_OpenRangingInvoked() local 74 ATTRIBUTION_SOURCE, PARAMS, EXECUTOR, callback, /* chipIds= */ null); in testOpenSession_OpenRangingInvoked() 84 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOpenSession_validChipId_OpenRangingInvoked() local 85 rangingManager.openSession(ATTRIBUTION_SOURCE, PARAMS, EXECUTOR, callback, VALID_CHIP_ID); in testOpenSession_validChipId_OpenRangingInvoked() 98 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOpenSession_validChipId_RuntimeException() local 103 ATTRIBUTION_SOURCE, PARAMS, EXECUTOR, callback, VALID_CHIP_ID)); in testOpenSession_validChipId_RuntimeException() 112 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOpenSession_invalidChipId_IllegalArgumentException() local 117 ATTRIBUTION_SOURCE, PARAMS, EXECUTOR, callback, invalidChipId)); in testOpenSession_invalidChipId_IllegalArgumentException() 126 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingOpened_InvalidSessionHandle() local 129 verify(callback, times(0)).onOpened(any()); in testOnRangingOpened_InvalidSessionHandle() [all …]
|
/packages/apps/UniversalMediaPlayer/java/com/android/pump/db/ |
D | MediaDb.java | 135 public void addAudioUpdateCallback(@NonNull UpdateCallback callback) { in addAudioUpdateCallback() argument 136 addUpdateCallback(mAudioUpdateCallbacks, callback); in addAudioUpdateCallback() 139 public void removeAudioUpdateCallback(@NonNull UpdateCallback callback) { in removeAudioUpdateCallback() argument 140 removeUpdateCallback(mAudioUpdateCallbacks, callback); in removeAudioUpdateCallback() 143 public void addArtistUpdateCallback(@NonNull UpdateCallback callback) { in addArtistUpdateCallback() argument 144 addUpdateCallback(mArtistUpdateCallbacks, callback); in addArtistUpdateCallback() 147 public void removeArtistUpdateCallback(@NonNull UpdateCallback callback) { in removeArtistUpdateCallback() argument 148 removeUpdateCallback(mArtistUpdateCallbacks, callback); in removeArtistUpdateCallback() 151 public void addAlbumUpdateCallback(@NonNull UpdateCallback callback) { in addAlbumUpdateCallback() argument 152 addUpdateCallback(mAlbumUpdateCallbacks, callback); in addAlbumUpdateCallback() [all …]
|
/packages/modules/AdServices/adservices/framework/java/android/adservices/measurement/ |
D | MeasurementCompatibleManager.java | 140 @Nullable AdServicesOutcomeReceiver<Object, Exception> callback) { in register() argument 142 requireExecutorForCallback(executor, callback); in register() 157 if (callback != null) { in register() 158 executor.execute(() -> callback.onResult(new Object())); in register() 164 if (callback != null) { in register() 167 callback.onError( in register() 175 if (callback != null) { in register() 176 executor.execute(() -> callback.onError(new IllegalStateException(e))); in register() 197 @Nullable AdServicesOutcomeReceiver<Object, Exception> callback) { in registerSource() argument 199 requireExecutorForCallback(executor, callback); in registerSource() [all …]
|
D | MeasurementManager.java | 143 @Nullable OutcomeReceiver<Object, Exception> callback) { in registerSource() argument 148 OutcomeReceiverConverter.toAdServicesOutcomeReceiver(callback)); in registerSource() 168 @Nullable AdServicesOutcomeReceiver<Object, Exception> callback) { in registerSource() argument 169 mImpl.registerSource(attributionSource, inputEvent, executor, callback); in registerSource() 185 @Nullable OutcomeReceiver<Object, Exception> callback) { in registerSource() argument 187 request, executor, OutcomeReceiverConverter.toAdServicesOutcomeReceiver(callback)); in registerSource() 204 @Nullable AdServicesOutcomeReceiver<Object, Exception> callback) { in registerSource() argument 205 mImpl.registerSource(request, executor, callback); in registerSource() 226 @Nullable OutcomeReceiver<Object, Exception> callback) { in registerWebSource() argument 228 request, executor, OutcomeReceiverConverter.toAdServicesOutcomeReceiver(callback)); in registerWebSource() [all …]
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/provisioning/ |
D | ProvisioningManagerHelper.java | 67 public void registerListener(ProvisioningManagerCallback callback) { in registerListener() argument 69 mCallbacks.add(callback); in registerListener() 70 callLastCallbackLocked(callback); in registerListener() 74 public void unregisterListener(ProvisioningManagerCallback callback) { in unregisterListener() argument 76 mCallbacks.remove(callback); in unregisterListener() 82 for (ProvisioningManagerCallback callback : mCallbacks) { in error() 83 postCallbackToUiHandler(callback, () -> { in error() 84 callback.error(titleId, messageId, factoryResetRequired); in error() 94 for (ProvisioningManagerCallback callback : mCallbacks) { in error() 95 postCallbackToUiHandler(callback, () -> { in error() [all …]
|
/packages/modules/AdServices/shared/tests/side-less/java/com/android/adservices/shared/testing/concurrency/ |
D | SyncCallbackTestCase.java | 104 CB callback = newCallback(settings); in newFrozenCallback() local 105 callback.freezeToString(); in newFrozenCallback() 106 return callback; in newFrozenCallback() 110 protected final String call(CB callback) { in call() argument 111 String methodName = callCallback(callback); in call() 114 "Callback " + callback + " returned null to callCallback()"); in call() 153 protected abstract String callCallback(CB callback); in callCallback() argument 182 CB callback = newFrozenCallback(mDefaultSettings); in testHasExpectedConstructors() local 184 Class<CB> callbackClass = (Class<CB>) callback.getClass(); in testHasExpectedConstructors() 219 CB callback = newFrozenCallback(mDefaultSettings); in testGetSettings() local [all …]
|
/packages/modules/Profiling/tests/cts/src/android/profiling/cts/ |
D | ProfilingFrameworkTests.java | 159 AppCallback callback = new AppCallback(); in testInvalidProfilingType() local 168 callback); in testInvalidProfilingType() 171 waitForCallback(callback); in testInvalidProfilingType() 173 assertEquals(ProfilingResult.ERROR_FAILED_INVALID_REQUEST, callback.mResult.getErrorCode()); in testInvalidProfilingType() 182 AppCallback callback = new AppCallback(); in testInvalidProfilingParams() local 195 callback); in testInvalidProfilingParams() 198 waitForCallback(callback); in testInvalidProfilingParams() 200 assertEquals(ProfilingResult.ERROR_FAILED_INVALID_REQUEST, callback.mResult.getErrorCode()); in testInvalidProfilingParams() 212 AppCallback callback = new AppCallback(); in testRequestJavaHeapDumpSuccess() local 221 callback); in testRequestJavaHeapDumpSuccess() [all …]
|
/packages/modules/HealthFitness/framework/java/android/health/connect/ |
D | HealthConnectManager.java | 549 @NonNull OutcomeReceiver<InsertRecordsResponse, HealthConnectException> callback) { in insertRecords() argument 552 Objects.requireNonNull(callback); in insertRecords() 573 callback.onResult( in insertRecords() 582 returnError(executor, exception, callback); in insertRecords() 609 OutcomeReceiver<AggregateRecordsResponse<T>, HealthConnectException> callback) { in aggregate() argument 612 Objects.requireNonNull(callback); in aggregate() 624 callback.onResult( in aggregate() 628 callback.onError( in aggregate() 636 returnError(executor, exception, callback); in aggregate() 644 callback); in aggregate() [all …]
|
/packages/modules/AppSearch/framework/java/android/app/appsearch/ |
D | AppSearchSession.java | 118 @NonNull Consumer<AppSearchResult<AppSearchSession>> callback) { in createSearchSession() argument 126 searchSession.initialize(executor, callback); in createSearchSession() 133 @NonNull Consumer<AppSearchResult<AppSearchSession>> callback) { in initialize() argument 146 callback, in initialize() 150 callback.accept( in initialize() 154 callback.accept( in initialize() 198 @NonNull Consumer<AppSearchResult<SetSchemaResponse>> callback) { in setSchema() argument 202 Objects.requireNonNull(callback); in setSchema() 220 request, schemaList, visibilityConfigs, callbackExecutor, callback); in setSchema() 228 callback); in setSchema() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | ZoneAudioPlaybackCallbackTest.java | 146 ZoneAudioPlaybackCallback callback = new ZoneAudioPlaybackCallback(mPrimaryZone, in getAllActiveContextsForPrimaryZone_withNoOnPlaybackConfigChanged_returnsEmptyList() local 150 callback.getAllActiveAudioAttributes(); in getAllActiveContextsForPrimaryZone_withNoOnPlaybackConfigChanged_returnsEmptyList() 165 ZoneAudioPlaybackCallback callback = new ZoneAudioPlaybackCallback(mPrimaryZone, in getAllActiveContextsForPrimaryZone_withOneMatchingConfiguration_returnsActiveContext() local 168 callback.onPlaybackConfigChanged(activeConfigurations); in getAllActiveContextsForPrimaryZone_withOneMatchingConfiguration_returnsActiveContext() 171 callback.getAllActiveAudioAttributes(); in getAllActiveContextsForPrimaryZone_withOneMatchingConfiguration_returnsActiveContext() 184 ZoneAudioPlaybackCallback callback = new ZoneAudioPlaybackCallback(mPrimaryZone, in getAllActiveContextsForPrimaryZone_withNullPlaybackMonitor() local 186 callback.onPlaybackConfigChanged(activeConfigurations); in getAllActiveContextsForPrimaryZone_withNullPlaybackMonitor() 189 callback.getAllActiveAudioAttributes(); in getAllActiveContextsForPrimaryZone_withNullPlaybackMonitor() 209 ZoneAudioPlaybackCallback callback = new ZoneAudioPlaybackCallback(mPrimaryZone, in getAllActiveContextsForPrimaryZone_withMultipleConfiguration_returnsActiveContexts() local 212 callback.onPlaybackConfigChanged(activeConfigurations); in getAllActiveContextsForPrimaryZone_withMultipleConfiguration_returnsActiveContexts() [all …]
|
/packages/modules/DeviceLock/framework/java/android/devicelock/ |
D | DeviceLockManager.java | 98 @NonNull OutcomeReceiver<Void, Exception> callback) { in lockDevice() argument 100 Objects.requireNonNull(callback); in lockDevice() 107 executor.execute(() -> callback.onResult(null)); in lockDevice() 112 callback.onError(parcelableException.getException()); in lockDevice() 116 executor.execute(() -> callback.onError(new RuntimeException(e))); in lockDevice() 128 @NonNull OutcomeReceiver<Void, Exception> callback) { in unlockDevice() argument 130 Objects.requireNonNull(callback); in unlockDevice() 137 executor.execute(() -> callback.onResult(null)); in unlockDevice() 142 callback.onError(parcelableException.getException()); in unlockDevice() 146 executor.execute(() -> callback.onError(new RuntimeException(e))); in unlockDevice() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/le_scan/ |
D | PeriodicScanManager.java | 68 public IPeriodicAdvertisingCallback callback; field in PeriodicScanManager.SyncTransferInfo 70 SyncTransferInfo(String address, IPeriodicAdvertisingCallback callback) { in SyncTransferInfo() argument 72 this.callback = callback; in SyncTransferInfo() 85 public IPeriodicAdvertisingCallback callback; field in PeriodicScanManager.SyncInfo 94 IPeriodicAdvertisingCallback callback) { in SyncInfo() argument 101 this.callback = callback; in SyncInfo() 121 public IPeriodicAdvertisingCallback callback; field in PeriodicScanManager.SyncDeathRecipient 123 SyncDeathRecipient(IPeriodicAdvertisingCallback callback) { in SyncDeathRecipient() argument 124 this.callback = callback; in SyncDeathRecipient() 130 stopSync(callback); in binderDied() [all …]
|
/packages/modules/Bluetooth/framework/java/android/bluetooth/le/ |
D | BluetoothLeAdvertiser.java | 102 final AdvertiseCallback callback) { in startAdvertising() argument 103 startAdvertising(settings, advertiseData, null, callback); in startAdvertising() 124 final AdvertiseCallback callback) { in startAdvertising() argument 127 if (callback == null) { in startAdvertising() 135 postStartFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_DATA_TOO_LARGE); in startAdvertising() 138 if (mLegacyAdvertisers.containsKey(callback)) { in startAdvertising() 139 postStartFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED); in startAdvertising() 177 AdvertisingSetCallback wrapped = wrapOldCallback(callback, settings); in startAdvertising() 178 mLegacyAdvertisers.put(callback, wrapped); in startAdvertising() 195 AdvertisingSetCallback wrapOldCallback(AdvertiseCallback callback, AdvertiseSettings settings) { in wrapOldCallback() argument [all …]
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/ |
D | HealthConnectServiceImpl.java | 355 @NonNull IInsertRecordsResponseCallback callback) { in insertRecords() argument 356 checkParamsNonNull(attributionSource, recordsParcel, callback); in insertRecords() 401 tryAndReturnResult(callback, uuids, logger); in insertRecords() 413 callback, sqLiteException, HealthConnectException.ERROR_IO); in insertRecords() 417 tryAndThrowException(callback, securityException, ERROR_SECURITY); in insertRecords() 423 callback, in insertRecords() 429 tryAndThrowException(callback, e, ERROR_INTERNAL); in insertRecords() 460 @NonNull IAggregateRecordsResponseCallback callback) { in aggregateRecords() argument 461 checkParamsNonNull(attributionSource, request, callback); in aggregateRecords() 529 callback.onResult( in aggregateRecords() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/privacy/ |
D | SensorPrivacyManagerHelperTest.java | 130 SensorPrivacyManagerHelper.Callback callback = in addCallbackNoFilter_invokeCallback() local 132 mSensorPrivacyManagerHelper.addSensorBlockedListener(mExecutor, callback); in addCallbackNoFilter_invokeCallback() 135 verify(callback, times(1)).onSensorPrivacyChanged(eq(t), eq(s), eq(e)); in addCallbackNoFilter_invokeCallback() 136 verify(callback, times(i + 1)).onSensorPrivacyChanged(anyInt(), anyInt(), anyBoolean()); in addCallbackNoFilter_invokeCallback() 148 SensorPrivacyManagerHelper.Callback callback = in addCallbackMicrophoneOnlyFilter_invokeCallbackMicrophoneOnly() local 151 callback); in addCallbackMicrophoneOnlyFilter_invokeCallbackMicrophoneOnly() 152 mSensorPrivacyManagerHelper.removeSensorBlockedListener(callback); in addCallbackMicrophoneOnlyFilter_invokeCallbackMicrophoneOnly() 155 verify(callback, never()).onSensorPrivacyChanged(anyInt(), eq(SENSOR_MICROPHONE), in addCallbackMicrophoneOnlyFilter_invokeCallbackMicrophoneOnly() 168 SensorPrivacyManagerHelper.Callback callback = in addCallbackCameraOnlyFilter_invokeCallbackCameraOnly() local 171 callback); in addCallbackCameraOnlyFilter_invokeCallbackCameraOnly() [all …]
|
/packages/modules/Permission/framework-s/java/android/app/role/ |
D | RoleControllerService.java | 92 public void grantDefaultRoles(RemoteCallback callback) { in onBind() 94 Objects.requireNonNull(callback, "callback cannot be null"); in onBind() 96 mWorkerHandler.post(() -> RoleControllerService.this.grantDefaultRoles(callback)); in onBind() 101 RemoteCallback callback) { in onBind() argument 103 Objects.requireNonNull(callback, "callback cannot be null"); in onBind() 106 packageName, flags, callback)); in onBind() 111 RemoteCallback callback) { in onBind() argument 113 Objects.requireNonNull(callback, "callback cannot be null"); in onBind() 116 packageName, flags, callback)); in onBind() 120 public void onClearRoleHolders(String roleName, int flags, RemoteCallback callback) { in onBind() argument [all …]
|
/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/task/ |
D | ConnectMobileNetworkTaskRoboTest.java | 66 FakeAbstractProvisioningTaskCallback callback = new FakeAbstractProvisioningTaskCallback(); in run_withoutConnection_noCallbackSuccess() local 67 ConnectMobileNetworkTask task = buildTask(callback); in run_withoutConnection_noCallbackSuccess() 71 assertThat(callback.getSuccessCount(task)).isEqualTo(0); in run_withoutConnection_noCallbackSuccess() 77 FakeAbstractProvisioningTaskCallback callback = new FakeAbstractProvisioningTaskCallback(); in connectToNetwork_afterRun_callbackSuccess() local 78 ConnectMobileNetworkTask task = buildTask(callback); in connectToNetwork_afterRun_callbackSuccess() 84 assertThat(callback.getSuccessCount(task)).isEqualTo(1); in connectToNetwork_afterRun_callbackSuccess() 85 assertThat(callback.getErrorCount(task)).isEqualTo(0); in connectToNetwork_afterRun_callbackSuccess() 90 FakeAbstractProvisioningTaskCallback callback = new FakeAbstractProvisioningTaskCallback(); in connectToNetworkTwice_afterRun_oneCallbackSuccess() local 91 ConnectMobileNetworkTask task = buildTask(callback); in connectToNetworkTwice_afterRun_oneCallbackSuccess() 100 assertThat(callback.getSuccessCount(task)).isEqualTo(1); in connectToNetworkTwice_afterRun_oneCallbackSuccess() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/ |
D | FetchCustomAudienceImplTest.java | 299 FetchCustomAudienceTestCallback callback = callFetchCustomAudience(mInputBuilder.build()); in testImpl_disabled() local 302 assertFalse(callback.mIsSuccess); in testImpl_disabled() 325 FetchCustomAudienceTestCallback callback = in testImpl_invalidPackageName_throws() local 329 assertFalse(callback.mIsSuccess); in testImpl_invalidPackageName_throws() 330 assertEquals(STATUS_UNAUTHORIZED, callback.mFledgeErrorResponse.getStatusCode()); in testImpl_invalidPackageName_throws() 333 callback.mFledgeErrorResponse.getErrorMessage()); in testImpl_invalidPackageName_throws() 357 FetchCustomAudienceTestCallback callback = callFetchCustomAudience(mInputBuilder.build()); in testImpl_throttled_throws() local 359 assertFalse(callback.mIsSuccess); in testImpl_throttled_throws() 360 assertEquals(STATUS_RATE_LIMIT_REACHED, callback.mFledgeErrorResponse.getStatusCode()); in testImpl_throttled_throws() 362 RATE_LIMIT_REACHED_ERROR_MESSAGE, callback.mFledgeErrorResponse.getErrorMessage()); in testImpl_throttled_throws() [all …]
|