/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/hal/ |
D | HalAudioFocusTest.java | 80 private static final int ZONE_ID = 0; field in HalAudioFocusTest 141 mHalAudioFocus.requestAudioFocus(METADATA_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_notifiesHalOfFocusChange() 143 verify(mAudioControlWrapper).onAudioFocusChange(METADATA_MEDIA, ZONE_ID, in requestAudioFocus_notifiesHalOfFocusChange() 146 .that(getCarAudioPlaybackMonitorAttributes(ZONE_ID)) in requestAudioFocus_notifiesHalOfFocusChange() 154 mHalAudioFocus.requestAudioFocus(METADATA_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_specifiesUsage() 164 mHalAudioFocus.requestAudioFocus(METADATA_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_specifiesFocusGain() 174 mHalAudioFocus.requestAudioFocus(METADATA_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_specifiesZoneId() 179 ZONE_ID); in requestAudioFocus_specifiesZoneId() 186 mHalAudioFocus.requestAudioFocus(METADATA_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_providesFocusChangeListener() 195 mHalAudioFocus.requestAudioFocus(METADATA_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_withFocusRequestDelayed() [all …]
|
D | AudioControlWrapperV2Test.java | 62 private static final int ZONE_ID = 2; field in AudioControlWrapperV2Test 160 captor.getValue().requestAudioFocus(USAGE, ZONE_ID, FOCUS_GAIN); in requestAudioFocus_forFocusListenerWrapper_succeeds() 162 verify(mockListener).requestAudioFocus(METADATA, ZONE_ID, FOCUS_GAIN); in requestAudioFocus_forFocusListenerWrapper_succeeds() 173 captor.getValue().abandonAudioFocus(USAGE, ZONE_ID); in abandonAudioFocus_forFocusListenerWrapper_succeeds() 175 verify(mockListener).abandonAudioFocus(METADATA, ZONE_ID); in abandonAudioFocus_forFocusListenerWrapper_succeeds() 180 mAudioControlWrapperV2.onAudioFocusChange(METADATA, ZONE_ID, FOCUS_GAIN); in onAudioFocusChange_succeeds() 182 verify(mAudioControlV2).onAudioFocusChange(USAGE, ZONE_ID, FOCUS_GAIN); in onAudioFocusChange_succeeds() 191 () -> mAudioControlWrapperV2.onAudioFocusChange(METADATA, ZONE_ID, FOCUS_GAIN)); in onAudioFocusChange_throws()
|
D | AudioControlWrapperAidlTest.java | 101 private static final int ZONE_ID = 2; field in AudioControlWrapperAidlTest 278 captor.getValue().requestAudioFocus(USAGE_NAME, ZONE_ID, FOCUS_GAIN); in requestAudioFocus_forFocusListenerWrapper_succeeds() 280 verify(mockListener).requestAudioFocus(METADATA, ZONE_ID, FOCUS_GAIN); in requestAudioFocus_forFocusListenerWrapper_succeeds() 291 captor.getValue().requestAudioFocusWithMetaData(METADATA, ZONE_ID, FOCUS_GAIN); in requestAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() 293 verify(mockListener).requestAudioFocus(METADATA, ZONE_ID, FOCUS_GAIN); in requestAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() 304 captor.getValue().abandonAudioFocus(USAGE_NAME, ZONE_ID); in abandonAudioFocus_forFocusListenerWrapper_succeeds() 306 verify(mockListener).abandonAudioFocus(METADATA, ZONE_ID); in abandonAudioFocus_forFocusListenerWrapper_succeeds() 317 captor.getValue().abandonAudioFocusWithMetaData(METADATA, ZONE_ID); in abandonAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() 319 verify(mockListener).abandonAudioFocus(METADATA, ZONE_ID); in abandonAudioFocusWithMetaData_forFocusListenerWrapper_succeeds() 324 mAudioControlWrapperAidl.onAudioFocusChange(METADATA, ZONE_ID, FOCUS_GAIN); in onAudioFocusChange_succeeds() [all …]
|
D | AudioControlWrapperV1Test.java | 59 private static final int ZONE_ID = 2; field in AudioControlWrapperV1Test 151 () -> mAudioControlWrapperV1.onAudioFocusChange(METADATA, ZONE_ID, FOCUS_GAIN)); in onAudioFocusChange_throws()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarVolumeCallbackHandlerTest.java | 34 private static final int ZONE_ID = 2; field in CarVolumeCallbackHandlerTest 61 mHandler.onVolumeGroupChange(ZONE_ID, GROUP_ID, FLAGS); in onVolumeGroupChange_callsAllRegisteredCallbacks() 67 .that(mCallback1.mZoneId).isEqualTo(ZONE_ID); in onVolumeGroupChange_callsAllRegisteredCallbacks() 77 .that(mCallback2.mZoneId).isEqualTo(ZONE_ID); in onVolumeGroupChange_callsAllRegisteredCallbacks() 88 mHandler.onVolumeGroupChange(ZONE_ID, GROUP_ID, FLAGS); in onVolumeGroupChange_doesNotCallUnregisteredCallbacks() 102 mHandler.onVolumeGroupChange(ZONE_ID, GROUP_ID, FLAGS); in onVolumeGroupChange_doesNotCallDeprioritizedCallback() 118 mHandler.onVolumeGroupChange(ZONE_ID, GROUP_ID, FLAGS); in onVolumeGroupChange_callReprioritizedCallback() 128 mHandler.onVolumeGroupChange(ZONE_ID, GROUP_ID, FLAGS); in onVolumeGroupChange_doesNotCallThrows() 140 mHandler.onGroupMuteChange(ZONE_ID, GROUP_ID, FLAGS); in onGroupMuteChange_callsAllRegisteredCallbacks() 154 mHandler.onGroupMuteChange(ZONE_ID, GROUP_ID, FLAGS); in onGroupMuteChanged_doesNotCallUnregisteredCallbacks() [all …]
|
D | CarDuckingInfoTest.java | 40 private static final int ZONE_ID = 0; field in CarDuckingInfoTest 55 ZONE_ID, in constructor_nullAddressesToDuck_throws() 67 ZONE_ID, in constructor_nullAddressesToUnduck_throws() 77 () -> new CarDuckingInfo(ZONE_ID, ADDRESSES_TO_DUCK, ADDRESSES_TO_UNDUCK, null)); in constructor_nullPlaybackMetadataHoldingFocus_throws() 84 assertThat(duckingInfo.mZoneId).isEqualTo(ZONE_ID); in constructor_validInputs_succeeds() 90 assertThat(duckingInfo.getZoneId()).isEqualTo(ZONE_ID); in constructor_validInputs_succeeds() 142 ZONE_ID, in getCarDuckingInfo()
|
D | CarVolumeGroupFactoryTest.java | 38 private static final int ZONE_ID = 0; field in CarVolumeGroupFactoryTest 248 when(mSettingsMock.getStoredVolumeGainIndexForUser(UserHandle.USER_CURRENT, ZONE_ID, in factoryBuild_withNoStoredGain_usesDefaultGain() 261 when(mSettingsMock.getStoredVolumeGainIndexForUser(UserHandle.USER_CURRENT, ZONE_ID, in factoryBuild_withTooLargeStoredGain_usesDefaultGain() 273 when(mSettingsMock.getStoredVolumeGainIndexForUser(UserHandle.USER_CURRENT, ZONE_ID, in factoryBuild_withTooSmallStoredGain_usesDefaultGain() 285 when(mSettingsMock.getStoredVolumeGainIndexForUser(UserHandle.USER_CURRENT, ZONE_ID, in factoryBuild_withValidStoredGain_usesStoredGain() 298 /* carAudioSettings= */ null, TEST_CAR_AUDIO_CONTEXT, ZONE_ID, in factoryConstructor_withNullCarAudioSettings_fails() 311 /* carAudioContext= */ null, ZONE_ID, CONFIG_ID, GROUP_ID, in factoryConstructor_withNullCarAudioContext_fails() 324 TEST_CAR_AUDIO_CONTEXT, ZONE_ID, CONFIG_ID, GROUP_ID, GROUP_NAME, in factoryConstructor_withNullCarActivationVolumeConfig_fails() 333 ZONE_ID, CONFIG_ID, GROUP_ID, GROUP_NAME, /* useCarVolumeGroupMute= */ true, in getFactory()
|
D | CarVolumeGroupUnitTest.java | 74 private static final int ZONE_ID = 0; field in CarVolumeGroupUnitTest 214 musicGain.zoneId = ZONE_ID; in setMuted_whenHalMuted_onActivation_returnsTrue() 230 musicGain.zoneId = ZONE_ID; in setMuted_whenHalMuted_onDeactivation_returnsFalse() 269 CarAudioSettings settings = new SettingsBuilder(ZONE_ID, CONFIG_ID, GROUP_ID) in setMute_withMutedState_storesValueToSetting() 276 verify(settings).storeVolumeGroupMuteForUser(TEST_USER_10, ZONE_ID, CONFIG_ID, GROUP_ID, in setMute_withMutedState_storesValueToSetting() 282 CarAudioSettings settings = new SettingsBuilder(ZONE_ID, CONFIG_ID, GROUP_ID) in setMute_withUnMutedState_storesValueToSetting() 289 verify(settings).storeVolumeGroupMuteForUser(TEST_USER_10, ZONE_ID, CONFIG_ID, GROUP_ID, in setMute_withUnMutedState_storesValueToSetting() 362 musicGain.zoneId = ZONE_ID; in isHalMuted_withHalMuted() 389 musicGain.zoneId = ZONE_ID; in getMutedBySystem_withHalMuted() 477 CarAudioSettings settings = new SettingsBuilder(ZONE_ID, CONFIG_ID, GROUP_ID) in setCurrentGainIndex_setsCurrentGainIndexForUser() [all …]
|
D | CarDuckingUtilsTest.java | 71 private static final int ZONE_ID = 0; field in CarDuckingUtilsTest 145 assertThat(duckingInfo.getZoneId()).isEqualTo(ZONE_ID); in generateDuckingInfo_succeed() 163 assertThat(duckingInfo1.getZoneId()).isEqualTo(ZONE_ID); in generateDuckingInfo_succeed() 179 assertThat(duckingInfo2.getZoneId()).isEqualTo(ZONE_ID); in generateDuckingInfo_succeed() 192 assertThat(duckingInfo3.getZoneId()).isEqualTo(ZONE_ID); in generateDuckingInfo_succeed() 233 ZONE_ID, in getEmptyCarDuckingInfo()
|
D | CarAudioVolumeGroupTest.java | 80 private static final int ZONE_ID = 0; field in CarAudioVolumeGroupTest 209 verify(mSettingsMock).storeVolumeGainIndexForUser(anyInt(), eq(ZONE_ID), eq(ZONE_CONFIG_ID), in setCurrentGainIndex_updatesCurrentGainIndex() 215 CarAudioSettings settings = new SettingsBuilder(ZONE_ID, ZONE_CONFIG_ID, GROUP_ID) in setCurrentGainIndex_setsCurrentGainIndexForUser() 222 verify(settings).storeVolumeGainIndexForUser(TEST_USER_11, ZONE_ID, ZONE_CONFIG_ID, in setCurrentGainIndex_setsCurrentGainIndexForUser() 228 CarAudioSettings settings = new SettingsBuilder(ZONE_ID, ZONE_CONFIG_ID, GROUP_ID) in setCurrentGainIndex_setsCurrentGainIndexForDefaultUser() 235 .storeVolumeGainIndexForUser(UserHandle.USER_CURRENT, ZONE_ID, ZONE_CONFIG_ID, in setCurrentGainIndex_setsCurrentGainIndexForDefaultUser() 439 musicGain.zoneId = ZONE_ID; in calculateNewGainStageFromDeviceInfos_whenBlockingActive_extrapolationSucceeds() 473 musicGain.zoneId = ZONE_ID; in calculateNewGainStageFromDeviceInfos_whenLimitingActive_extrapolationSucceeds() 509 musicGain.zoneId = ZONE_ID; in calculateNewGainStageFromDeviceInfos_whenAttenuationActive_extrapolationSucceeds() 542 musicGain.zoneId = ZONE_ID; in calculateNewGainStageFromDeviceInfos_whenRestrictionsActive_extrapolationFails() [all …]
|
D | CarHalAudioUtilsTest.java | 63 private static final int ZONE_ID = 0; field in CarHalAudioUtilsTest 124 .that(duckingInfo.zoneId).isEqualTo(ZONE_ID); in generateDuckingInfo_succeeds() 422 ZONE_ID, in getCarDuckingInfo() 430 when(zone.getId()).thenReturn(ZONE_ID); in generateZoneMock()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/sound/ |
D | VolumeSettingsPreferenceControllerTest.java | 83 private static final int ZONE_ID = PRIMARY_AUDIO_ZONE; field in VolumeSettingsPreferenceControllerTest 181 when(mCarAudioManager.getVolumeGroupCount(ZONE_ID)).thenReturn(1); in setUp() 182 when(mCarAudioManager.getUsagesForVolumeGroupId(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_0)) in setUp() 185 when(mCarAudioManager.getGroupMinVolume(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_0)) in setUp() 187 when(mCarAudioManager.getGroupVolume(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_0)) in setUp() 189 when(mCarAudioManager.getGroupMaxVolume(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_0)) in setUp() 191 when(mCarAudioManager.isVolumeGroupMuted(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_0)) in setUp() 199 when(mCarAudioManager.isPlaybackOnVolumeGroupActive(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_0)) in setUp() 201 when(mCarAudioManager.getVolumeGroupInfo(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_0)) in setUp() 204 when(mCarAudioManager.getUsagesForVolumeGroupId(ZONE_ID, TEST_PRIMARY_ZONE_GROUP_1)) in setUp() [all …]
|
/packages/services/Car/service/src/com/android/car/audio/hal/ |
D | HalAudioFocus.java | 26 …android.car.audio.CarAudioDumpProto.HalAudioFocusProto.HalFocusRequestsByZoneAndAttributes.ZONE_ID; 240 proto.write(ZONE_ID, zoneId); in dumpProto()
|
/packages/services/Car/service/src/com/android/car/audio/ |
D | CarDuckingInfo.java | 103 proto.write(CarDuckingInfoProto.ZONE_ID, mZoneId); in dumpProto()
|
D | CarVolumeGroupMuting.java | 180 proto.write(CarMutingInfo.ZONE_ID, info.zoneId); in dumpProtoCarMutingInfo()
|
D | ZoneAudioPlaybackCallback.java | 238 proto.write(CarAudioPlaybackCallbackProto.ZoneAudioPlaybackCallbackProto.ZONE_ID, in dumpProto()
|
D | CarAudioZoneConfig.java | 377 proto.write(CarAudioZoneConfigProto.ZONE_ID, mZoneId); in dumpProto()
|
D | CarVolumeGroup.java | 664 proto.write(CarVolumeGroupProto.ZONE_ID, mZoneId); in dumpProto()
|
D | CarAudioFocus.java | 1003 proto.write(CarAudioFocusProto.ZONE_ID, mCarAudioZone.getId()); in dumpProto()
|