Home
last modified time | relevance | path

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

12

/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DCarrierTextControllerTest.java148 ArgumentCaptor<CarrierTextController.CarrierTextCallbackInfo> captor = in testAirplaneMode() local
153 verify(mCarrierTextCallback).updateCarrierInfo(captor.capture()); in testAirplaneMode()
154 assertEquals(AIRPLANE_MODE_TEXT, captor.getValue().carrierText); in testAirplaneMode()
171 ArgumentCaptor<CarrierTextController.CarrierTextCallbackInfo> captor = in testCardIOError() local
176 verify(mCarrierTextCallback).updateCarrierInfo(captor.capture()); in testCardIOError()
177 assertEquals("TEST_CARRIER" + SEPARATOR + INVALID_CARD_TEXT, captor.getValue().carrierText); in testCardIOError()
179 assertEquals(1, captor.getValue().listOfCarriers.length); in testCardIOError()
180 assertEquals(TEST_CARRIER, captor.getValue().listOfCarriers[0]); in testCardIOError()
188 verify(mCarrierTextCallback).updateCarrierInfo(captor.capture()); in testCardIOError()
189 assertEquals("TEST_CARRIER", captor.getValue().carrierText); in testCardIOError()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
DTileServicesTest.java98 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testRecalculateBindAllowance() local
99 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); in testRecalculateBindAllowance()
102 (boolean) captor.getValue()); in testRecalculateBindAllowance()
112 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testSetMemoryPressure() local
113 Mockito.verify(mManagers.get(i), Mockito.times(2)).setBindAllowed(captor.capture()); in testSetMemoryPressure()
116 (boolean) captor.getValue()); in testSetMemoryPressure()
133 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testCalcFew() local
134 Mockito.verify(mManagers.get(i), Mockito.times(1)).setBindAllowed(captor.capture()); in testCalcFew()
136 assertTrue(captor.getValue()); in testCalcFew()
DTileServiceManagerTest.java100 ArgumentCaptor<Boolean> captor = ArgumentCaptor.forClass(Boolean.class); in testBind() local
101 Mockito.verify(mTileLifecycle, Mockito.times(1)).setBindService(captor.capture()); in testBind()
102 assertTrue((boolean) captor.getValue()); in testBind()
111 captor = ArgumentCaptor.forClass(Boolean.class); in testBind()
112 Mockito.verify(mTileLifecycle, Mockito.times(2)).setBindService(captor.capture()); in testBind()
113 assertFalse((boolean) captor.getValue()); in testBind()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/whitebalance/
DAmbientSensorTest.java87 ArgumentCaptor<SensorEventListener> captor = in testAmbientBrightnessSensorCallback_NoCallbacks() local
89 verify(mSensorManagerMock).registerListener(captor.capture(), isA(Sensor.class), anyInt(), in testAmbientBrightnessSensorCallback_NoCallbacks()
94 SensorEventListener listener = captor.getValue(); in testAmbientBrightnessSensorCallback_NoCallbacks()
116 ArgumentCaptor<SensorEventListener> captor = in testAmbientBrightnessSensorCallback_CallbacksCalled() local
118 verify(mSensorManagerMock).registerListener(captor.capture(), eq(mLightSensor), in testAmbientBrightnessSensorCallback_CallbacksCalled()
120 SensorEventListener listener = captor.getValue(); in testAmbientBrightnessSensorCallback_CallbacksCalled()
149 ArgumentCaptor<SensorEventListener> captor = in testAmbientColorTemperatureSensorCallback_CallbacksCalled() local
151 verify(mSensorManagerMock).registerListener(captor.capture(), eq(mAmbientColorSensor), in testAmbientColorTemperatureSensorCallback_CallbacksCalled()
153 SensorEventListener listener = captor.getValue(); in testAmbientColorTemperatureSensorCallback_CallbacksCalled()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/
DNotificationGutsManagerTest.java233 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_camera() local
235 .startNotificationGutsIntent(captor.capture(), anyInt(), any()); in testAppOpsSettingsIntent_camera()
236 assertEquals(Intent.ACTION_MANAGE_APP_PERMISSIONS, captor.getValue().getAction()); in testAppOpsSettingsIntent_camera()
244 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_mic() local
246 .startNotificationGutsIntent(captor.capture(), anyInt(), any()); in testAppOpsSettingsIntent_mic()
247 assertEquals(Intent.ACTION_MANAGE_APP_PERMISSIONS, captor.getValue().getAction()); in testAppOpsSettingsIntent_mic()
256 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_camera_mic() local
258 .startNotificationGutsIntent(captor.capture(), anyInt(), any()); in testAppOpsSettingsIntent_camera_mic()
259 assertEquals(Intent.ACTION_MANAGE_APP_PERMISSIONS, captor.getValue().getAction()); in testAppOpsSettingsIntent_camera_mic()
267 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testAppOpsSettingsIntent_overlay() local
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneConfigurationManagerTest.java117 ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class); in testGetDsdsCapability() local
118 verify(mMockRadioConfig).getPhoneCapability(captor.capture()); in testGetDsdsCapability()
119 Message msg = captor.getValue(); in testGetDsdsCapability()
158 ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class); in testSwitchMultiSimConfig_dsdsCapable_noRebootRequired() local
159 verify(mMockRadioConfig).setModemsConfig(eq(2), captor.capture()); in testSwitchMultiSimConfig_dsdsCapable_noRebootRequired()
162 Message message = captor.getValue(); in testSwitchMultiSimConfig_dsdsCapable_noRebootRequired()
172 verify(mHandler).sendMessageAtTime(captor.capture(), anyLong()); in testSwitchMultiSimConfig_dsdsCapable_noRebootRequired()
173 message = captor.getValue(); in testSwitchMultiSimConfig_dsdsCapable_noRebootRequired()
DMissedIncomingCallSmsFilterTest.java86 ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class); in testMissedIncomingCallwithCallerId() local
87 verify(telecomManager).addNewIncomingCall(any(), captor.capture()); in testMissedIncomingCallwithCallerId()
89 Bundle bundle = captor.getValue(); in testMissedIncomingCallwithCallerId()
DSmsDispatchersControllerTest.java117 ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class); in testSendRetrySmsCdmaTest() local
123 verify(mSimulatedCommandsVerifier).sendImsCdmaSms(captor.capture(), eq(0), eq(0), in testSendRetrySmsCdmaTest()
125 assertEquals(1, captor.getAllValues().size()); in testSendRetrySmsCdmaTest()
126 assertNull(captor.getAllValues().get(0)); in testSendRetrySmsCdmaTest()
DImsSmsDispatcherTest.java106 ArgumentCaptor<SMSDispatcher.SmsTracker> captor = in testFallbackGsmRetry() local
109 verify(mSmsDispatchersController).sendRetrySms(captor.capture()); in testFallbackGsmRetry()
111 assertNotNull(captor.getValue()); in testFallbackGsmRetry()
112 assertTrue(captor.getValue().mRetryCount > 0); in testFallbackGsmRetry()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWakeupOnboardingTest.java132 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in dismissNotificationAction_setsOnboarded() local
133 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in dismissNotificationAction_setsOnboarded()
135 BroadcastReceiver broadcastReceiver = captor.getValue(); in dismissNotificationAction_setsOnboarded()
153 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() local
154 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake()
156 BroadcastReceiver broadcastReceiver = captor.getValue(); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake()
177 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings() local
178 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
180 BroadcastReceiver broadcastReceiver = captor.getValue(); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
DScoringParamsTest.java327 ArgumentCaptor<ContentObserver> captor = ArgumentCaptor.forClass(ContentObserver.class);
332 .registerContentObserver(eq(mContext), any(), anyBoolean(), captor.capture());
340 captor.getValue().onChange(/*selfChange*/ false);
345 captor.getValue().onChange(/*selfChange*/ false);
351 ArgumentCaptor<ContentObserver> captor = ArgumentCaptor.forClass(ContentObserver.class);
356 .registerContentObserver(eq(mContext), any(), anyBoolean(), captor.capture());
363 captor.getValue().onChange(/*selfChange*/ false);
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ims/
DImsUtTest.java102 ArgumentCaptor<ImsUt.IImsUtListenerProxy> captor = in testClirConversionCompat() local
105 verify(mImsUtBinder).setListener(captor.capture()); in testClirConversionCompat()
106 ImsUt.IImsUtListenerProxy proxy = captor.getValue(); in testClirConversionCompat()
130 ArgumentCaptor<ImsUt.IImsUtListenerProxy> captor = in testClipConversionCompat() local
133 verify(mImsUtBinder).setListener(captor.capture()); in testClipConversionCompat()
134 ImsUt.IImsUtListenerProxy proxy = captor.getValue(); in testClipConversionCompat()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DStatusBarWindowControllerTest.java82 ArgumentCaptor<WindowManager.LayoutParams> captor = in testSetDozing_hidesSystemOverlays() local
84 verify(mWindowManager).updateViewLayout(any(), captor.capture()); in testSetDozing_hidesSystemOverlays()
85 int flag = captor.getValue().privateFlags in testSetDozing_hidesSystemOverlays()
91 verify(mWindowManager).updateViewLayout(any(), captor.capture()); in testSetDozing_hidesSystemOverlays()
92 flag = captor.getValue().privateFlags in testSetDozing_hidesSystemOverlays()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DExtensionControllerImplTest.java118 ArgumentCaptor<ConfigurationListener> captor = ArgumentCaptor.forClass( in testUiMode() local
120 verify(mConfigurationController).addCallback(captor.capture()); in testUiMode()
124 captor.getValue().onConfigChanged(c); in testUiMode()
129 captor.getValue().onConfigChanged(c); in testUiMode()
134 verify(mConfigurationController).removeCallback(eq(captor.getValue())); in testUiMode()
165 ArgumentCaptor<ConfigurationListener> captor = ArgumentCaptor.forClass( in testSortOrder() local
167 verify(mConfigurationController).addCallback(captor.capture()); in testSortOrder()
170 captor.getValue().onConfigChanged(c); in testSortOrder()
/frameworks/base/services/tests/servicestests/src/com/android/server/power/
DThermalManagerServiceTest.java177 ArgumentCaptor<Temperature> captor = ArgumentCaptor.forClass(Temperature.class); in setUp() local
179 .times(4)).notifyThrottling(captor.capture()); in setUp()
180 assertListEqualsIgnoringOrder(mFakeHal.mTemperatureList, captor.getAllValues()); in setUp()
183 captor = ArgumentCaptor.forClass(Temperature.class); in setUp()
185 .times(2)).notifyThrottling(captor.capture()); in setUp()
188 captor.getAllValues()); in setUp()
210 ArgumentCaptor<Temperature> captor = ArgumentCaptor.forClass(Temperature.class); in testRegister() local
212 .times(4)).notifyThrottling(captor.capture()); in testRegister()
213 assertListEqualsIgnoringOrder(mFakeHal.mTemperatureList, captor.getAllValues()); in testRegister()
225 captor = ArgumentCaptor.forClass(Temperature.class); in testRegister()
[all …]
/frameworks/base/tests/net/java/android/net/
DConnectivityManagerTest.java213 ArgumentCaptor<Messenger> captor = ArgumentCaptor.forClass(Messenger.class); in testCallbackRelease() local
217 any(), captor.capture(), anyInt(), any(), anyInt(), any(), nullable(String.class))) in testCallbackRelease()
222 captor.getValue().send(makeMessage(request, ConnectivityManager.CALLBACK_AVAILABLE)); in testCallbackRelease()
231 captor.getValue().send(makeMessage(request, ConnectivityManager.CALLBACK_LOSING)); in testCallbackRelease()
242 ArgumentCaptor<Messenger> captor = ArgumentCaptor.forClass(Messenger.class); in testCallbackRecycling() local
246 any(), captor.capture(), anyInt(), any(), anyInt(), any(), nullable(String.class))) in testCallbackRecycling()
251 captor.getValue().send(makeMessage(req1, ConnectivityManager.CALLBACK_AVAILABLE)); in testCallbackRecycling()
260 captor.getValue().send(makeMessage(req1, ConnectivityManager.CALLBACK_LOSING)); in testCallbackRecycling()
265 any(), captor.capture(), anyInt(), any(), anyInt(), any(), nullable(String.class))) in testCallbackRecycling()
270 captor.getValue().send(makeMessage(req2, ConnectivityManager.CALLBACK_LOST)); in testCallbackRecycling()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/
DChannelsTest.java64 ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class); in testChannelSetup() local
65 verify(mMockNotificationManager).createNotificationChannels(captor.capture()); in testChannelSetup()
66 final List<NotificationChannel> list = captor.getValue(); in testChannelSetup()
76 ArgumentCaptor<List> captor = ArgumentCaptor.forClass(List.class); in testChannelSetup_noLegacyScreenshot() local
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/logging/
DTextClassifierEventTronLoggerTest.java79 ArgumentCaptor<LogMaker> captor = ArgumentCaptor.forClass(LogMaker.class); in testWriteEvent() local
80 Mockito.verify(mMetricsLogger).write(captor.capture()); in testWriteEvent()
81 LogMaker logMaker = captor.getValue(); in testWriteEvent()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayRotationTests.java699 ArgumentCaptor<ContentObserver> captor = ArgumentCaptor.forClass( in captureObservers() local
704 captor.capture(), in captureObservers()
706 if (!captor.getAllValues().isEmpty()) { in captureObservers()
707 mShowRotationSuggestionsObserver = captor.getValue(); in captureObservers()
710 captor = ArgumentCaptor.forClass(ContentObserver.class); in captureObservers()
714 captor.capture(), in captureObservers()
716 if (!captor.getAllValues().isEmpty()) { in captureObservers()
717 mAccelerometerRotationObserver = captor.getValue(); in captureObservers()
720 captor = ArgumentCaptor.forClass(ContentObserver.class); in captureObservers()
724 captor.capture(), in captureObservers()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/android/telephony/ims/
DMmTelFeatureTests.java148 ArgumentCaptor<IImsCallSession> captor = ArgumentCaptor.forClass(IImsCallSession.class); in testNewIncomingCall() local
149 verify(mListener).onIncomingCall(captor.capture(), any()); in testNewIncomingCall()
151 assertEquals(sessionBinder, captor.getValue()); in testNewIncomingCall()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DUiAutomationManagerTest.java156 ArgumentCaptor<IBinder.DeathRecipient> captor = ArgumentCaptor.forClass( in uiAutomationBinderDiesBeforeConnecting_notifiesSystem() local
158 verify(mMockOwner).linkToDeath(captor.capture(), anyInt()); in uiAutomationBinderDiesBeforeConnecting_notifiesSystem()
159 captor.getValue().binderDied(); in uiAutomationBinderDiesBeforeConnecting_notifiesSystem()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/
DPowerNotificationWarningsTest.java123 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testShowLowBatteryNotification_BatteryChannel() local
126 captor.capture(), any()); in testShowLowBatteryNotification_BatteryChannel()
127 assertTrue(captor.getValue().getChannelId() == NotificationChannels.BATTERY); in testShowLowBatteryNotification_BatteryChannel()
/frameworks/base/tests/net/common/java/android/net/metrics/
DIpConnectivityLogTest.java127 ArgumentCaptor<ConnectivityMetricsEvent> captor = in verifyEvents() local
129 verify(mMockService, timeout(timeoutMs).times(n)).logEvent(captor.capture()); in verifyEvents()
130 return captor.getAllValues(); in verifyEvents()
/frameworks/base/core/tests/coretests/src/android/view/
DInsetsAnimationControlImplTest.java137 ArgumentCaptor<SurfaceParams> captor = ArgumentCaptor.forClass(SurfaceParams.class); in testChangeInsets() local
138 verify(mMockTransactionApplier).scheduleApply(captor.capture()); in testChangeInsets()
139 List<SurfaceParams> params = captor.getAllValues(); in testChangeInsets()
/frameworks/base/core/tests/coretests/src/com/android/internal/accessibility/
DAccessibilityShortcutControllerTest.java377 ArgumentCaptor<DialogInterface.OnClickListener> captor = in testClickingDisableButtonInDialog_shouldClearShortcutId() local
380 captor.capture()); in testClickingDisableButtonInDialog_shouldClearShortcutId()
382 captor.getValue().onClick(null, 0); in testClickingDisableButtonInDialog_shouldClearShortcutId()
394 ArgumentCaptor<DialogInterface.OnClickListener> captor = in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady() local
397 captor.capture()); in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady()
399 if (captor.getValue() != null) { in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady()
400 captor.getValue().onClick(null, 0); in testClickingLeaveOnButtonInDialog_shouldLeaveShortcutReady()

12