/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarVolumeGroupUnitTest.java | 73 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_associatesDeviceAddresses() 85 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_associatesContexts() 89 assertThat(carVolumeGroup.getContexts()).asList().containsExactly(CarAudioContext.MUSIC, in setDeviceInfoForContext_associatesContexts() 96 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_withDifferentStepSize_throws() 111 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_withSameContext_throws() 114 () -> builder.setDeviceInfoForContext(CarAudioContext.MUSIC, in setDeviceInfoForContext_withSameContext_throws() 125 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_withFirstCall_setsMinGain() 134 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_withFirstCall_setsMaxGain() 143 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_withFirstCall_setsDefaultGain() 151 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_SecondCallWithSmallerMinGain_updatesMinGain() [all …]
|
D | FocusInteractionTest.java | 152 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.MUSIC); in evaluateRequest_forExclusivePair_returnsGranted() 154 int result = mFocusInteraction.evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, in evaluateRequest_forExclusivePair_returnsGranted() 162 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.MUSIC); in evaluateRequest_forExclusivePair_addsEntryToLosers() 165 .evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, false, in evaluateRequest_forExclusivePair_addsEntryToLosers() 175 int result = mFocusInteraction.evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, in evaluateResult_forConcurrentPair_returnsGranted() 187 .evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, false, false); in evaluateResult_forConcurrentPair_andNoDucking_addsToLosers() 198 .evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, true, false); in evaluateResult_forConcurrentPair_andWantsPauseInsteadOfDucking_addsToLosers() 209 .evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, true, false); in evaluateResult_forConcurrentPair_andReceivesDuckEvents_addsToLosers() 220 .evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, true, in evaluateResult_forConcurrentPair_andDucking_doesAddsToLosers() 240 () -> mFocusInteraction.evaluateRequest(CarAudioContext.MUSIC, focusEntry, in evaluateResult_forUndefinedFocusHolderContext_throws() [all …]
|
D | CarAudioContextTest.java | 28 import static com.android.car.audio.CarAudioContext.MUSIC; 60 .isEqualTo(MUSIC); in getContextForUsage_forValidUsage_returnsContext() 73 assertThat(CarAudioContext.getContextForAttributes(attributes)).isEqualTo(MUSIC); in getContextForAudioAttributes_forAttributeWithValidUsage_returnsContext() 86 int[] usages = CarAudioContext.getUsagesForContext(MUSIC); in getUsagesForContext_withValidContext_returnsUsages() 119 assertThat(result).containsExactly(MUSIC); in getUniqueContextsForUsages_withMultipleUsages_filtersDuplicateContexts() 128 assertThat(result).containsExactly(MUSIC, NAVIGATION, EMERGENCY); in getUniqueContextsForUsages_withMultipleUsages_returnsAllUniqueContexts() 136 .that(isCriticalAudioContext(CarAudioContext.MUSIC)).isFalse(); in isCriticalAudioContext_forNonCritialContexts_returnsFalse()
|
D | FocusEntryTest.java | 61 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in wantsPauseInsteadOfDucking_whenFlagIsSet_returnsTrue() 70 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in wantsPauseInsteadOfDucking_whenFlagIsNotSet_returnsFalse() 78 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_whenBundleDoesNotReceiveDuckingEvents_returnsFalse() 88 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_withoutReceiveCarAudioDuckingEventsPermission_returnsFalse() 98 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_withReceiveCarAudioDuckingEventsPermission_returnsTrue()
|
D | CarAudioPlaybackCallbackTest.java | 23 import static com.android.car.audio.CarAudioContext.MUSIC; 129 assertThat(activeContexts).containsExactly(MUSIC); in getAllActiveContextsForPrimaryZone_withOneMatchingConfiguration_returnsActiveContext() 154 assertThat(activeContexts).containsExactly(MUSIC, NAVIGATION); in getAllActiveContextsForPrimaryZone_withMultipleConfiguration_returnsActiveContexts() 180 assertThat(activeContexts).containsExactly(MUSIC); in getAllActiveContextsForPrimaryZone_withInactiveConfigurations_returnsActiveContext() 248 assertThat(activeContexts).containsExactly(MUSIC, NAVIGATION); in getAllActiveContextsForPrimaryZone_withInactiveConfig_beforeTimeout_returnsContexts() 290 assertThat(activeContexts).containsExactly(NAVIGATION, MUSIC); in getAllActiveContextsForPrimaryZone_withInactiveConfigs_beforeTimeout_returnsContexts() 375 assertThat(activeContexts).containsExactly(MUSIC); in getAllActiveContextsForPrimaryZone_withInactiveConfig_afterTimeout_returnsContext() 488 .addDeviceAddressAndContexts(MUSIC, PRIMARY_MEDIA_ADDRESS) in generatePrimaryZone()
|
D | CarVolumeGroupMutingTest.java | 20 import static com.android.car.audio.CarAudioContext.MUSIC; 77 mMusicCarVolumeGroup = groupWithContextAndAddress(MUSIC, PRIMARY_MEDIA_ADDRESS); in setUp() 81 mSecondaryZoneVolumeGroup = groupWithContextAndAddress(MUSIC, SECONDARY_ADDRESS); in setUp() 82 mTertiaryZoneVolumeGroup = groupWithContextAndAddress(MUSIC, TERTIARY_ADDRESS); in setUp() 411 .addDeviceAddressAndContexts(MUSIC, PRIMARY_MEDIA_ADDRESS) in generateMutingInfoFromZone_withMutedMultiDeviceGroup_returnsAllDevicesMuted() 429 .addDeviceAddressAndContexts(MUSIC, PRIMARY_MEDIA_ADDRESS) in generateMutingInfoFromZone_withUnMutedMultiDeviceGroup_returnsAllDevicesUnMuted() 446 .addDeviceAddressAndContexts(MUSIC, PRIMARY_MEDIA_ADDRESS) in generateMutingInfoFromZone_mutingRestricted_mutesAllNonCriticalDevices()
|
D | CarVolumeTest.java | 31 import static com.android.car.audio.CarAudioContext.MUSIC; 251 List<Integer> activePlaybackContexts = ImmutableList.of(MUSIC); in getSuggestedAudioContext_withConfigAndHalActiveUsage_returnsConfigActive() 257 assertThat(suggestedContext).isEqualTo(MUSIC); in getSuggestedAudioContext_withConfigAndHalActiveUsage_returnsConfigActive() 269 assertThat(suggestedContext).isEqualTo(MUSIC); in getSuggestedAudioContext_withConfigAndHalActiveUsage_returnsHalActive() 292 assertThat(suggestedContext).isEqualTo(MUSIC); in getSuggestedAudioContext_withMultipleHalActiveUsages_returnsMusic() 450 @AudioContext int[] activeContexts = {ALARM, MUSIC, VOICE_COMMAND}; in isAnyContextActive_withOneConfigurationAndMultipleContexts_returnsTrue() 460 @AudioContext int[] activeContexts = {ALARM, MUSIC, VOICE_COMMAND}; in isAnyContextActive_withOneConfigurationAndMultipleContexts_returnsFalse()
|
D | CarDuckingTest.java | 23 import static com.android.car.audio.CarAudioContext.MUSIC; 188 when(primaryZone.getAddressForContext(MUSIC)).thenReturn(PRIMARY_MEDIA_ADDRESS); in generateZoneMocks() 198 when(rearZone.getAddressForContext(MUSIC)).thenReturn(REAR_MEDIA_ADDRESS); in generateZoneMocks()
|
D | CarDuckingUtilsTest.java | 223 when(mockZone.getAddressForContext(CarAudioContext.MUSIC)).thenReturn(MEDIA_ADDRESS); in generateAudioZoneMock()
|
/packages/services/Car/service/src/com/android/car/audio/ |
D | CarDuckingUtils.java | 25 import static com.android.car.audio.CarAudioContext.MUSIC; 51 sContextsToDuck.append(MUSIC, new int[0]); in sContextsToDuck.append() argument 53 MUSIC, in sContextsToDuck.append() argument 73 MUSIC in sContextsToDuck.append() argument 76 MUSIC, in sContextsToDuck.append() argument 81 MUSIC, in sContextsToDuck.append() argument 89 MUSIC, in sContextsToDuck.append() argument 101 MUSIC, in sContextsToDuck.append() argument
|
D | CarAudioContext.java | 50 static final int MUSIC = 1; field in CarAudioContext 106 MUSIC, 123 CONTEXT_NAMES.append(MUSIC, "MUSIC"); in CONTEXT_NAMES.append() argument 140 CONTEXT_TO_USAGES.put(MUSIC, in CONTEXT_TO_USAGES.put() argument 278 MUSIC,
|
D | CarVolume.java | 54 CarAudioContext.MUSIC, 71 CarAudioContext.MUSIC,
|
D | CarAudioZonesHelper.java | 77 CONTEXT_NAME_MAP.put("music", CarAudioContext.MUSIC); 97 CarAudioContext.MUSIC,
|
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/ |
D | CarAudioZoneTest.java | 27 import static com.android.car.audio.CarAudioContext.MUSIC; 80 .addDeviceAddressAndContexts(MUSIC, MUSIC_ADDRESS).build(); in setUp() 94 String musicAddress = mTestAudioZone.getAddressForContext(MUSIC); in getAddressForContext_returnsExpectedDeviceAddress() 114 () -> mTestAudioZone.getAddressForContext(MUSIC)); in getAddressForContext_throwsOnNonExistentContext() 133 assertThat(activeContexts).containsExactly(MUSIC, NAVIGATION); in findActiveContextsFromPlaybackConfigurations_returnsAllActiveContext() 181 .addDeviceAddressAndContexts(MUSIC, ASSISTANT_ADDRESS) in findActiveContextsFromPlaybackConfigurations_deviceWithMultiContext_returnsContext()
|
D | CarAudioZonesHelperLegacyTest.java | 118 when(mMockAudioControlWrapper.getBusForContext(CarAudioContext.MUSIC)).thenReturn(1); in loadAudioZones_associatesLegacyContextsWithCorrectBuses() 129 assertThat(contexts).contains(CarAudioContext.MUSIC); in loadAudioZones_associatesLegacyContextsWithCorrectBuses()
|
D | CarAudioZonesHelperTest.java | 252 .containsExactly(CarAudioContext.MUSIC); in loadAudioZones_parsesContexts()
|
/packages/apps/TV/tests/robotests/src/com/android/tv/data/ |
D | GenreItemTest.java | 78 assertThat(GenreItems.getId(Genres.MUSIC)).isEqualTo(GenreItems.ID_ALL_CHANNELS); in testGetId_lmp_mr1() 86 assertInRange(GenreItems.getId(Genres.MUSIC), 1, count - 1); in testGetId_lmp_mr1()
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/data/ |
D | SectionParser.java | 284 Genres.MUSIC, 289 Genres.MUSIC, 331 Genres.MUSIC, 375 Genres.MUSIC, 385 Genres.MUSIC, 397 Genres.MUSIC, 398 Genres.MUSIC,
|
/packages/apps/TV/src/com/android/tv/data/ |
D | GenreItems.java | 43 Genres.MUSIC,
|