Home
last modified time | relevance | path

Searched refs:carVolumeGroup (Results 1 – 7 of 7) sorted by relevance

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarVolumeGroupUnitTest.java157 CarVolumeGroup carVolumeGroup = getCarVolumeGroupWithMusicBound(); in getAddressForContext_withSupportedContext_returnsAddress() local
160 .that(carVolumeGroup.getAddressForContext(TEST_MEDIA_CONTEXT_ID)) in getAddressForContext_withSupportedContext_returnsAddress()
166 CarVolumeGroup carVolumeGroup = getCarVolumeGroupWithMusicBound(); in getAddressForContext_withUnsupportedContext_returnsNull() local
169 .that(carVolumeGroup.getAddressForContext( in getAddressForContext_withUnsupportedContext_returnsNull()
175 CarVolumeGroup carVolumeGroup = getCarVolumeGroupWithMusicBound(); in setMuted_whenUnmuted_onActivation_returnsTrue() local
178 .that(carVolumeGroup.setMute(true)).isTrue(); in setMuted_whenUnmuted_onActivation_returnsTrue()
183 CarVolumeGroup carVolumeGroup = getCarVolumeGroupWithMusicBound(); in setMuted_whenUnmuted_onDeactivation_returnsFalse() local
186 .that(carVolumeGroup.setMute(false)).isFalse(); in setMuted_whenUnmuted_onDeactivation_returnsFalse()
192 CarVolumeGroup carVolumeGroup = getCarVolumeGroupWithMusicBound(); in setMuted_whenMuted_onDeactivation_returnsTrue() local
193 carVolumeGroup.setMute(true); in setMuted_whenMuted_onDeactivation_returnsTrue()
[all …]
DCarAudioVolumeGroupTest.java165 CarAudioVolumeGroup carVolumeGroup = testVolumeGroupSetup(); in testInitializedIndexes() local
167 expect.withMessage("Min index").that(carVolumeGroup.getMinGainIndex()) in testInitializedIndexes()
169 expect.withMessage("Max index").that(carVolumeGroup.getMaxGainIndex()) in testInitializedIndexes()
171 expect.withMessage("Default index").that(carVolumeGroup.getDefaultGainIndex()) in testInitializedIndexes()
177 CarAudioVolumeGroup carVolumeGroup = testVolumeGroupSetup(); in checkValidGainIndexes() local
179 expect.withMessage("Min index").that(carVolumeGroup.isValidGainIndex(MIN_GAIN_INDEX)) in checkValidGainIndexes()
181 expect.withMessage("Max index").that(carVolumeGroup.isValidGainIndex(MAX_GAIN_INDEX)) in checkValidGainIndexes()
184 .that(carVolumeGroup.isValidGainIndex(DEFAULT_GAIN_INDEX)) in checkValidGainIndexes()
188 .that(carVolumeGroup.isValidGainIndex(MIN_GAIN_INDEX - 1)) in checkValidGainIndexes()
191 .that(carVolumeGroup.isValidGainIndex(MAX_GAIN_INDEX + 1)) in checkValidGainIndexes()
[all …]
DVolumeGroupBuilder.java130 CarVolumeGroup carVolumeGroup = mock(CarVolumeGroup.class); in build() local
137 when(carVolumeGroup.getAddressForContext(context)).thenReturn(address); in build()
148 when(carVolumeGroup.getAllSupportedUsagesForAddress(eq(address))) in build()
152 when(carVolumeGroup.getContexts()).thenReturn(contexts); in build()
155 when(carVolumeGroup.getContextsForAddress(address)) in build()
158 when(carVolumeGroup.getAddresses()) in build()
161 when(carVolumeGroup.getCarAudioDeviceInfoForAddress(any())) in build()
165 when(carVolumeGroup.getName()).thenReturn(mName); in build()
167 when(carVolumeGroup.isMuted()).thenReturn(mIsMuted); in build()
169 when(carVolumeGroup.getId()).thenReturn(mId); in build()
[all …]
DCarVolumeGroupFactoryTest.java90 CarVolumeGroup carVolumeGroup = mFactory.getCarVolumeGroup(/* useCoreAudioVolume= */ false); in setDeviceInfoForContext_associatesDeviceAddresses() local
93 .that(carVolumeGroup.getAddresses()).containsExactly(MEDIA_DEVICE_ADDRESS, in setDeviceInfoForContext_associatesDeviceAddresses()
101 CarVolumeGroup carVolumeGroup = mFactory.getCarVolumeGroup(/* useCoreAudioVolume= */ false); in setDeviceInfoForContext_associatesContexts() local
105 .that(carVolumeGroup.getContexts()).asList() in setDeviceInfoForContext_associatesContexts()
252 CarVolumeGroup carVolumeGroup = mFactory.getCarVolumeGroup(/* useCoreAudioVolume= */ false); in factoryBuild_withNoStoredGain_usesDefaultGain() local
255 .that(carVolumeGroup.getCurrentGainIndex()).isEqualTo(DEFAULT_GAIN_INDEX); in factoryBuild_withNoStoredGain_usesDefaultGain()
264 CarVolumeGroup carVolumeGroup = mFactory.getCarVolumeGroup(/* useCoreAudioVolume= */ false); in factoryBuild_withTooLargeStoredGain_usesDefaultGain() local
267 .that(carVolumeGroup.getCurrentGainIndex()).isEqualTo(DEFAULT_GAIN_INDEX); in factoryBuild_withTooLargeStoredGain_usesDefaultGain()
276 CarVolumeGroup carVolumeGroup = mFactory.getCarVolumeGroup(/* useCoreAudioVolume= */ false); in factoryBuild_withTooSmallStoredGain_usesDefaultGain() local
279 .that(carVolumeGroup.getCurrentGainIndex()).isEqualTo(DEFAULT_GAIN_INDEX); in factoryBuild_withTooSmallStoredGain_usesDefaultGain()
[all …]
DCarVolumeGroupMutingTest.java557 private void setUpCarVolumeGroupIsMuted(CarVolumeGroup carVolumeGroup, boolean muted) { in setUpCarVolumeGroupIsMuted() argument
558 when(carVolumeGroup.isMuted()).thenReturn(muted); in setUpCarVolumeGroupIsMuted()
561 private void setUpCarVolumeGroupHasCriticalAudioContexts(CarVolumeGroup carVolumeGroup) { in setUpCarVolumeGroupHasCriticalAudioContexts() argument
562 when(carVolumeGroup.hasCriticalAudioContexts()).thenReturn(true); in setUpCarVolumeGroupHasCriticalAudioContexts()
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/
DCarAudioDynamicRoutingTest.java354 CarVolumeGroup carVolumeGroup = mock(CarVolumeGroup.class); in build() local
361 when(carVolumeGroup.getAddressForContext(context)).thenReturn(address); in build()
372 when(carVolumeGroup.getAllSupportedUsagesForAddress(eq(address))) in build()
376 when(carVolumeGroup.getContexts()).thenReturn(contexts); in build()
379 when(carVolumeGroup.getContextsForAddress(address)) in build()
382 when(carVolumeGroup.getAddresses()) in build()
385 when(carVolumeGroup.getCarAudioDeviceInfoForAddress(any())) in build()
387 when(carVolumeGroup.isActive()).thenReturn(mIsActive); in build()
389 return carVolumeGroup; in build()
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioZonesValidator.java123 for (CarVolumeGroup carVolumeGroup : groups) { in validateEachAddressAppearsAtMostOnceInOneConfig()
124 validateVolumeGroupAddresses(addressesPerConfig, carVolumeGroup.getAddresses()); in validateEachAddressAppearsAtMostOnceInOneConfig()