Home
last modified time | relevance | path

Searched refs:listenerCaptor (Results 1 – 25 of 38) sorted by relevance

12

/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
DAutomaticBrightnessControllerTest.java202 ArgumentCaptor<SensorEventListener> listenerCaptor = in testNoHysteresisAtMinBrightness() local
204 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testNoHysteresisAtMinBrightness()
206 SensorEventListener listener = listenerCaptor.getValue(); in testNoHysteresisAtMinBrightness()
246 ArgumentCaptor<SensorEventListener> listenerCaptor = in testNoHysteresisAtMaxBrightness() local
248 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testNoHysteresisAtMaxBrightness()
250 SensorEventListener listener = listenerCaptor.getValue(); in testNoHysteresisAtMaxBrightness()
290 ArgumentCaptor<SensorEventListener> listenerCaptor = in testUserAddUserDataPoint() local
292 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testUserAddUserDataPoint()
294 SensorEventListener listener = listenerCaptor.getValue(); in testUserAddUserDataPoint()
314 ArgumentCaptor<SensorEventListener> listenerCaptor = in testRecalculateSplines() local
[all …]
DScreenOffBrightnessSensorControllerTest.java92 ArgumentCaptor<SensorEventListener> listenerCaptor = in testBrightness() local
94 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testBrightness()
96 SensorEventListener listener = listenerCaptor.getValue(); in testBrightness()
142 ArgumentCaptor<SensorEventListener> listenerCaptor = in testSensorValueValidTime() local
144 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testSensorValueValidTime()
146 SensorEventListener listener = listenerCaptor.getValue(); in testSensorValueValidTime()
DDisplayPowerControllerTest.java361 ArgumentCaptor<BrightnessSetting.BrightnessSettingListener> listenerCaptor = in testDisplayBrightnessFollowers_BothDpcsSupportNits() local
363 verify(mHolder.brightnessSetting).registerListener(listenerCaptor.capture()); in testDisplayBrightnessFollowers_BothDpcsSupportNits()
364 BrightnessSetting.BrightnessSettingListener listener = listenerCaptor.getValue(); in testDisplayBrightnessFollowers_BothDpcsSupportNits()
411 ArgumentCaptor<BrightnessSetting.BrightnessSettingListener> listenerCaptor = in testDisplayBrightnessFollowers_FollowerDoesNotSupportNits() local
413 verify(mHolder.brightnessSetting).registerListener(listenerCaptor.capture()); in testDisplayBrightnessFollowers_FollowerDoesNotSupportNits()
414 BrightnessSetting.BrightnessSettingListener listener = listenerCaptor.getValue(); in testDisplayBrightnessFollowers_FollowerDoesNotSupportNits()
443 ArgumentCaptor<BrightnessSetting.BrightnessSettingListener> listenerCaptor = in testDisplayBrightnessFollowers_LeadDpcDoesNotSupportNits() local
445 verify(mHolder.brightnessSetting).registerListener(listenerCaptor.capture()); in testDisplayBrightnessFollowers_LeadDpcDoesNotSupportNits()
446 BrightnessSetting.BrightnessSettingListener listener = listenerCaptor.getValue(); in testDisplayBrightnessFollowers_LeadDpcDoesNotSupportNits()
473 ArgumentCaptor<BrightnessSetting.BrightnessSettingListener> listenerCaptor = in testDisplayBrightnessFollowers_NeitherDpcSupportsNits() local
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/complication/
DSmartSpaceComplicationTest.java126 final ArgumentCaptor<BcSmartspaceDataPlugin.SmartspaceTargetListener> listenerCaptor = in testOverlayActive_addsTargetListener() local
128 verify(mSmartspaceController).addListener(listenerCaptor.capture()); in testOverlayActive_addsTargetListener()
143 final ArgumentCaptor<BcSmartspaceDataPlugin.SmartspaceTargetListener> listenerCaptor = in testOverlayActive_targetsNonEmpty_addsComplication() local
145 verify(mSmartspaceController).addListener(listenerCaptor.capture()); in testOverlayActive_targetsNonEmpty_addsComplication()
149 listenerCaptor.getValue().onSmartspaceTargetsUpdated(Collections.singletonList(target)); in testOverlayActive_targetsNonEmpty_addsComplication()
165 final ArgumentCaptor<BcSmartspaceDataPlugin.SmartspaceTargetListener> listenerCaptor = in testOverlayActive_targetsEmpty_addsComplication() local
167 verify(mSmartspaceController).addListener(listenerCaptor.capture()); in testOverlayActive_targetsEmpty_addsComplication()
170 listenerCaptor.getValue().onSmartspaceTargetsUpdated(Collections.emptyList()); in testOverlayActive_targetsEmpty_addsComplication()
186 final ArgumentCaptor<BcSmartspaceDataPlugin.SmartspaceTargetListener> listenerCaptor = in testOverlayInActive_removesTargetListener_removesComplication() local
188 verify(mSmartspaceController).addListener(listenerCaptor.capture()); in testOverlayInActive_removesTargetListener_removesComplication()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/ui/
DPanelTaskViewControllerTest.kt65 @Captor private lateinit var listenerCaptor: ArgumentCaptor<TaskView.Listener> variable in com.android.systemui.controls.ui.PanelTaskViewControllerTest
107 verify(taskView).setListener(any(), capture(listenerCaptor)) in testTaskViewOnInitializeStartsActivity()
109 listenerCaptor.value.onInitialized() in testTaskViewOnInitializeStartsActivity()
131 verify(taskView).setListener(any(), capture(listenerCaptor)) in testOnTaskCreated_taskViewAlpha1()
133 listenerCaptor.value.onTaskCreated(1, ComponentName("Test", "TEST")) in testOnTaskCreated_taskViewAlpha1()
141 verify(taskView).setListener(any(), capture(listenerCaptor)) in testHideRunnableCalledWhenBackOnRoot()
143 listenerCaptor.value.onBackPressedOnTaskRoot(0) in testHideRunnableCalledWhenBackOnRoot()
157 verify(taskView).setListener(any(), capture(listenerCaptor)) in testOnTaskRemovalStarted()
159 listenerCaptor.value.onTaskRemovalStarted(0) in testOnTaskRemovalStarted()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/telephony/data/repository/
DTelephonyRepositoryImplTest.kt76 val listenerCaptor = kotlinArgumentCaptor<TelephonyCallback.CallStateListener>() in callState() constant
77 verify(manager).addCallStateListener(listenerCaptor.capture()) in callState()
78 val listener = listenerCaptor.value in callState()
96 val listenerCaptor = kotlinArgumentCaptor<TelephonyCallback.CallStateListener>() in isInCall() constant
97 verify(manager).addCallStateListener(listenerCaptor.capture()) in isInCall()
98 val listener = listenerCaptor.value in isInCall()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/view/accessibility/data/repository/
DCaptioningRepositoryTest.kt46 private lateinit var listenerCaptor: ArgumentCaptor<CaptioningManager.CaptioningChangeListener> variable in com.android.settingslib.view.accessibility.data.repository.CaptioningRepositoryTest
105 verify(captioningManager).addCaptioningChangeListener(listenerCaptor.capture()) in triggerSystemAudioCaptioningUiChange()
106 listenerCaptor.value.onSystemAudioCaptioningUiChanged(enabled) in triggerSystemAudioCaptioningUiChange()
110 verify(captioningManager).addCaptioningChangeListener(listenerCaptor.capture()) in triggerOnSystemAudioCaptioningChange()
111 listenerCaptor.value.onSystemAudioCaptioningChanged(enabled) in triggerOnSystemAudioCaptioningChange()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/custom/
DCustomTilePackageUpdatesRepositoryTest.kt60 @Captor private lateinit var listenerCaptor: ArgumentCaptor<BroadcastReceiver> variable in com.android.systemui.qs.tiles.impl.custom.CustomTilePackageUpdatesRepositoryTest
112 capture(listenerCaptor), in unsupportedActionDoesntEmmit()
118 listenerCaptor.value.onReceive(mockedContext, Intent(Intent.ACTION_MAIN)) in unsupportedActionDoesntEmmit()
142 .registerReceiverAsUser(capture(listenerCaptor), any(), any(), nullable(), nullable()) in emitPackageChange()
143 listenerCaptor.value.onReceive( in emitPackageChange()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/
DNotificationMediaManagerTest.kt65 private var listenerCaptor = argumentCaptor<MediaDataManager.Listener>() variable
86 verify(mediaDataManager).addListener(listenerCaptor.capture()) in setup()
98 listenerCaptor.lastValue.onMediaDataRemoved(KEY, true) in mediaDataRemoved_userInitiated_dismissNotif()
107 listenerCaptor.lastValue.onMediaDataRemoved(KEY, false) in mediaDataRemoved_notUserInitiated_doesNotDismissNotif()
121 listenerCaptor.lastValue.onMediaDataRemoved(KEY, false) in mediaDataRemoved_notUserInitiated_flagOff_dismissNotif()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/data/repository/
DScreenBrightnessDisplayManagerRepositoryTest.kt112 val listenerCaptor = argumentCaptor<DisplayManager.DisplayListener>() in followsChangingBrightnessInfo() constant
121 capture(listenerCaptor), in followsChangingBrightnessInfo()
127 changeBrightnessInfoAndNotify(newBrightness, listenerCaptor.value) in followsChangingBrightnessInfo()
152 val listenerCaptor = argumentCaptor<DisplayManager.DisplayListener>() in minMaxWhenCollecting() constant
159 capture(listenerCaptor), in minMaxWhenCollecting()
166 listenerCaptor.value in minMaxWhenCollecting()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/imsphone/
DImsCallTest.java83 ArgumentCaptor<ImsCallSession.Listener> listenerCaptor = in testCallSessionProgressingAppliedMediaCaps() local
85 verify(mockSession).setListener(listenerCaptor.capture(), any()); in testCallSessionProgressingAppliedMediaCaps()
86 ImsCallSession.Listener listener = listenerCaptor.getValue(); in testCallSessionProgressingAppliedMediaCaps()
252 ArgumentCaptor<ImsCallSession.Listener> listenerCaptor = in testListenerCalledAfterCallClosed() local
254 verify(mockSession).setListener(listenerCaptor.capture(), any()); in testListenerCalledAfterCallClosed()
255 ImsCallSession.Listener listener = listenerCaptor.getValue(); in testListenerCalledAfterCallClosed()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/lifecycle/
DRepeatWhenAttachedTest.kt179 val listenerCaptor = argumentCaptor<ViewTreeObserver.OnWindowVisibilityChangeListener>() in repeatWhenAttached_becomesVisibleWithoutFocus_STARTED() constant
180 verify(viewTreeObserver).addOnWindowVisibilityChangeListener(listenerCaptor.capture()) in repeatWhenAttached_becomesVisibleWithoutFocus_STARTED()
183 listenerCaptor.value.onWindowVisibilityChanged(View.VISIBLE) in repeatWhenAttached_becomesVisibleWithoutFocus_STARTED()
195 val listenerCaptor = argumentCaptor<ViewTreeObserver.OnWindowFocusChangeListener>() in repeatWhenAttached_gainsFocusButInvisible_CREATED() constant
196 verify(viewTreeObserver).addOnWindowFocusChangeListener(listenerCaptor.capture()) in repeatWhenAttached_gainsFocusButInvisible_CREATED()
199 listenerCaptor.value.onWindowFocusChanged(true) in repeatWhenAttached_gainsFocusButInvisible_CREATED()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ambient/touch/
DInputSessionTest.java89 final ArgumentCaptor<InputChannelCompat.InputEventListener> listenerCaptor = in createSession() local
91 verify(mInputMonitor).getInputReceiver(any(), any(), listenerCaptor.capture()); in createSession()
92 mEventListener = listenerCaptor.getValue(); in createSession()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/
DWorkLockActivityControllerTest.java88 final ArgumentCaptor<TaskStackChangeListener> listenerCaptor = in setUp() local
93 verify(mTaskStackChangeListeners).registerTaskStackListener(listenerCaptor.capture()); in setUp()
94 mTaskStackListener = listenerCaptor.getValue(); in setUp()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dream/
DMediaDreamSentinelTest.java155 final ArgumentCaptor<MediaDataManager.Listener> listenerCaptor = in captureMediaDataListener() local
157 verify(mMediaDataManager).addListener(listenerCaptor.capture()); in captureMediaDataListener()
159 return listenerCaptor.getValue(); in captureMediaDataListener()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/management/
DAppAdapterTest.kt144 val listenerCaptor: ArgumentCaptor<View.OnClickListener> = argumentCaptor() in <lambda>() constant
145 verify(fakeView).setOnClickListener(capture(listenerCaptor)) in <lambda>()
146 listenerCaptor.value.onClick(fakeView) in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/muteawait/
DMediaMuteAwaitConnectionManagerTest.kt226 val listenerCaptor = ArgumentCaptor.forClass( in getMuteAwaitListener() constant
229 verify(audioManager).registerMuteAwaitConnectionCallback(any(), listenerCaptor.capture()) in getMuteAwaitListener()
230 return listenerCaptor.value!! in getMuteAwaitListener()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/
DHdrClamperTest.java96 ArgumentCaptor<HdrClamper.HdrListener> listenerCaptor = ArgumentCaptor.forClass( in setUp() local
98 verify(mMockInjector).getHdrListener(listenerCaptor.capture(), eq(mTestHandler)); in setUp()
99 mHdrChangeListener = listenerCaptor.getValue(); in setUp()
DBrightnessClamperControllerTest.java264 ArgumentCaptor<SensorEventListener> listenerCaptor = ArgumentCaptor.forClass( in testAmbientLuxChanges() local
267 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testAmbientLuxChanges()
269 SensorEventListener listener = listenerCaptor.getValue(); in testAmbientLuxChanges()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/systemsounds/
DHomeSoundEffectControllerTest.java409 final ArgumentCaptor<TaskStackChangeListener> listenerCaptor = in startController() local
411 verify(mTaskStackChangeListeners).registerTaskStackListener(listenerCaptor.capture()); in startController()
412 mTaskStackChangeListener = listenerCaptor.getValue(); in startController()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/
DShadeHeaderControllerTest.kt331 val listenerCaptor = argumentCaptor<Animator.AnimatorListener>() in <lambda>() constant
334 verify(animator).setListener(capture(listenerCaptor)) in <lambda>()
336 listenerCaptor.value.onAnimationStart(mock()) in <lambda>()
337 listenerCaptor.value.onAnimationEnd(mock()) in <lambda>()
342 verify(animator).setListener(capture(listenerCaptor)) in <lambda>()
344 listenerCaptor.value.onAnimationStart(mock()) in <lambda>()
345 listenerCaptor.value.onAnimationEnd(mock()) in <lambda>()
355 val listenerCaptor = argumentCaptor<Animator.AnimatorListener>() in <lambda>() constant
356 verify(animator).setListener(capture(listenerCaptor)) in <lambda>()
358 listenerCaptor.value.onAnimationEnd(mock()) in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/
DMediaCoordinatorTest.java277 ArgumentCaptor<NotifCollectionListener> listenerCaptor = in finishSetupWithMediaFeatureFlagEnabled() local
281 verify(mNotifPipeline).addCollectionListener(listenerCaptor.capture()); in finishSetupWithMediaFeatureFlagEnabled()
284 mListener = listenerCaptor.getValue(); in finishSetupWithMediaFeatureFlagEnabled()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/
DMediaSessionBasedFilterTest.kt140 val listenerCaptor = in setUp() constant
143 .addOnActiveSessionsChangedListener(listenerCaptor.capture(), any()) in setUp()
144 sessionListener = listenerCaptor.value in setUp()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/
DDesktopModeWindowDecorViewModelTests.kt181 val listenerCaptor = in setUp() constant
183 verify(displayInsetsController).addInsetsChangedListener(anyInt(), listenerCaptor.capture()) in setUp()
184 desktopModeOnInsetsChangedListener = listenerCaptor.firstValue in setUp()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/carrier/
DShadeCarrierGroupControllerTest.java650 ArgumentCaptor<View.OnClickListener> listenerCaptor = in testOnClickListenerLaunchesActivityIfViewVisible() local
654 verify(mShadeCarrier1).setOnClickListener(listenerCaptor.capture()); in testOnClickListenerLaunchesActivityIfViewVisible()
657 listenerCaptor.getValue().onClick(mShadeCarrier1); in testOnClickListenerLaunchesActivityIfViewVisible()

12