Home
last modified time | relevance | path

Searched refs:listener1 (Results 1 – 18 of 18) sorted by relevance

/packages/modules/StatsD/statsd/tests/state/
DStateTracker_test.cpp110 sp<TestStateListener> listener1 = new TestStateListener(); in TEST() local
114 mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1); in TEST()
117 mgr.unregisterListener(util::SCREEN_STATE_CHANGED, listener1); in TEST()
122 sp<TestStateListener> listener1 = new TestStateListener(); in TEST() local
126 mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1); in TEST()
178 sp<TestStateListener> listener1 = new TestStateListener(); in TEST() local
184 mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1); in TEST()
212 sp<TestStateListener> listener1 = new TestStateListener(); in TEST() local
218 mgr.unregisterListener(util::SCREEN_STATE_CHANGED, listener1); in TEST()
223 mgr.registerListener(util::SCREEN_STATE_CHANGED, listener1); in TEST()
[all …]
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/util/
DGestureExclusionManagerTest.kt43 @Mock private lateinit var listener1: ExclusionListener variable in com.android.quickstep.util.GestureExclusionManagerTest
59 underTest.addListener(listener1) in addListener_registers()
68 underTest.addListener(listener1) in addListener_again_skips_register()
80 underTest.addListener(listener1) in removeListener_unregisters()
84 underTest.removeListener(listener1) in removeListener_unregisters()
93 underTest.addListener(listener1) in removeListener_again_skips_unregister()
98 underTest.removeListener(listener1) in removeListener_again_skips_unregister()
106 underTest.addListener(listener1) in onSystemGestureExclusionChanged_dispatches_to_listeners()
112 verify(listener1).onGestureExclusionChanged(r1, r2) in onSystemGestureExclusionChanged_dispatches_to_listeners()
120 underTest.addListener(listener1) in addLister_dispatches_second_time()
[all …]
/packages/modules/Connectivity/tests/unit/java/android/net/nsd/
DNsdManagerTest.java202 NsdManager.ResolveListener listener1 = mock(NsdManager.ResolveListener.class); in doTestParallelResolveService() local
205 manager.resolveService(request, listener1); in doTestParallelResolveService()
215 verify(listener1, timeout(mTimeoutMs).times(1)).onServiceResolved(reply); in doTestParallelResolveService()
259 NsdManager.RegistrationListener listener1 = mock(NsdManager.RegistrationListener.class); in doTestRegisterService() local
263 manager.registerService(request1, PROTOCOL, listener1); in doTestRegisterService()
276 verify(listener1, timeout(mTimeoutMs).times(1)).onRegistrationFailed(request1, err); in doTestRegisterService()
279 manager.registerService(request1, PROTOCOL, listener1); in doTestRegisterService()
284 verify(listener1, timeout(mTimeoutMs).times(1)).onServiceRegistered(request1); in doTestRegisterService()
287 manager.unregisterService(listener1); in doTestRegisterService()
292 verify(listener1, timeout(mTimeoutMs).times(1)).onServiceUnregistered(request1); in doTestRegisterService()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarSensorManagerTest.java335 SensorListener listener1 = new SensorListener(); in testEventsWithMultipleListeners() local
339 mCarSensorManager.registerListener(listener1, in testEventsWithMultipleListeners()
356 listener1.waitForSensorChange(); in testEventsWithMultipleListeners()
359 listener1.reset(); in testEventsWithMultipleListeners()
370 assertTrue(listener1.waitForSensorChange(1001L)); in testEventsWithMultipleListeners()
375 assertEquals(listener1.getLastEvent().sensorType, in testEventsWithMultipleListeners()
383 data = listener1.getLastEvent().getParkingBrakeData(data); in testEventsWithMultipleListeners()
401 listener1.reset(); in testEventsWithMultipleListeners()
410 assertTrue(listener1.waitForSensorChange(2001)); in testEventsWithMultipleListeners()
415 assertEquals(listener1.getLastEvent().sensorType, in testEventsWithMultipleListeners()
[all …]
DCarDiagnosticManagerTest.java748 Listener listener1 = new Listener(); in testMultipleListeners() local
752 listener1, in testMultipleListeners()
760 listener1.reset(); in testMultipleListeners()
765 CarDiagnosticEvent event1 = listener1.waitForEvent(time); in testMultipleListeners()
787 listener1.reset(); in testMultipleListeners()
790 mCarDiagnosticManager.unregisterListener(listener1); in testMultipleListeners()
794 assertThat(listener1.waitForEvent(time)).isNull(); in testMultipleListeners()
920 Listener listener1 = new Listener(); in testListenerUnregister() local
923 listener1, in testListenerUnregister()
927 listener1, in testListenerUnregister()
[all …]
DCarStorageMonitoringTest.java616 Listener listener1 = new Listener("listener1"); in testEventDelivery() local
619 mCarStorageMonitoringManager.registerListener(listener1); in testEventDelivery()
626 assertTrue(listener1.waitForEvent(eventDeliveryDeadline)); in testEventDelivery()
629 IoStats event1 = listener1.reset(); in testEventDelivery()
635 mCarStorageMonitoringManager.unregisterListener(listener1); in testEventDelivery()
638 assertFalse(listener1.waitForEvent(eventDeliveryDeadline)); in testEventDelivery()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarUserManagerTest.java134 BlockingUserLifecycleListener listener1 = BlockingUserLifecycleListener in testLifecycleMultipleListeners() local
157 Log.d(TAG, "registering listener1: " + listener1); in testLifecycleMultipleListeners()
158 mgr1.addListener(Runnable::run, listener1); in testLifecycleMultipleListeners()
175 List<UserLifecycleEvent> events1 = listener1.waitForEvents(); in testLifecycleMultipleListeners()
192 Log.d(TAG, "unregistering listener1: " + listener1); in testLifecycleMultipleListeners()
193 mgr1.removeListener(listener1); in testLifecycleMultipleListeners()
232 BlockingUserLifecycleListener listener1 = BlockingUserLifecycleListener in testGuestUserResumeToNewGuestUser() local
238 mCarUserManager.addListener(Runnable::run, listener1); in testGuestUserResumeToNewGuestUser()
241 listener1.waitForEvents(); in testGuestUserResumeToNewGuestUser()
243 mCarUserManager.removeListener(listener1); in testGuestUserResumeToNewGuestUser()
DCarAppFocusManagerTest.java106 FocusChangedListener listener1 = new FocusChangedListener(); in testRegisterUnregisterSpecificApp() local
110 manager.addFocusListener(listener1, APP_FOCUS_TYPE_NAVIGATION); in testRegisterUnregisterSpecificApp()
113 manager.removeFocusListener(listener1, APP_FOCUS_TYPE_NAVIGATION); in testRegisterUnregisterSpecificApp()
119 assertThat(listener1.waitForFocusChangeAndAssert( in testRegisterUnregisterSpecificApp()
240 FocusChangedListener listener1 = new FocusChangedListener(); in testFilter() local
243 manager1.addFocusListener(listener1, APP_FOCUS_TYPE_NAVIGATION); in testFilter()
251 assertThat(listener1.waitForFocusChangeAndAssert(DEFAULT_WAIT_TIMEOUT_MS, in testFilter()
256 listener1.reset(); in testFilter()
259 assertThat(listener1.waitForFocusChangeAndAssert(DEFAULT_WAIT_TIMEOUT_MS, in testFilter()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/am/
DCarActivityServiceTaskMonitorUnitTest.java210 FilteredListener listener1 = new FilteredListener(mActivityA); in testMultipleActivityListeners() local
211 mService.registerActivityListener(listener1); in testMultipleActivityListeners()
218 assertThat(listener1.mActivityCameOnTop.getCount()).isEqualTo(0); in testMultipleActivityListeners()
223 FilteredListener listener1 = new FilteredListener(mActivityA); in testUnregisterActivityListener() local
224 mService.registerActivityListener(listener1); in testUnregisterActivityListener()
227 mService.unregisterActivityListener(listener1); in testUnregisterActivityListener()
232 assertThat(listener1.mActivityCameOnTop.getCount()).isEqualTo(1); in testUnregisterActivityListener()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/systemui/keyguard/
DExperimentalCarKeyguardServiceTest.java233 IExperimentalCarKeyguardLockedStateListener listener1 = in addLockedStateListener_registerToDelegateOnce() local
241 state.addKeyguardLockedStateListener(listener1); in addLockedStateListener_registerToDelegateOnce()
249 IExperimentalCarKeyguardLockedStateListener listener1 = in removeLastLockedStateListener_unregistersFromDelegate() local
256 state.addKeyguardLockedStateListener(listener1); in removeLastLockedStateListener_unregistersFromDelegate()
261 state.removeKeyguardLockedStateListener(listener1); in removeLastLockedStateListener_unregistersFromDelegate()
/packages/services/Telephony/tests/src/com/android/services/telephony/domainselection/
DDataConnectionStateHelperTest.java288 TelephonyCallback.PreciseDataConnectionStateListener listener1 = in testDataConnectionStateChanged() local
295 listener1.onPreciseDataConnectionStateChanged(state); in testDataConnectionStateChanged()
303 listener1.onPreciseDataConnectionStateChanged(state); in testDataConnectionStateChanged()
313 listener1.onPreciseDataConnectionStateChanged(state); in testDataConnectionStateChanged()
323 listener1.onPreciseDataConnectionStateChanged(state); in testDataConnectionStateChanged()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DTextReadingPreferenceFragmentTest.java107 final ResetStateListener listener1 = mock(ResetStateListener.class); in onDialogPositiveButtonClicked_boldTextDisabled_resetAllListeners() local
109 mFragment.mResetStateListeners = new ArrayList<>(Arrays.asList(listener1, listener2)); in onDialogPositiveButtonClicked_boldTextDisabled_resetAllListeners()
117 verify(listener1).resetState(); in onDialogPositiveButtonClicked_boldTextDisabled_resetAllListeners()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DEthernetManagerTest.kt569 val listener1 = EthernetStateListener() in <lambda>() constant
570 addInterfaceStateListener(listener1) in <lambda>()
571 listener1.expectCallback(iface, STATE_LINK_UP, ROLE_CLIENT) in <lambda>()
575 listener1.expectCallback(iface2, STATE_LINK_DOWN, ROLE_CLIENT) in <lambda>()
576 listener1.expectCallback(iface2, STATE_LINK_UP, ROLE_CLIENT) in <lambda>()
586 for (listener in listOf(listener1, listener2)) { in <lambda>()
592 for (listener in listOf(listener1, listener2)) { in <lambda>()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarInputServiceTest.java351 CarInputService.KeyEventListener listener1 = mock(CarInputService.KeyEventListener.class); in registerKeyEventListener_separateListenersWithSameEventsOfInterest_fails() local
354 mCarInputService.registerKeyEventListener(listener1, interestedEvents); in registerKeyEventListener_separateListenersWithSameEventsOfInterest_fails()
367 CarInputService.KeyEventListener listener1 = mock(CarInputService.KeyEventListener.class); in registerKeyEventListener_separateListenersWithOverlappingEventsOfInterest_fails() local
371 mCarInputService.registerKeyEventListener(listener1, interestedEvents1); in registerKeyEventListener_separateListenersWithOverlappingEventsOfInterest_fails()
459 CarInputService.KeyEventListener listener1 = mock(CarInputService.KeyEventListener.class); in onKeyEvent_withMultipleListeners_callToListener() local
463 mCarInputService.registerKeyEventListener(listener1, interestedEvents1); in onKeyEvent_withMultipleListeners_callToListener()
469 verify(listener1, never()).onKeyEvent(any(), anyInt(), anyInt()); in onKeyEvent_withMultipleListeners_callToListener()
477 CarInputService.KeyEventListener listener1 = mock(CarInputService.KeyEventListener.class); in onKeyEvent_withMultipleListeners_noCallToListeners() local
481 mCarInputService.registerKeyEventListener(listener1, interestedEvents1); in onKeyEvent_withMultipleListeners_noCallToListeners()
487 verify(listener1, never()).onKeyEvent(any(), anyInt(), anyInt()); in onKeyEvent_withMultipleListeners_noCallToListeners()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/coex/
DCoexManagerTest.java281 CoexManager.CoexListener listener1 = mock(CoexManager.CoexListener.class); in testRegisteredCoexListener_setCoexUnsafeChannels_listenerIsNotified() local
284 coexManager.registerCoexListener(listener1); in testRegisteredCoexListener_setCoexUnsafeChannels_listenerIsNotified()
294 verify(listener1).onCoexUnsafeChannelsChanged(); in testRegisteredCoexListener_setCoexUnsafeChannels_listenerIsNotified()
304 CoexManager.CoexListener listener1 = mock(CoexManager.CoexListener.class); in testUnregisteredCoexListener_setCoexUnsafeChannels_listenerIsNotNotified() local
307 coexManager.registerCoexListener(listener1); in testUnregisteredCoexListener_setCoexUnsafeChannels_listenerIsNotNotified()
309 coexManager.unregisterCoexListener(listener1); in testUnregisteredCoexListener_setCoexUnsafeChannels_listenerIsNotNotified()
319 verify(listener1, never()).onCoexUnsafeChannelsChanged(); in testUnregisteredCoexListener_setCoexUnsafeChannels_listenerIsNotNotified()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DScanRequestProxyTest.java628 WifiScannerInternal.ScanListener listener1; in testSuccessiveScanRequestsDontUseSameListener() local
633 listener1 = mScanRequestListenerArgumentCaptor.getValue(); in testSuccessiveScanRequestsDontUseSameListener()
641 assertNotEquals(listener1, listener2); in testSuccessiveScanRequestsDontUseSameListener()
/packages/modules/Connectivity/tests/unit/java/com/android/server/
DNsdServiceTest.java358 final RegistrationListener listener1 = mock(RegistrationListener.class); in testClientRequestsAreGCedAtDisconnection() local
359 client.registerService(request, PROTOCOL, listener1); in testClientRequestsAreGCedAtDisconnection()
397 final RegistrationListener listener1 = mock(RegistrationListener.class); in testCleanupDelayNoRequestActive() local
398 client.registerService(request, PROTOCOL, listener1); in testCleanupDelayNoRequestActive()
407 client.unregisterService(listener1); in testCleanupDelayNoRequestActive()
/packages/modules/Permission/tests/cts/safetycenter/src/android/safetycenter/cts/
DSafetyCenterManagerTest.kt1707 val listener1 = safetyCenterTestHelper.addListener() in removeOnSafetyCenterDataChangedListener_listenerRemovedNotCalledOnSafetySourceData() constant
1713 listener1.receiveSafetyCenterData() in removeOnSafetyCenterDataChangedListener_listenerRemovedNotCalledOnSafetySourceData()