/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | CallAudioManagerTest.java | 116 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = makeNewCaptor(); in testUnmuteOfSecondIncomingCall() local 126 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); in testUnmuteOfSecondIncomingCall() 137 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall() 139 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); in testUnmuteOfSecondIncomingCall() 140 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall() 179 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = makeNewCaptor(); 188 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); 199 assertMessageArgEquality(correctArgs, captor.getValue()); 201 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); 202 assertMessageArgEquality(correctArgs, captor.getValue()); [all …]
|
D | DisconnectedCallNotifierTest.java | 89 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testNotificationShownAfterEmergencyCall() local 91 captor.capture(), any(UserHandle.class)); in testNotificationShownAfterEmergencyCall() 92 Notification notification = captor.getValue(); in testNotificationShownAfterEmergencyCall() 112 ArgumentCaptor<Notification> captor = ArgumentCaptor.forClass(Notification.class); in testNotificationShownForDisconnectedEmergencyCall() local 114 captor.capture(), any(UserHandle.class)); in testNotificationShownForDisconnectedEmergencyCall() 115 Notification notification = captor.getValue(); in testNotificationShownForDisconnectedEmergencyCall()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/hal/ |
D | AudioControlWrapperAidlTest.java | 187 ArgumentCaptor<DuckingInfo[]> captor = ArgumentCaptor.forClass(DuckingInfo[].class); in onDevicesToDuckChange_callsHalWithDuckingInfo() local 188 verify(mAudioControl).onDevicesToDuckChange(captor.capture()); in onDevicesToDuckChange_callsHalWithDuckingInfo() 189 DuckingInfo[] duckingInfos = captor.getValue(); in onDevicesToDuckChange_callsHalWithDuckingInfo() 200 ArgumentCaptor<DuckingInfo[]> captor = ArgumentCaptor.forClass(DuckingInfo[].class); in onDevicesToDuckChange_convertsUsagesToXsdStrings() local 201 verify(mAudioControl).onDevicesToDuckChange(captor.capture()); in onDevicesToDuckChange_convertsUsagesToXsdStrings() 202 DuckingInfo duckingInfo = captor.getValue()[0]; in onDevicesToDuckChange_convertsUsagesToXsdStrings() 217 ArgumentCaptor<DuckingInfo[]> captor = ArgumentCaptor.forClass(DuckingInfo[].class); in onDevicesToDuckChange_passesAlongAddressesToDuck() local 218 verify(mAudioControl).onDevicesToDuckChange(captor.capture()); in onDevicesToDuckChange_passesAlongAddressesToDuck() 219 DuckingInfo duckingInfo = captor.getValue()[0]; in onDevicesToDuckChange_passesAlongAddressesToDuck() 233 ArgumentCaptor<DuckingInfo[]> captor = ArgumentCaptor.forClass(DuckingInfo[].class); in onDevicesToDuckChange_passesAlongAddressesToUnduck() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | AdvancedPowerUsageDetailTest.java | 197 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in setUp() local 200 mBundle = captor.getValue().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS); in setUp() 204 doAnswer(callable).when(mActivity).startActivityAsUser(captor.capture(), in setUp() 206 doAnswer(callable).when(mActivity).startActivity(captor.capture()); in setUp() 293 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testInitHeader_noUsageTimeAndGraphDisabled_hasCorrectSummary() local 294 verify(mEntityHeaderController).setSummary(captor.capture()); in testInitHeader_noUsageTimeAndGraphDisabled_hasCorrectSummary() 295 assertThat(captor.getValue().toString()) in testInitHeader_noUsageTimeAndGraphDisabled_hasCorrectSummary() 313 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testInitHeader_bgTwoMinFgZeroAndGraphDisabled_hasCorrectSummary() local 314 verify(mEntityHeaderController).setSummary(captor.capture()); in testInitHeader_bgTwoMinFgZeroAndGraphDisabled_hasCorrectSummary() 315 assertThat(captor.getValue().toString()) in testInitHeader_bgTwoMinFgZeroAndGraphDisabled_hasCorrectSummary() [all …]
|
D | BatteryChartPreferenceControllerTest.java | 517 final ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in testOnExpand_expandedIsTrue_addSystemEntriesToPreferenceGroup() local 518 verify(mAppListGroup).addPreference(captor.capture()); in testOnExpand_expandedIsTrue_addSystemEntriesToPreferenceGroup() 520 assertThat(captor.getValue().getKey()).isEqualTo(PREF_KEY); in testOnExpand_expandedIsTrue_addSystemEntriesToPreferenceGroup() 578 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testRefreshCategoryTitle_setHourIntoBothTitleTextView() local 581 .setTitle(captor.capture()); in testRefreshCategoryTitle_setHourIntoBothTitleTextView() 582 assertThat(captor.getValue()).isEqualTo("App usage for 4 - 7"); in testRefreshCategoryTitle_setHourIntoBothTitleTextView() 584 captor = ArgumentCaptor.forClass(String.class); in testRefreshCategoryTitle_setHourIntoBothTitleTextView() 586 .setTitle(captor.capture()); in testRefreshCategoryTitle_setHourIntoBothTitleTextView() 587 assertThat(captor.getValue()).isEqualTo("System usage for 4 - 7"); in testRefreshCategoryTitle_setHourIntoBothTitleTextView() 603 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testRefreshCategoryTitle_setLast24HrIntoBothTitleTextView() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/ |
D | UserSettingsTest.java | 347 ArgumentCaptor<RestrictedLockUtils.EnforcedAdmin> captor = ArgumentCaptor.forClass( in updateUserList_addUserDisallowedByAdmin_shouldShowDisabledAddUser() local 349 verify(mAddUserPreference).setDisabledByAdmin(captor.capture()); in updateUserList_addUserDisallowedByAdmin_shouldShowDisabledAddUser() 350 assertThat(captor.getValue()).isEqualTo(enforcedAdmin); in updateUserList_addUserDisallowedByAdmin_shouldShowDisabledAddUser() 419 ArgumentCaptor<UserPreference> captor = ArgumentCaptor.forClass(UserPreference.class); in updateUserList_shouldAddAdminUserPreference() local 420 verify(mFragment.mUserListCategory).addPreference(captor.capture()); in updateUserList_shouldAddAdminUserPreference() 421 UserPreference adminPref = captor.getValue(); in updateUserList_shouldAddAdminUserPreference() 431 ArgumentCaptor<UserPreference> captor = ArgumentCaptor.forClass(UserPreference.class); in updateUserList_existingGuest_shouldAddGuestUserPreference() local 433 .addPreference(captor.capture()); in updateUserList_existingGuest_shouldAddGuestUserPreference() 434 UserPreference guestPref = captor.getAllValues().get(1); in updateUserList_existingGuest_shouldAddGuestUserPreference() 450 ArgumentCaptor<UserPreference> captor = ArgumentCaptor.forClass(UserPreference.class); in updateUserList_existingSecondaryUser_shouldAddSecondaryUserPreference() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/ |
D | DataUsageSummaryPreferenceControllerTest.java | 181 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_onePlan_basic() local 182 verify(mSummaryPreference).setLimitInfo(captor.capture()); in testSummaryUpdate_onePlan_basic() 183 CharSequence value = captor.getValue(); in testSummaryUpdate_onePlan_basic() 207 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_noPlan_basic() local 208 verify(mSummaryPreference).setLimitInfo(captor.capture()); in testSummaryUpdate_noPlan_basic() 209 CharSequence value = captor.getValue(); in testSummaryUpdate_noPlan_basic() 234 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_noCarrier_basic() local 235 verify(mSummaryPreference).setLimitInfo(captor.capture()); in testSummaryUpdate_noCarrier_basic() 236 CharSequence value = captor.getValue(); in testSummaryUpdate_noCarrier_basic() 262 ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class); in testSummaryUpdate_noPlanData_basic() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/ |
D | TetherSettingsTest.java | 198 final ArgumentCaptor<BroadcastReceiver> captor = in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOn() local 200 when(mockActivity.registerReceiver(captor.capture(), any(IntentFilter.class))) in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOn() 211 final BroadcastReceiver receiver = captor.getValue(); in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOn() 231 final ArgumentCaptor<BroadcastReceiver> captor = in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOff() local 233 when(mockActivity.registerReceiver(captor.capture(), any(IntentFilter.class))) in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOff() 244 final BroadcastReceiver receiver = captor.getValue(); in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOff() 294 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in onReceive_usbIsConnected_tetheringPreferenceIsEnabled() local 295 setupUsbStateComponents(tetheringPreference, captor, mockActivity); in onReceive_usbIsConnected_tetheringPreferenceIsEnabled() 297 BroadcastReceiver receiver = captor.getValue(); in onReceive_usbIsConnected_tetheringPreferenceIsEnabled() 309 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in onReceive_usbIsDisconnected_tetheringPreferenceIsDisabled() local [all …]
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WakeupOnboardingTest.java | 126 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in dismissNotificationAction_setsOnboarded() local 127 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in dismissNotificationAction_setsOnboarded() 129 BroadcastReceiver broadcastReceiver = captor.getValue(); in dismissNotificationAction_setsOnboarded() 147 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() local 148 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() 150 BroadcastReceiver broadcastReceiver = captor.getValue(); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() 171 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings() local 172 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings() 174 BroadcastReceiver broadcastReceiver = captor.getValue(); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
|
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/contact/ |
D | ContactListViewHolderTest.java | 204 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testClickCallActionButton_ContactHasOneNumber_placeCall() local 205 verify(mMockUiCallManager).placeCall(captor.capture()); in testClickCallActionButton_ContactHasOneNumber_placeCall() 206 assertThat(captor.getValue()).isEqualTo(PHONE_NUMBER_1); in testClickCallActionButton_ContactHasOneNumber_placeCall() 244 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber() local 245 verify(mMockUiCallManager).placeCall(captor.capture()); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber() 246 assertThat(captor.getValue()).isEqualTo(PHONE_NUMBER_2); in testClickCallActionButton_HasMultipleNumbersAndPrimaryNumber_callPrimaryNumber() 260 ArgumentCaptor<Contact> captor = ArgumentCaptor.forClass(Contact.class); in testClickShowContactDetailView_hasContactDetail_showContactDetail() local 261 verify(mMockListener).onItemClicked(captor.capture()); in testClickShowContactDetailView_hasContactDetail_showContactDetail() 262 assertThat(captor.getValue()).isEqualTo(mMockContact); in testClickShowContactDetailView_hasContactDetail_showContactDetail() 287 ArgumentCaptor<Contact> captor = ArgumentCaptor.forClass(Contact.class); in testClickShowContactDetailView_hasAddressButNoPhoneNumber_dependOnConfig() local [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/wifi/ |
D | WifiTetherPreferenceControllerTest.java | 118 ArgumentCaptor<TetheringManager.TetheringEventCallback> captor = in onTetheringSupported_false_isUnsupportedOnDevice() local 121 any(Executor.class), captor.capture()); in onTetheringSupported_false_isUnsupportedOnDevice() 123 captor.getValue().onTetheringSupported(false); in onTetheringSupported_false_isUnsupportedOnDevice() 134 ArgumentCaptor<TetheringManager.TetheringEventCallback> captor = in onTetheringSupported_true_isAvailable() local 137 any(Executor.class), captor.capture()); in onTetheringSupported_true_isAvailable() 138 captor.getValue().onTetheringSupported(false); in onTetheringSupported_true_isAvailable() 140 captor.getValue().onTetheringSupported(true); in onTetheringSupported_true_isAvailable()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/telephony/ |
D | CarrierPreferenceControllerTest.java | 134 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityFound_openCarrierSettingActivity() local 135 doNothing().when(mContext).startActivity(captor.capture()); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 139 verify(mContext).startActivity(captor.capture()); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 140 final Intent intent = captor.getValue(); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 158 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityNotFound_DoNothing() local 159 verify(mContext, never()).startActivity(captor.capture()); in handlePreferenceClick_activityNotFound_DoNothing() 172 final ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in handlePreferenceClick_activityNotConfigured_DoNothing() local 173 verify(mContext, never()).startActivity(captor.capture()); in handlePreferenceClick_activityNotConfigured_DoNothing()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | WifiConnectionPreferenceControllerTest.java | 115 final ArgumentCaptor<WifiEntryPreference> captor = ArgumentCaptor.forClass( in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved() local 117 verify(mPreferenceCategory).addPreference(captor.capture()); in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved() 118 final WifiEntryPreference pref = captor.getValue(); in onConnectedChanged_wifiBecameDisconnected_preferenceRemoved() 137 final ArgumentCaptor<WifiEntryPreference> captor = ArgumentCaptor.forClass( in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced() local 146 verify(mPreferenceCategory, times(2)).addPreference(captor.capture()); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced() 147 final WifiEntryPreference pref1 = captor.getAllValues().get(0); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced() 148 final WifiEntryPreference pref2 = captor.getAllValues().get(1); in onAccessPointsChanged_wifiBecameConnectedToDifferentAP_preferenceReplaced()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/autofill/ |
D | AutofillPickerFragmentTest.java | 85 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in selectedService() local 86 verify(mPreferenceScreen, times(1)).addPreference(captor.capture()); in selectedService() 87 RadioPreference pref = (RadioPreference) captor.getValue(); in selectedService() 100 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in selectedNone() local 101 verify(mPreferenceScreen, times(1)).addPreference(captor.capture()); in selectedNone() 102 RadioPreference pref = (RadioPreference) captor.getValue(); in selectedNone()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dream/ |
D | CurrentDreamPreferenceControllerTest.java | 86 ArgumentCaptor<GearPreference.OnGearClickListener> captor = in gearShowsIfActiveDreamInfoHasOptions() local 91 verify(mockPref).setOnGearClickListener(captor.capture()); in gearShowsIfActiveDreamInfoHasOptions() 92 captor.getAllValues().forEach(listener -> assertThat(listener).isNotNull()); in gearShowsIfActiveDreamInfoHasOptions() 103 ArgumentCaptor<GearPreference.OnGearClickListener> captor = in gearHidesIfActiveDreamInfoHasNoOptions() local 108 verify(mockPref).setOnGearClickListener(captor.capture()); in gearHidesIfActiveDreamInfoHasNoOptions() 109 captor.getAllValues().forEach(listener -> assertThat(listener).isNull()); in gearHidesIfActiveDreamInfoHasNoOptions()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenModeBackendTest.java | 206 ArgumentCaptor<Policy> captor = ArgumentCaptor.forClass(Policy.class); in saveConversationSenders_importantToNone() local 207 verify(mNotificationManager, times(1)).setNotificationPolicy(captor.capture()); in saveConversationSenders_importantToNone() 215 assertEquals(expected, captor.getValue()); in saveConversationSenders_importantToNone() 230 ArgumentCaptor<Policy> captor = ArgumentCaptor.forClass(Policy.class); in saveConversationSenders_noneToAll() local 231 verify(mNotificationManager, times(1)).setNotificationPolicy(captor.capture()); in saveConversationSenders_noneToAll() 239 assertEquals(expected, captor.getValue()); in saveConversationSenders_noneToAll() 255 ArgumentCaptor<Policy> captor = ArgumentCaptor.forClass(Policy.class); in saveSenders_doesNotChangeConversations() local 256 verify(mNotificationManager, times(1)).setNotificationPolicy(captor.capture()); in saveSenders_doesNotChangeConversations() 264 assertEquals(expected, captor.getValue()); in saveSenders_doesNotChangeConversations()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/datetime/ |
D | AutoTimeZoneTogglePreferenceControllerTest.java | 94 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testOnPreferenceChange_autoTimeZoneSet_shouldSendIntent() local 95 verify(mContext, times(1)).sendBroadcast(captor.capture()); in testOnPreferenceChange_autoTimeZoneSet_shouldSendIntent() 96 List<Intent> intentsFired = captor.getAllValues(); in testOnPreferenceChange_autoTimeZoneSet_shouldSendIntent() 107 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testOnPreferenceChange_autoTimeZoneUnset_shouldSendIntent() local 108 verify(mContext, times(1)).sendBroadcast(captor.capture()); in testOnPreferenceChange_autoTimeZoneUnset_shouldSendIntent() 109 List<Intent> intentsFired = captor.getAllValues(); in testOnPreferenceChange_autoTimeZoneUnset_shouldSendIntent()
|
D | AutoDatetimeTogglePreferenceControllerTest.java | 94 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testOnPreferenceChange_autoTimeZoneSet_shouldSendIntent() local 95 verify(mContext, times(1)).sendBroadcast(captor.capture()); in testOnPreferenceChange_autoTimeZoneSet_shouldSendIntent() 96 List<Intent> intentsFired = captor.getAllValues(); in testOnPreferenceChange_autoTimeZoneSet_shouldSendIntent() 107 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testOnPreferenceChange_autoTimeZoneUnset_shouldSendIntent() local 108 verify(mContext, times(1)).sendBroadcast(captor.capture()); in testOnPreferenceChange_autoTimeZoneUnset_shouldSendIntent() 109 List<Intent> intentsFired = captor.getAllValues(); in testOnPreferenceChange_autoTimeZoneUnset_shouldSendIntent()
|
D | TimeFormatTogglePreferenceControllerTest.java | 97 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testOnPreferenceChange_24HourSet_shouldSendIntent() local 98 verify(mContext, times(1)).sendBroadcast(captor.capture()); in testOnPreferenceChange_24HourSet_shouldSendIntent() 99 List<Intent> intentsFired = captor.getAllValues(); in testOnPreferenceChange_24HourSet_shouldSendIntent() 112 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testOnPreferenceChange_12HourSet_shouldSendIntent() local 113 verify(mContext, times(1)).sendBroadcast(captor.capture()); in testOnPreferenceChange_12HourSet_shouldSendIntent() 114 List<Intent> intentsFired = captor.getAllValues(); in testOnPreferenceChange_12HourSet_shouldSendIntent()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ |
D | BridgedAppsPreferenceControllerTest.java | 188 ArgumentCaptor<NotificationListenerFilter> captor = in onPreferenceChange_false() local 190 verify(mNm).setListenerFilter(eq(mCn), eq(0), captor.capture()); in onPreferenceChange_false() 191 assertThat(captor.getValue().getDisallowedPackages()).contains( in onPreferenceChange_false() 193 assertThat(captor.getValue().getDisallowedPackages()).contains( in onPreferenceChange_false() 214 ArgumentCaptor<NotificationListenerFilter> captor = in onPreferenceChange_true() local 216 verify(mNm).setListenerFilter(eq(mCn), eq(0), captor.capture()); in onPreferenceChange_true() 217 assertThat(captor.getValue().getDisallowedPackages().size()).isEqualTo(1); in onPreferenceChange_true() 218 assertThat(captor.getValue().getDisallowedPackages()).contains( in onPreferenceChange_true()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarAudioPowerListenerTest.java | 80 ArgumentCaptor<CarPowerPolicyFilter> captor = ArgumentCaptor.forClass( in startListeningForPolicyChanges_addsPowerPolicyListener() local 83 captor.capture(), any(ICarPowerPolicyListener.class)); in startListeningForPolicyChanges_addsPowerPolicyListener() 84 assertThat(captor.getValue().getComponents()).asList() in startListeningForPolicyChanges_addsPowerPolicyListener() 180 ArgumentCaptor<ICarPowerPolicyListener> captor = ArgumentCaptor.forClass( in registerAndGetChangeListener() local 183 any(), captor.capture()); in registerAndGetChangeListener() 185 return captor.getValue(); in registerAndGetChangeListener()
|
D | CarZonesAudioFocusUnitTest.java | 186 ArgumentCaptor<SparseArray<List<AudioFocusInfo>>> captor = in onAudioFocusRequest_withFocusCallback_callsOnFocusChange() local 189 .onFocusChange(eq(new int[]{PRIMARY_ZONE_ID}), captor.capture()); in onAudioFocusRequest_withFocusCallback_callsOnFocusChange() 190 SparseArray<List<AudioFocusInfo>> results = captor.getValue(); in onAudioFocusRequest_withFocusCallback_callsOnFocusChange() 225 ArgumentCaptor<SparseArray<List<AudioFocusInfo>>> captor = in setRestrictFocus_notifiesFocusCallbackForAllZones() local 228 verify(mMockCarFocusCallback).onFocusChange(eq(expectedZoneIds), captor.capture()); in setRestrictFocus_notifiesFocusCallbackForAllZones() 230 .that(captor.getValue().size()).isEqualTo(2); in setRestrictFocus_notifiesFocusCallbackForAllZones()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/location/ |
D | LocationServicesPreferenceControllerTest.java | 95 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass( in onStart_registersBroadcastReceiver() local 97 verify(mContext).registerReceiver(captor.capture(), any()); in onStart_registersBroadcastReceiver() 99 captor.getValue().onReceive(mContext, new Intent()); in onStart_registersBroadcastReceiver() 107 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass( in onStop_unregistersBroadcastReceiver() local 109 verify(mContext).registerReceiver(captor.capture(), any()); in onStop_unregistersBroadcastReceiver() 112 verify(mContext).unregisterReceiver(captor.getValue()); in onStop_unregistersBroadcastReceiver()
|
/packages/modules/Connectivity/tests/unit/java/android/net/ |
D | ConnectivityManagerTest.java | 225 ArgumentCaptor<Messenger> captor = ArgumentCaptor.forClass(Messenger.class); in testCallbackRelease() local 228 when(mService.requestNetwork(anyInt(), any(), anyInt(), captor.capture(), anyInt(), any(), in testCallbackRelease() 233 captor.getValue().send(makeMessage(request, ConnectivityManager.CALLBACK_AVAILABLE)); in testCallbackRelease() 242 captor.getValue().send(makeMessage(request, ConnectivityManager.CALLBACK_LOSING)); in testCallbackRelease() 254 ArgumentCaptor<Messenger> captor = ArgumentCaptor.forClass(Messenger.class); in testCallbackRecycling() local 257 when(mService.requestNetwork(anyInt(), any(), anyInt(), captor.capture(), anyInt(), any(), in testCallbackRecycling() 262 captor.getValue().send(makeMessage(req1, ConnectivityManager.CALLBACK_AVAILABLE)); in testCallbackRecycling() 271 captor.getValue().send(makeMessage(req1, ConnectivityManager.CALLBACK_LOSING)); in testCallbackRecycling() 275 when(mService.requestNetwork(anyInt(), any(), anyInt(), captor.capture(), anyInt(), any(), in testCallbackRecycling() 280 captor.getValue().send(makeMessage(req2, ConnectivityManager.CALLBACK_LOST)); in testCallbackRecycling()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothEnablerTest.java | 210 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in bluetoothTurnsOff_switchTurnsOff() local 211 when(mContext.registerReceiver(captor.capture(), any(IntentFilter.class))).thenReturn(null); in bluetoothTurnsOff_switchTurnsOff() 219 BroadcastReceiver receiver = captor.getValue(); in bluetoothTurnsOff_switchTurnsOff() 234 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in bluetoothTurnsOn_switchTurnsOn() local 235 when(mContext.registerReceiver(captor.capture(), any(IntentFilter.class))).thenReturn(null); in bluetoothTurnsOn_switchTurnsOn() 242 BroadcastReceiver receiver = captor.getValue(); in bluetoothTurnsOn_switchTurnsOn()
|