Home
last modified time | relevance | path

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

12

/packages/modules/AdServices/shared/tests/side-less/java/com/android/adservices/shared/testing/concurrency/
DSyncCallbackTestCase.java172 CB callback2 = newFrozenCallback(mDefaultSettings); in testNewCallback() local
173 expect.withMessage("2nd callback").that(callback2).isNotNull(); in testNewCallback()
174 expect.withMessage("2nd callback").that(callback2).isNotSameInstanceAs(callback1); in testNewCallback()
232 CB callback2 = newFrozenCallback(mDefaultSettings); in testGetId() local
233 String id2 = callback2.getId(); in testGetId()
348 CB callback2 = newFrozenCallback(settings); in testAssertCalled_multipleCallsFromMultipleCallbacks_firstFinishFirst() local
353 assertThrows(SyncCallbackTimeoutException.class, () -> callback2.assertCalled()); in testAssertCalled_multipleCallsFromMultipleCallbacks_firstFinishFirst()
355 expectIsCalled(callback2, "after 1st call on 1st callback", false); in testAssertCalled_multipleCallsFromMultipleCallbacks_firstFinishFirst()
358 runAsync(injectionTimeoutMs, () -> call(callback2)); in testAssertCalled_multipleCallsFromMultipleCallbacks_firstFinishFirst()
360 assertThrows(SyncCallbackTimeoutException.class, () -> callback2.assertCalled()); in testAssertCalled_multipleCallsFromMultipleCallbacks_firstFinishFirst()
[all …]
/packages/modules/Uwb/framework/tests/src/android/uwb/
DAdapterStateListenerTest.java86 AdapterStateCallback callback2 = mock(AdapterStateCallback.class);
92 verifyCallbackStateChangedInvoked(callback2, 0);
95 adapterStateListener.register(getExecutor(), callback2);
98 verifyCallbackStateChangedInvoked(callback2, 1);
105 verifyCallbackStateChangedInvoked(callback2, 1);
108 adapterStateListener.unregister(callback2);
112 verifyCallbackStateChangedInvoked(callback2, 1);
282 AdapterStateCallback callback2 = mock(AdapterStateCallback.class);
288 adapterStateListener.register(getExecutor(), callback2);
289 verify(callback2).onStateChanged(AdapterStateCallback.STATE_ENABLED_ACTIVE,
DRangingManagerTest.java136 RangingSession.Callback callback2 = mock(RangingSession.Callback.class); in testOnRangingOpened_MultipleSessionsRegistered() local
153 ATTRIBUTION_SOURCE, PARAMS, EXECUTOR, callback2, /* chipIds= */ null); in testOnRangingOpened_MultipleSessionsRegistered()
165 verify(callback2, times(0)).onOpened(any()); in testOnRangingOpened_MultipleSessionsRegistered()
169 verify(callback2, times(1)).onOpened(any()); in testOnRangingOpened_MultipleSessionsRegistered()
422 RangingSession.Callback callback2 = mock(RangingSession.Callback.class); in testOnRangingClosed_MultipleSessionsRegistered() local
440 ATTRIBUTION_SOURCE, PARAMS, EXECUTOR, callback2, /* chipIds= */ null); in testOnRangingClosed_MultipleSessionsRegistered()
452 verify(callback2, times(0)).onClosed(anyInt(), any()); in testOnRangingClosed_MultipleSessionsRegistered()
456 verify(callback2, times(1)).onClosed(anyInt(), any()); in testOnRangingClosed_MultipleSessionsRegistered()
463 RangingSession.Callback callback2 = mock(RangingSession.Callback.class); in testOnRangingReport_MultipleSessionsRegistered() local
482 ATTRIBUTION_SOURCE, PARAMS, EXECUTOR, callback2, /* chipIds= */ null); in testOnRangingReport_MultipleSessionsRegistered()
[all …]
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarBugreportManagerTest.java138 FakeCarBugreportCallback callback2 = new FakeCarBugreportCallback(); in test_requestBugreport_cannotRunMultipleBugreports() local
146 mManager.requestBugreportForTesting(output2, extraOutput2, callback2); in test_requestBugreport_cannotRunMultipleBugreports()
148 callback2.waitTillDoneOrTimeout(BUGREPORT_TIMEOUT_MILLIS); in test_requestBugreport_cannotRunMultipleBugreports()
149 assertThat(callback2.getErrorCode()).isEqualTo( in test_requestBugreport_cannotRunMultipleBugreports()
157 FakeCarBugreportCallback callback2 = new FakeCarBugreportCallback(); in test_cancelBugreport_works() local
169 mManager.requestBugreportForTesting(output2, extraOutput2, callback2); in test_cancelBugreport_works()
171 callback2.waitTillProgressOrTimeout(BUGREPORT_TIMEOUT_MILLIS); in test_cancelBugreport_works()
172 assertThat(callback2.getErrorCode()).isEqualTo(NO_ERROR); in test_cancelBugreport_works()
173 assertThat(callback2.getReceivedProgress()).isEqualTo(true); in test_cancelBugreport_works()
/packages/modules/AdServices/sdksandbox/tests/hostsidetests/app/src/com/android/sdksandbox/app/
DSdkSandboxTestActivity.java54 FakeLoadSdkCallback callback2 = new FakeLoadSdkCallback(); in onCreate() local
56 sdkSandboxManager.loadSdk(SDK_NAME_2, params, Runnable::run, callback2); in onCreate()
58 callback2.assertLoadSdkIsSuccessful(); in onCreate()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/
DMdnsDiscoveryManagerTests.java210 final SocketCreationCallback callback2 = expectSocketCreationCallback( in registerMultipleListeners() local
212 runOnHandler(() -> callback2.onSocketCreated(SOCKET_KEY_NULL_NETWORK)); in registerMultipleListeners()
214 runOnHandler(() -> callback2.onSocketCreated(SOCKET_KEY_NETWORK_2)); in registerMultipleListeners()
232 final SocketCreationCallback callback2 = expectSocketCreationCallback( in onResponseReceived() local
234 runOnHandler(() -> callback2.onSocketCreated(SOCKET_KEY_NETWORK_2)); in onResponseReceived()
280 final SocketCreationCallback callback2 = expectSocketCreationCallback( in testSocketCreatedAndDestroyed() local
282 runOnHandler(() -> callback2.onSocketCreated(SOCKET_KEY_NETWORK_1)); in testSocketCreatedAndDestroyed()
310 runOnHandler(() -> callback2.onSocketDestroyed(SOCKET_KEY_NETWORK_2)); in testSocketCreatedAndDestroyed()
DMdnsMultinetworkSocketClientTest.java290 final SocketCallback callback2 = callback2Captor.getAllValues().get(1); in testSocketRemovedAfterNetworkUnrequested() local
293 callback2.onSocketCreated(mSocketKey, mSocket, List.of()); in testSocketRemovedAfterNetworkUnrequested()
294 callback2.onSocketCreated(socketKey2, socket2, List.of()); in testSocketRemovedAfterNetworkUnrequested()
295 callback2.onSocketCreated(socketKey3, socket3, List.of()); in testSocketRemovedAfterNetworkUnrequested()
312 verify(mProvider, timeout(DEFAULT_TIMEOUT)).unrequestSocket(callback2); in testSocketRemovedAfterNetworkUnrequested()
388 final SocketCallback callback2 = expectSocketCallback( in testSocketDestroyed_MultipleCallbacks() local
397 callback2.onSocketCreated(mSocketKey, mSocket, List.of()); in testSocketDestroyed_MultipleCallbacks()
406 callback2.onInterfaceDestroyed(mSocketKey, mSocket); in testSocketDestroyed_MultipleCallbacks()
DMdnsServiceCacheTest.kt209 val callback2 = ExpiredRecord() in <lambda>() constant
211 registerServiceExpiredCallback(serviceCache, cacheKey2, callback2) in <lambda>()
227 callback2.assertNoCallback() in <lambda>()
235 callback2.assertNoCallback() in <lambda>()
244 callback2.expectedServiceRecordExpired(SERVICE_NAME_3) in <lambda>()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/js/
DJavaScriptSandboxProviderTest.java193 FutureSyncCallback<Void> callback2 = new FutureSyncCallback<>(); in testJsSandboxProviderDestroysOnlyIfCurrentInstanceOnlyOnce() local
197 .addCallback(callback2, Runnable::run); in testJsSandboxProviderDestroysOnlyIfCurrentInstanceOnlyOnce()
200 callback2.assertResultReceived(); in testJsSandboxProviderDestroysOnlyIfCurrentInstanceOnlyOnce()
/packages/modules/AdServices/sdksandbox/tests/cts/endtoendtests/src/com/android/tests/sdksandbox/endtoend/
DSdkSandboxManagerTest.java361 final FakeLoadSdkCallback callback2 = new FakeLoadSdkCallback(); in testUnloadAndReloadSdk() local
362 mSdkSandboxManager.loadSdk(SDK_NAME_1, new Bundle(), Runnable::run, callback2); in testUnloadAndReloadSdk()
363 callback2.assertLoadSdkIsSuccessful(); in testUnloadAndReloadSdk()
580 FakeLoadSdkCallback callback2 = new FakeLoadSdkCallback(); in testSandboxApisAreUsableAfterUnbindingSandbox() local
581 mSdkSandboxManager.loadSdk(SDK_NAME_2, new Bundle(), Runnable::run, callback2); in testSandboxApisAreUsableAfterUnbindingSandbox()
582 callback2.assertLoadSdkIsSuccessful(); in testSandboxApisAreUsableAfterUnbindingSandbox()
1180 FakeLoadSdkCallback callback2 = new FakeLoadSdkCallback(); in loadMultipleSdks() local
1181 mSdkSandboxManager.loadSdk(SDK_NAME_2, new Bundle(), Runnable::run, callback2); in loadMultipleSdks()
1182 callback2.assertLoadSdkIsSuccessful(); in loadMultipleSdks()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/
DUserHalServiceTest.java418 GenericHalCallback<InitialUserInfoResponse> callback2 = new GenericHalCallback<>( in testGetUserInfo_secondCallFailWhilePending() local
423 callback2); in testGetUserInfo_secondCallFailWhilePending()
429 callback2.assertCalled(); in testGetUserInfo_secondCallFailWhilePending()
430 assertCallbackStatus(callback2, HalCallback.STATUS_CONCURRENT_OPERATION); in testGetUserInfo_secondCallFailWhilePending()
852 GenericHalCallback<SwitchUserResponse> callback2 = new GenericHalCallback<>( in testSwitchUser_secondCallFailWhilePending() local
858 callback2); in testSwitchUser_secondCallFailWhilePending() local
864 callback2.assertCalled(); in testSwitchUser_secondCallFailWhilePending()
865 assertCallbackStatus(callback2, HalCallback.STATUS_CONCURRENT_OPERATION); in testSwitchUser_secondCallFailWhilePending()
1314 GenericHalCallback<CreateUserResponse> callback2 = new GenericHalCallback<>( in testCreateUser_secondCallFailWhilePending() local
1318 mUserHalService.createUser(newValidCreateUserRequest(), HAL_TIMEOUT_MS, callback2); in testCreateUser_secondCallFailWhilePending() local
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DWifiDialogManagerTest.java386 SimpleDialogCallback callback2 = mock(SimpleDialogCallback.class); in testSimpleDialog_multipleDialogs_responseMatchedToCorrectCallback() local
389 callback2, callbackThreadRunner); in testSimpleDialog_multipleDialogs_responseMatchedToCorrectCallback()
399 verify(callback2, times(0)).onPositiveButtonClicked(); in testSimpleDialog_multipleDialogs_responseMatchedToCorrectCallback()
405 verify(callback2, times(1)).onPositiveButtonClicked(); in testSimpleDialog_multipleDialogs_responseMatchedToCorrectCallback()
1043 P2pInvitationReceivedDialogCallback callback2 = in testP2pInvitationReceivedDialog_multipleDialogs_responseMatchedToCorrectCallback() local
1047 callback2, callbackThreadRunner); in testP2pInvitationReceivedDialog_multipleDialogs_responseMatchedToCorrectCallback()
1057 verify(callback2, times(0)).onAccepted(null); in testP2pInvitationReceivedDialog_multipleDialogs_responseMatchedToCorrectCallback()
1063 verify(callback2, times(1)).onAccepted(null); in testP2pInvitationReceivedDialog_multipleDialogs_responseMatchedToCorrectCallback()
DHalDeviceManagerTest.java268 HalDeviceManager.ManagerStatusListener callback2 = mock( in testMultipleCallbackRegistrations() local
270 mDut.registerStatusListener(callback2, mHandler); in testMultipleCallbackRegistrations()
272 mDut.registerStatusListener(callback2, mHandler); in testMultipleCallbackRegistrations()
279 verify(callback2).onStatusChanged(); in testMultipleCallbackRegistrations()
281 verifyNoMoreInteractions(mManagerStatusListenerMock, callback1, callback2); in testMultipleCallbackRegistrations()
/packages/modules/AdServices/adservices/tests/unittest/service-core/adid/src/com/android/adservices/service/adid/
DAdIdCacheManagerTest.java115 IGetAdIdCallback callback2 = createSuccessGetAdIdCallBack(future2); in testGetAdId_cacheEnabled() local
116 mAdIdCacheManager.getAdId(PACKAGE_NAME, DUMMY_CALLER_UID, callback2); in testGetAdId_cacheEnabled()
/packages/modules/AdServices/sdksandbox/tests/unittest/src/com/android/server/sdksandbox/
DSdkSandboxManagerServiceUnitTest.java1265 FakeLoadSdkCallbackBinder callback2 = new FakeLoadSdkCallbackBinder(); in testNotifyInstrumentationStarted_doesNotAllowLoadSdk() local
1269 callback2.asBinder(), in testNotifyInstrumentationStarted_doesNotAllowLoadSdk()
1273 callback2); in testNotifyInstrumentationStarted_doesNotAllowLoadSdk()
1275 LoadSdkException thrown = callback2.getLoadSdkException(); in testNotifyInstrumentationStarted_doesNotAllowLoadSdk()
1311 FakeLoadSdkCallbackBinder callback2 = new FakeLoadSdkCallbackBinder(); in testNotifyInstrumentationFinished_canLoadSdk() local
1315 callback2.asBinder(), in testNotifyInstrumentationFinished_canLoadSdk()
1319 callback2); in testNotifyInstrumentationFinished_canLoadSdk()
1321 callback2.assertLoadSdkIsSuccessful(); in testNotifyInstrumentationFinished_canLoadSdk()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/fakevhal/
DFakeVehicleStubUnitTest.java1252 VehicleHalCallback callback2 = mock(VehicleHalCallback.class); in testSubscribeOnChangePropTwoClientSubscribeSameProp() local
1257 VehicleStub.SubscriptionClient client2 = fakeVehicleStub.newSubscriptionClient(callback2); in testSubscribeOnChangePropTwoClientSubscribeSameProp()
1264 verify(callback2, times(1)).onPropertyEvent(any(ArrayList.class)); in testSubscribeOnChangePropTwoClientSubscribeSameProp()
1548 VehicleHalCallback callback2 = mock(VehicleHalCallback.class); in testUnsubscribeContinuousPropTwoClient() local
1553 VehicleStub.SubscriptionClient client2 = fakeVehicleStub.newSubscriptionClient(callback2); in testUnsubscribeContinuousPropTwoClient()
1559 verify(callback2, timeout(100).atLeast(5)).onPropertyEvent(any(ArrayList.class)); in testUnsubscribeContinuousPropTwoClient()
1563 clearInvocations(callback2); in testUnsubscribeContinuousPropTwoClient()
1566 verify(callback2, timeout(100).atLeast(5)).onPropertyEvent(any(ArrayList.class)); in testUnsubscribeContinuousPropTwoClient()
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DTetheringTest.java2314 TestTetheringEventCallback callback2 = new TestTetheringEventCallback(); in testRegisterTetheringEventCallback() local
2346 mTethering.registerTetheringEventCallback(callback2); in testRegisterTetheringEventCallback()
2348 callback2.expectTetheredClientChanged(Collections.emptyList()); in testRegisterTetheringEventCallback()
2349 callback2.expectUpstreamChanged(upstreamState.network); in testRegisterTetheringEventCallback()
2350 callback2.expectConfigurationChanged( in testRegisterTetheringEventCallback()
2352 tetherState = callback2.pollTetherStatesChanged(); in testRegisterTetheringEventCallback()
2354 callback2.expectOffloadStatusChanged(TETHER_HARDWARE_OFFLOAD_STARTED); in testRegisterTetheringEventCallback()
2363 callback2.assertNoStateChangeCallback(); in testRegisterTetheringEventCallback()
2367 tetherState = callback2.pollTetherStatesChanged(); in testRegisterTetheringEventCallback()
2370 callback2.expectUpstreamChanged(NULL_NETWORK); in testRegisterTetheringEventCallback()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarAudioGainMonitorTest.java211 HalAudioGainCallback callback2 = mock(HalAudioGainCallback.class); in registercallback_multipleTimes() local
212 carAudioGainMonitor.registerAudioGainListener(callback2); in registercallback_multipleTimes()
213 verify(mAudioControlWrapperAidl).registerAudioGainCallback(eq(callback2)); in registercallback_multipleTimes()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/occupantconnection/
DCarOccupantConnectionServiceTest.java718 IConnectionRequestCallback callback2 = mock(IConnectionRequestCallback.class); in testReceiverServiceDisconnected() local
720 when(callback2.asBinder()).thenReturn(binder2); in testReceiverServiceDisconnected()
721 mAcceptedConnectionRequestMap.put(connectionId, callback2); in testReceiverServiceDisconnected()
738 verify(callback2).onDisconnected(receiverClient.occupantZone); in testReceiverServiceDisconnected()
DCarRemoteDeviceServiceTest.java862 IStateCallback callback2 = mock(IStateCallback.class); in testUnregisterStateCallbackWithOtherDiscoverers() local
864 when(callback2.asBinder()).thenReturn(callbackBinder); in testUnregisterStateCallbackWithOtherDiscoverers()
865 mCallbackMap.put(discoveringClient2, callback2); in testUnregisterStateCallbackWithOtherDiscoverers()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/
DCustomAudienceServiceEndToEndTest.java1717 ScheduleUpdateTestCallback callback2 = new ScheduleUpdateTestCallback(resultLatch2); in testScheduleCustomAudienceUpdate_MultipleUpdates_Success() local
1718 mService.scheduleCustomAudienceUpdate(input2, callback2); in testScheduleCustomAudienceUpdate_MultipleUpdates_Success()
1720 assertTrue(callback2.isSuccess()); in testScheduleCustomAudienceUpdate_MultipleUpdates_Success()
2040 ScheduleUpdateTestCallback callback2 = new ScheduleUpdateTestCallback(resultLatch2); in testScheduleCustomAudienceUpdate_MultipleInvalidUpdates_SilentFailure() local
2041 mService.scheduleCustomAudienceUpdate(input2, callback2); in testScheduleCustomAudienceUpdate_MultipleInvalidUpdates_SilentFailure()
2043 assertTrue(callback2.isSuccess()); in testScheduleCustomAudienceUpdate_MultipleInvalidUpdates_SilentFailure()
DFetchCustomAudienceImplTest.java1255 FetchCustomAudienceTestCallback callback2 = callFetchCustomAudience(mInputBuilder.build()); in testImpl_runNormally_differentResponsesToSameFetchUri() local
1256 assertTrue(callback2.mIsSuccess); in testImpl_runNormally_differentResponsesToSameFetchUri()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/remoteaccess/
DCarRemoteAccessServiceUnitTest.java882 ICarRemoteAccessCallbackImpl callback2 = new ICarRemoteAccessCallbackImpl(); in testUnbindServiceAfterTaskComplete() local
887 prepareReportTaskDoneTest(callback2, UID_PERMISSION_GRANTED_PACKAGE_TWO); in testUnbindServiceAfterTaskComplete()
888 String clientId2 = callback2.getClientId(); in testUnbindServiceAfterTaskComplete()
889 String taskId2 = callback2.getTaskId(); in testUnbindServiceAfterTaskComplete()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarPropertyManagerTest.java780 TestCallback callback2 = new TestCallback(/* initValueCount= */ 2, in testNotReceiveOnErrorEventAfterUnregister() local
782 mManager.registerCallback(callback2, VehiclePropertyIds.HVAC_TEMPERATURE_SET, in testNotReceiveOnErrorEventAfterUnregister()
793 callback2.assertOnErrorEventCalled(); in testNotReceiveOnErrorEventAfterUnregister()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DAuctionServerE2ETest.java553 PersistAdSelectionResultTestCallback callback2 = in testAuctionServer_consentDisabled_throwsException() local
555 assertTrue(callback2.mIsSuccess); in testAuctionServer_consentDisabled_throwsException()
557 adSelectionId, callback2.mPersistAdSelectionResultResponse.getAdSelectionId()); in testAuctionServer_consentDisabled_throwsException()
558 Assert.assertNotNull(callback2.mPersistAdSelectionResultResponse.getAdRenderUri()); in testAuctionServer_consentDisabled_throwsException()
560 Uri.EMPTY, callback2.mPersistAdSelectionResultResponse.getAdRenderUri()); in testAuctionServer_consentDisabled_throwsException()

12