/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/migration/ |
D | MigrationUiStateManagerTest.java | 98 final ArgumentCaptor<MigrationStateManager.StateChangedListener> captor = in testStateChanged_idle_noNotificationSent() local 101 verify(mMigrationStateManager).addStateChangedListener(captor.capture()); in testStateChanged_idle_noNotificationSent() 102 captor.getValue().onChanged(HealthConnectDataState.MIGRATION_STATE_IDLE); in testStateChanged_idle_noNotificationSent() 111 final ArgumentCaptor<MigrationStateManager.StateChangedListener> captor = in testStateChanged_appUpdateNeeded_noMigrationUiAppUpdateNeededNotificationSent() local 114 verify(mMigrationStateManager).addStateChangedListener(captor.capture()); in testStateChanged_appUpdateNeeded_noMigrationUiAppUpdateNeededNotificationSent() 115 captor.getValue().onChanged(HealthConnectDataState.MIGRATION_STATE_APP_UPGRADE_REQUIRED); in testStateChanged_appUpdateNeeded_noMigrationUiAppUpdateNeededNotificationSent() 127 final ArgumentCaptor<MigrationStateManager.StateChangedListener> captor = in testStateChanged_moduleUpdateNeeded_migrationUiModuleUpdateNeededNotificationSent() local 130 verify(mMigrationStateManager).addStateChangedListener(captor.capture()); in testStateChanged_moduleUpdateNeeded_migrationUiModuleUpdateNeededNotificationSent() 131 captor.getValue().onChanged(HealthConnectDataState.MIGRATION_STATE_MODULE_UPGRADE_REQUIRED); in testStateChanged_moduleUpdateNeeded_migrationUiModuleUpdateNeededNotificationSent() 147 final ArgumentCaptor<MigrationStateManager.StateChangedListener> captor = in testStateChanged_allowedPaused_noMigrationUiPausedNotificationSent() local [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | CallAudioManagerTest.java | 130 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = makeNewCaptor(); in testUnmuteOfSecondIncomingCall() local 140 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); in testUnmuteOfSecondIncomingCall() 151 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall() 153 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); in testUnmuteOfSecondIncomingCall() 154 assertMessageArgEquality(correctArgs, captor.getValue()); in testUnmuteOfSecondIncomingCall() 193 ArgumentCaptor<CallAudioModeStateMachine.MessageArgs> captor = makeNewCaptor(); 202 eq(CallAudioModeStateMachine.NO_MORE_RINGING_CALLS), captor.capture()); 213 assertMessageArgEquality(correctArgs, captor.getValue()); 215 eq(CallAudioModeStateMachine.NEW_ACTIVE_OR_DIALING_CALL), captor.capture()); 216 assertMessageArgEquality(correctArgs, captor.getValue()); [all …]
|
/packages/modules/AdServices/adservices/tests/endtoends/src/com/android/adservices/measurement/ |
D | MeasurementCompatibleManagerTest.java | 127 ArgumentCaptor<RegistrationRequest> captor = in testRegisterSource_callingApp_expectedAttributionSource() local 135 doAnswer(answer).when(mockService).register(captor.capture(), any(), any()); in testRegisterSource_callingApp_expectedAttributionSource() 144 Assert.assertNotNull(captor.getValue().getAppPackageName()); in testRegisterSource_callingApp_expectedAttributionSource() 145 assertEquals(getPackageName(), captor.getValue().getAppPackageName()); in testRegisterSource_callingApp_expectedAttributionSource() 170 ArgumentCaptor<RegistrationRequest> captor = in testRegisterSource_adIdEnabled_register() local 178 doAnswer(answer).when(mockService).register(captor.capture(), any(), any()); in testRegisterSource_adIdEnabled_register() 196 assertTrue(captor.getValue().isAdIdPermissionGranted()); in testRegisterSource_adIdEnabled_register() 197 assertEquals(getPackageName(), captor.getValue().getAppPackageName()); in testRegisterSource_adIdEnabled_register() 209 ArgumentCaptor<RegistrationRequest> captor = in testRegisterSource_adIdZeroOut_register() local 217 doAnswer(answer).when(mockService).register(captor.capture(), any(), any()); in testRegisterSource_adIdZeroOut_register() [all …]
|
D | MeasurementCompatibleManagerSandboxTest.java | 135 ArgumentCaptor<RegistrationRequest> captor = in testRegisterSource_verifySamePackageAsContext() local 138 verify(mMockMeasurementService, timeout(2000)).register(captor.capture(), any(), any()); in testRegisterSource_verifySamePackageAsContext() 139 Assert.assertNotNull(captor.getValue()); in testRegisterSource_verifySamePackageAsContext() 140 Assert.assertEquals(sContext.getPackageName(), captor.getValue().getAppPackageName()); in testRegisterSource_verifySamePackageAsContext() 152 ArgumentCaptor<RegistrationRequest> captor = in testRegisterTrigger_verifySamePackageAsContext() local 155 verify(mMockMeasurementService, timeout(2000)).register(captor.capture(), any(), any()); in testRegisterTrigger_verifySamePackageAsContext() 156 Assert.assertNotNull(captor.getValue()); in testRegisterTrigger_verifySamePackageAsContext() 157 Assert.assertEquals(sContext.getPackageName(), captor.getValue().getAppPackageName()); in testRegisterTrigger_verifySamePackageAsContext() 184 ArgumentCaptor<WebSourceRegistrationRequestInternal> captor = in testRegisterWebSource_verifySamePackageAsContext() local 188 .registerWebSource(captor.capture(), any(), any()); in testRegisterWebSource_verifySamePackageAsContext() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/ |
D | AudioSharingDeviceVolumeControlUpdaterTest.java | 150 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onProfileConnectionStateChanged_leaDeviceConnected_noSharing_removesPref() local 158 verify(mDevicePreferenceCallback).onDeviceRemoved(captor.capture()); in onProfileConnectionStateChanged_leaDeviceConnected_noSharing_removesPref() 159 assertThat(captor.getValue() instanceof AudioSharingDeviceVolumePreference).isTrue(); in onProfileConnectionStateChanged_leaDeviceConnected_noSharing_removesPref() 160 assertThat(((AudioSharingDeviceVolumePreference) captor.getValue()).getCachedDevice()) in onProfileConnectionStateChanged_leaDeviceConnected_noSharing_removesPref() 169 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() local 177 verify(mDevicePreferenceCallback).onDeviceRemoved(captor.capture()); in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() 178 assertThat(captor.getValue() instanceof AudioSharingDeviceVolumePreference).isTrue(); in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() 179 assertThat(((AudioSharingDeviceVolumePreference) captor.getValue()).getCachedDevice()) in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() 189 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onProfileConnectionStateChanged_deviceIsNotInList_removesPref() local 197 verify(mDevicePreferenceCallback).onDeviceRemoved(captor.capture()); in onProfileConnectionStateChanged_deviceIsNotInList_removesPref() [all …]
|
D | AudioSharingBluetoothDeviceUpdaterTest.java | 158 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onProfileConnectionStateChanged_leaDeviceConnected_flagOff_removesPref() local 166 verify(mDevicePreferenceCallback).onDeviceRemoved(captor.capture()); in onProfileConnectionStateChanged_leaDeviceConnected_flagOff_removesPref() 167 assertThat(captor.getValue() instanceof BluetoothDevicePreference).isTrue(); in onProfileConnectionStateChanged_leaDeviceConnected_flagOff_removesPref() 168 assertThat(((BluetoothDevicePreference) captor.getValue()).getBluetoothDevice()) in onProfileConnectionStateChanged_leaDeviceConnected_flagOff_removesPref() 177 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() local 185 verify(mDevicePreferenceCallback).onDeviceRemoved(captor.capture()); in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() 186 assertThat(captor.getValue() instanceof BluetoothDevicePreference).isTrue(); in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() 187 assertThat(((BluetoothDevicePreference) captor.getValue()).getBluetoothDevice()) in onProfileConnectionStateChanged_leaDeviceConnected_noSource_removesPref() 197 ArgumentCaptor<Preference> captor = ArgumentCaptor.forClass(Preference.class); in onProfileConnectionStateChanged_deviceIsNotInList_removesPref() local 205 verify(mDevicePreferenceCallback).onDeviceRemoved(captor.capture()); in onProfileConnectionStateChanged_deviceIsNotInList_removesPref() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/safetycenter/ |
D | LockScreenSafetySourceTest.java | 147 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_whenScreenLockIsEnabled_setData() local 149 .setSafetySourceData(any(), any(), captor.capture(), any()); in setSafetySourceData_whenScreenLockIsEnabled_setData() 150 SafetySourceData safetySourceData = captor.getValue(); in setSafetySourceData_whenScreenLockIsEnabled_setData() 180 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_whenPwdQualIsNotMan_whenLockPattIsSec_setStatusLevelInfo() local 185 captor.capture(), in setSafetySourceData_whenPwdQualIsNotMan_whenLockPattIsSec_setStatusLevelInfo() 187 SafetySourceData safetySourceData = captor.getValue(); in setSafetySourceData_whenPwdQualIsNotMan_whenLockPattIsSec_setStatusLevelInfo() 205 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_whenPwdQualIsNotMan_whenLockPattIsNotSec_setStatusLevelRec() local 210 captor.capture(), in setSafetySourceData_whenPwdQualIsNotMan_whenLockPattIsNotSec_setStatusLevelRec() 212 SafetySourceData safetySourceData = captor.getValue(); in setSafetySourceData_whenPwdQualIsNotMan_whenLockPattIsNotSec_setStatusLevelRec() 230 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_whenPwdQualIsMan_whenLockPattIsSec_setStatusLevelUnsp() local [all …]
|
D | SafetySourceBroadcastReceiverTest.java | 174 ArgumentCaptor<SafetyEvent> captor = ArgumentCaptor.forClass(SafetyEvent.class); in onReceive_onRefresh_setsRefreshEvent() local 176 .setSafetySourceData(any(), any(), any(), captor.capture()); in onReceive_onRefresh_setsRefreshEvent() 178 assertThat(captor.getValue()) in onReceive_onRefresh_setsRefreshEvent() 197 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in onReceive_onRefresh_withLockscreenSourceId_setsLockscreenData() local 199 .setSafetySourceData(any(), captor.capture(), any(), any()); in onReceive_onRefresh_withLockscreenSourceId_setsLockscreenData() 201 assertThat(captor.getValue()).isEqualTo(LockScreenSafetySource.SAFETY_SOURCE_ID); in onReceive_onRefresh_withLockscreenSourceId_setsLockscreenData() 216 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in onReceive_onRefresh_withBiometricsSourceId_setsBiometricData() local 218 .setSafetySourceData(any(), captor.capture(), any(), any()); in onReceive_onRefresh_withBiometricsSourceId_setsBiometricData() 220 assertThat(captor.getValue()).isEqualTo(BiometricsSafetySource.SAFETY_SOURCE_ID); in onReceive_onRefresh_withBiometricsSourceId_setsBiometricData() 239 ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); in onReceive_onRefresh_withPrivateSpaceSourceId_setsPrivateSpaceData() local [all …]
|
D | BiometricsSafetySourceTest.java | 502 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_faceAndFingerprint_whenFaceEnrolled_setsInfoSeverity() local 507 captor.capture(), in setSafetySourceData_faceAndFingerprint_whenFaceEnrolled_setsInfoSeverity() 509 SafetySourceStatus safetySourceStatus = captor.getValue().getStatus(); in setSafetySourceData_faceAndFingerprint_whenFaceEnrolled_setsInfoSeverity() 524 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_faceAndFingerprint_whenFingerprintEnrolled_setsInfoSeverity() local 529 captor.capture(), in setSafetySourceData_faceAndFingerprint_whenFingerprintEnrolled_setsInfoSeverity() 531 SafetySourceStatus safetySourceStatus = captor.getValue().getStatus(); in setSafetySourceData_faceAndFingerprint_whenFingerprintEnrolled_setsInfoSeverity() 546 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_faceAndFingerprint_whenNotEnrolled_setsUnspSeverity() local 551 captor.capture(), in setSafetySourceData_faceAndFingerprint_whenNotEnrolled_setsUnspSeverity() 553 SafetySourceStatus safetySourceStatus = captor.getValue().getStatus(); in setSafetySourceData_faceAndFingerprint_whenNotEnrolled_setsUnspSeverity() 567 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_fingerprint_whenEnrolled_setsInfoSeverity() local [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/hal/ |
D | AudioControlWrapperAidlTest.java | 273 ArgumentCaptor<IFocusListener.Stub> captor = in requestAudioFocus_forFocusListenerWrapper_succeeds() local 276 verify(mAudioControl).registerFocusListener(captor.capture()); in requestAudioFocus_forFocusListenerWrapper_succeeds() 278 captor.getValue().requestAudioFocus(USAGE_NAME, ZONE_ID, FOCUS_GAIN); in requestAudioFocus_forFocusListenerWrapper_succeeds() 286 ArgumentCaptor<IFocusListener.Stub> captor = in requestAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() local 289 verify(mAudioControl).registerFocusListener(captor.capture()); in requestAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() 291 captor.getValue().requestAudioFocusWithMetaData(METADATA, ZONE_ID, FOCUS_GAIN); in requestAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() 299 ArgumentCaptor<IFocusListener.Stub> captor = in abandonAudioFocus_forFocusListenerWrapper_succeeds() local 302 verify(mAudioControl).registerFocusListener(captor.capture()); in abandonAudioFocus_forFocusListenerWrapper_succeeds() 304 captor.getValue().abandonAudioFocus(USAGE_NAME, ZONE_ID); in abandonAudioFocus_forFocusListenerWrapper_succeeds() 312 ArgumentCaptor<IFocusListener.Stub> captor = in abandonAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/modes/ |
D | ZenModeOtherPreferenceControllerTest.java | 96 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange_alarms() local 97 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_alarms() 98 assertThat(captor.getValue().getPolicy().getPriorityCategoryAlarms()) in testOnPreferenceChange_alarms() 100 assertThat(captor.getValue().getPolicy().getPriorityCategoryEvents()) in testOnPreferenceChange_alarms() 139 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange_media() local 140 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_media() 141 assertThat(captor.getValue().getPolicy().getPriorityCategoryMedia()) in testOnPreferenceChange_media() 143 assertThat(captor.getValue().getPolicy().getPriorityCategoryEvents()) in testOnPreferenceChange_media() 182 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange_system() local 183 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_system() [all …]
|
D | ZenModeDisplayEffectPreferenceControllerTest.java | 104 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange_grayscale() local 105 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_grayscale() 106 assertThat(captor.getValue().getRule().getDeviceEffects().shouldDisplayGrayscale()) in testOnPreferenceChange_grayscale() 151 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange_aod() local 152 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_aod() 153 assertThat(captor.getValue().getRule().getDeviceEffects().shouldSuppressAmbientDisplay()) in testOnPreferenceChange_aod() 200 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange_wallpaper() local 201 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange_wallpaper() 202 assertThat(captor.getValue().getRule().getDeviceEffects().shouldDimWallpaper()).isFalse(); in testOnPreferenceChange_wallpaper() 248 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange_darkTheme() local [all …]
|
D | ZenModeNotifVisPreferenceControllerTest.java | 156 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in updateState_checkedFalse_parentChecked() local 157 verify(mBackend).updateMode(captor.capture()); in updateState_checkedFalse_parentChecked() 158 assertThat(captor.getValue().getPolicy().getVisualEffectStatusBar()) in updateState_checkedFalse_parentChecked() 160 assertThat(captor.getValue().getPolicy().getVisualEffectNotificationList()) in updateState_checkedFalse_parentChecked() 205 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in onPreferenceChanged_checkedFalse() local 206 verify(mBackend).updateMode(captor.capture()); in onPreferenceChanged_checkedFalse() 207 assertThat(captor.getValue().getPolicy().getVisualEffectPeek()) in onPreferenceChanged_checkedFalse() 209 assertThat(captor.getValue().getPolicy().getVisualEffectNotificationList()) in onPreferenceChanged_checkedFalse() 230 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in onPreferenceChanged_checkedTrue() local 231 verify(mBackend).updateMode(captor.capture()); in onPreferenceChanged_checkedTrue() [all …]
|
D | ZenModeSetTriggerLinkPreferenceControllerTest.java | 145 ArgumentCaptor<ZenMode> captor = ArgumentCaptor.forClass(ZenMode.class); in testOnPreferenceChange() local 146 verify(mBackend).updateMode(captor.capture()); in testOnPreferenceChange() 147 assertThat(captor.getValue().getRule().isEnabled()).isTrue(); in testOnPreferenceChange() 166 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testRuleLink_calendar() local 167 verify(mPreference).setIntent(captor.capture()); in testRuleLink_calendar() 170 captor.getValue().getStringExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT)).isEqualTo( in testRuleLink_calendar() 191 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in testRuleLink_schedule() local 192 verify(mPreference).setIntent(captor.capture()); in testRuleLink_schedule() 195 captor.getValue().getStringExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT)).isEqualTo( in testRuleLink_schedule()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/ |
D | UserSettingsTest.java | 241 ArgumentCaptor<Bitmap> captor = ArgumentCaptor.forClass(Bitmap.class); in testAssignDefaultPhoto_hasDefaultUserIconSize() local 242 verify(mUserManager).setUserIcon(eq(ACTIVE_USER_ID), captor.capture()); in testAssignDefaultPhoto_hasDefaultUserIconSize() 243 Bitmap bitmap = captor.getValue(); in testAssignDefaultPhoto_hasDefaultUserIconSize() 491 ArgumentCaptor<UserPreference> captor = ArgumentCaptor.forClass(UserPreference.class); in updateUserList_shouldAddAdminUserPreference() local 492 verify(mFragment.mUserListCategory).addPreference(captor.capture()); in updateUserList_shouldAddAdminUserPreference() 493 UserPreference adminPref = captor.getValue(); in updateUserList_shouldAddAdminUserPreference() 503 ArgumentCaptor<UserPreference> captor = ArgumentCaptor.forClass(UserPreference.class); in updateUserList_existingGuest_shouldAddGuestUserPreference() local 505 .addPreference(captor.capture()); in updateUserList_existingGuest_shouldAddGuestUserPreference() 506 UserPreference guestPref = captor.getAllValues().get(0); in updateUserList_existingGuest_shouldAddGuestUserPreference() 522 ArgumentCaptor<UserPreference> captor = ArgumentCaptor.forClass(UserPreference.class); in updateUserList_existingSecondaryUser_shouldAddSecondaryUserPreference() local [all …]
|
/packages/modules/Connectivity/remoteauth/tests/unit/src/com/android/server/remoteauth/ranging/ |
D | UwbRangingSessionTest.java | 280 ArgumentCaptor<SessionInfo> captor = ArgumentCaptor.forClass(SessionInfo.class); in testStart_initiatorWithoutADFailed() local 282 .onError(captor.capture(), eq(RANGING_ERROR_FAILED_TO_START)); in testStart_initiatorWithoutADFailed() 283 assertEquals(captor.getValue().getDeviceId(), TEST_DEVICE_ID); in testStart_initiatorWithoutADFailed() 312 ArgumentCaptor<androidx.core.uwb.backend.impl.internal.RangingParameters> captor = in testStart_initiatorWithADSucceed() local 315 verify(mRangingController, times(1)).setRangingParameters(captor.capture()); in testStart_initiatorWithADSucceed() 317 captor.getValue().getUwbConfigId(), TEST_UWB_RANGING_PARAMETERS.getUwbConfigId()); in testStart_initiatorWithADSucceed() 318 assertEquals(captor.getValue().getSessionId(), SESSION_ID_UNSET); in testStart_initiatorWithADSucceed() 319 assertEquals(captor.getValue().getSubSessionId(), SESSION_ID_UNSET); in testStart_initiatorWithADSucceed() 320 assertArrayEquals(captor.getValue().getSessionKeyInfo(), TEST_DERIVED_STS_KEY); in testStart_initiatorWithADSucceed() 321 assertArrayEquals(captor.getValue().getSubSessionKeyInfo(), new byte[] {}); in testStart_initiatorWithADSucceed() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/tether/ |
D | TetherSettingsTest.java | 244 final ArgumentCaptor<BroadcastReceiver> captor = in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOn() local 246 when(mockActivity.registerReceiver(captor.capture(), any(IntentFilter.class))) in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOn() 257 final BroadcastReceiver receiver = captor.getValue(); in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOn() 275 final ArgumentCaptor<BroadcastReceiver> captor = in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOff() local 277 when(mockActivity.registerReceiver(captor.capture(), any(IntentFilter.class))) in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOff() 288 final BroadcastReceiver receiver = captor.getValue(); in testBluetoothState_updateBluetoothState_bluetoothTetheringStateOff() 334 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in onReceive_usbIsConnected_tetheringPreferenceIsEnabled() local 335 setupUsbStateComponents(tetheringPreference, captor, mockActivity); in onReceive_usbIsConnected_tetheringPreferenceIsEnabled() 337 BroadcastReceiver receiver = captor.getValue(); in onReceive_usbIsConnected_tetheringPreferenceIsEnabled() 349 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in onReceive_usbIsDisconnected_tetheringPreferenceIsDisabled() local [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/location/ |
D | AdasPrivacyPolicyDisclosurePreferenceControllerTest.java | 114 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in refreshUi_adasAppWithLocationPermission_launchLocationSettings() local 115 verify(mContext).startActivity(captor.capture()); in refreshUi_adasAppWithLocationPermission_launchLocationSettings() 117 Intent intent = captor.getValue(); in refreshUi_adasAppWithLocationPermission_launchLocationSettings() 131 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in refreshUi_adasAppWithLocationPermission_launchPrivacyPolicy() local 132 verify(mContext).startActivity(captor.capture()); in refreshUi_adasAppWithLocationPermission_launchPrivacyPolicy() 134 Intent intent = captor.getValue(); in refreshUi_adasAppWithLocationPermission_launchPrivacyPolicy() 152 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in refreshUi_privacyPolicyMissing_throwsNoException() local 153 verify(mContext, never()).startActivity(captor.capture()); in refreshUi_privacyPolicyMissing_throwsNoException() 168 ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class); in refreshUi_metaDataMissing_throwsNoException() local 169 verify(mContext, never()).startActivity(captor.capture()); in refreshUi_metaDataMissing_throwsNoException()
|
/packages/apps/Car/Launcher/docklib/tests/src/com/android/car/docklib/data/ |
D | DockProtoDataControllerTest.kt | 53 val captor = argumentCaptor<DockAppItemListMessage>() in testSaveToFile_OneItem_DataCorrect() constant 57 verify(dataSource).writeToFile(captor.capture()) in testSaveToFile_OneItem_DataCorrect() 58 assertThat(captor.allValues.size).isEqualTo(1) in testSaveToFile_OneItem_DataCorrect() 59 val dockProtoData = captor.allValues[0].dockAppItemMessageList in testSaveToFile_OneItem_DataCorrect() 73 val captor = argumentCaptor<DockAppItemListMessage>() in testSaveToFile_MultipleItems_DataCorrect() constant 77 verify(dataSource).writeToFile(captor.capture()) in testSaveToFile_MultipleItems_DataCorrect() 78 assertThat(captor.allValues.size).isEqualTo(1) in testSaveToFile_MultipleItems_DataCorrect() 79 val dockProtoData = captor.allValues[0].dockAppItemMessageList in testSaveToFile_MultipleItems_DataCorrect()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/qc/ |
D | BluetoothSwitchWorkerTest.java | 50 ArgumentCaptor<IntentFilter> captor = ArgumentCaptor.forClass(IntentFilter.class); in onSubscribe_registersReceiver() local 52 verify(mContext).registerReceiver(any(BroadcastReceiver.class), captor.capture()); in onSubscribe_registersReceiver() 53 assertThat(captor.getValue().hasAction(BluetoothAdapter.ACTION_STATE_CHANGED)).isTrue(); in onSubscribe_registersReceiver() 58 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in onUnsubscribe_unregistersReceiver() local 60 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class)); in onUnsubscribe_unregistersReceiver() 62 verify(mContext).unregisterReceiver(captor.getValue()); in onUnsubscribe_unregistersReceiver()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/p2p/ |
D | WifiP2pShellCommandTest.java | 322 ArgumentCaptor<WifiP2pConfig> captor = ArgumentCaptor.forClass(WifiP2pConfig.class); in testP2pConnect() local 323 verify(mWifiP2pManager).connect(eq(mWifiP2pChannel), captor.capture(), any()); in testP2pConnect() 324 WifiP2pConfig config = captor.getValue(); in testP2pConnect() 340 ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class); in testP2pAcceptConnection() local 341 verify(messenger).send(captor.capture()); in testP2pAcceptConnection() 342 Message m = captor.getValue(); in testP2pAcceptConnection() 354 ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class); in testP2pRejectConnection() local 355 verify(messenger).send(captor.capture()); in testP2pRejectConnection() 356 Message m = captor.getValue(); in testP2pRejectConnection() 374 ArgumentCaptor<WifiP2pConfig> captor = ArgumentCaptor.forClass(WifiP2pConfig.class); in testP2pCreateGroupWithConfig() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenModeBackendTest.java | 204 ArgumentCaptor<Policy> captor = ArgumentCaptor.forClass(Policy.class); in saveConversationSenders_importantToNone() local 206 verify(mNotificationManager).setNotificationPolicy(captor.capture(), eq(true)); in saveConversationSenders_importantToNone() 208 verify(mNotificationManager).setNotificationPolicy(captor.capture()); in saveConversationSenders_importantToNone() 217 assertEquals(expected, captor.getValue()); in saveConversationSenders_importantToNone() 232 ArgumentCaptor<Policy> captor = ArgumentCaptor.forClass(Policy.class); in saveConversationSenders_noneToAll() local 234 verify(mNotificationManager).setNotificationPolicy(captor.capture(), eq(true)); in saveConversationSenders_noneToAll() 236 verify(mNotificationManager).setNotificationPolicy(captor.capture()); in saveConversationSenders_noneToAll() 245 assertEquals(expected, captor.getValue()); in saveConversationSenders_noneToAll() 261 ArgumentCaptor<Policy> captor = ArgumentCaptor.forClass(Policy.class); in saveSenders_doesNotChangeConversations() local 263 verify(mNotificationManager).setNotificationPolicy(captor.capture(), eq(true)); in saveSenders_doesNotChangeConversations() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/privatespace/ |
D | PrivateSpaceSafetySourceTest.java | 111 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_whenFeatureDisabled_setsNullData() local 113 any(), eq(SAFETY_SOURCE_ID), captor.capture(), eq(EVENT_TYPE_DEVICE_REBOOTED)); in setSafetySourceData_whenFeatureDisabled_setsNullData() 114 SafetySourceData safetySourceData = captor.getValue(); in setSafetySourceData_whenFeatureDisabled_setsNullData() 127 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_setsEnabled() local 129 any(), eq(SAFETY_SOURCE_ID), captor.capture(), eq(EVENT_TYPE_DEVICE_REBOOTED)); in setSafetySourceData_setsEnabled() 130 SafetySourceData safetySourceData = captor.getValue(); in setSafetySourceData_setsEnabled() 144 ArgumentCaptor<SafetySourceData> captor = ArgumentCaptor.forClass(SafetySourceData.class); in setSafetySourceData_setsPsAuthenticatorIntent() local 146 any(), eq(SAFETY_SOURCE_ID), captor.capture(), eq(EVENT_TYPE_DEVICE_REBOOTED)); in setSafetySourceData_setsPsAuthenticatorIntent() 147 SafetySourceData safetySourceData = captor.getValue(); in setSafetySourceData_setsPsAuthenticatorIntent()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarAudioPowerListenerTest.java | 81 ArgumentCaptor<CarPowerPolicyFilter> captor = ArgumentCaptor.forClass( in startListeningForPolicyChanges_addsPowerPolicyListener() local 84 captor.capture(), any(ICarPowerPolicyListener.class)); in startListeningForPolicyChanges_addsPowerPolicyListener() 85 assertThat(captor.getValue().getComponents()).asList() in startListeningForPolicyChanges_addsPowerPolicyListener() 174 ArgumentCaptor<ICarPowerPolicyListener> captor = ArgumentCaptor.forClass( in stopListeningForPolicyChanges_notNullPowerService() local 176 verify(mMockCarPowerService).addPowerPolicyListener(any(), captor.capture()); in stopListeningForPolicyChanges_notNullPowerService() 180 verify(mMockCarPowerService).removePowerPolicyListener(captor.getValue()); in stopListeningForPolicyChanges_notNullPowerService() 219 ArgumentCaptor<ICarPowerPolicyListener> captor = ArgumentCaptor.forClass( in registerAndGetChangeListener() local 222 any(), captor.capture()); in registerAndGetChangeListener() 224 return captor.getValue(); in registerAndGetChangeListener()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WakeupOnboardingTest.java | 127 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in dismissNotificationAction_setsOnboarded() local 128 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in dismissNotificationAction_setsOnboarded() 130 BroadcastReceiver broadcastReceiver = captor.getValue(); in dismissNotificationAction_setsOnboarded() 148 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() local 149 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() 151 BroadcastReceiver broadcastReceiver = captor.getValue(); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake() 172 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings() local 173 verify(mContext).registerReceiver(captor.capture(), any(IntentFilter.class), any(), in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings() 175 BroadcastReceiver broadcastReceiver = captor.getValue(); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
|