Home
last modified time | relevance | path

Searched refs:USAGE_MEDIA (Results 1 – 25 of 36) sorted by relevance

12

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/hal/
DHalAudioFocusTest.java21 import static android.media.AudioAttributes.USAGE_MEDIA;
92 mHalAudioFocus.requestAudioFocus(USAGE_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_notifiesHalOfFocusChange()
94 verify(mAudioControlWrapper).onAudioFocusChange(USAGE_MEDIA, ZONE_ID, in requestAudioFocus_notifiesHalOfFocusChange()
102 mHalAudioFocus.requestAudioFocus(USAGE_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_specifiesUsage()
105 assertThat(actualRequest.getAudioAttributes().getUsage()).isEqualTo(USAGE_MEDIA); in requestAudioFocus_specifiesUsage()
112 mHalAudioFocus.requestAudioFocus(USAGE_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_specifiesFocusGain()
122 mHalAudioFocus.requestAudioFocus(USAGE_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_specifiesZoneId()
134 mHalAudioFocus.requestAudioFocus(USAGE_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_providesFocusChangeListener()
145 () -> mHalAudioFocus.requestAudioFocus(USAGE_MEDIA, INVALID_ZONE_ID, in requestAudioFocus_withInvalidZone_throws()
153 mHalAudioFocus.requestAudioFocus(USAGE_MEDIA, ZONE_ID, AUDIOFOCUS_GAIN); in requestAudioFocus_withSameZoneAndUsage_keepsExistingRequest()
[all …]
DAudioControlWrapperAidlTest.java19 import static android.media.AudioAttributes.USAGE_MEDIA;
73 private static final int USAGE = USAGE_MEDIA;
196 new ArrayList<>(), new int[]{USAGE_MEDIA, USAGE_NOTIFICATION}); in onDevicesToDuckChange_convertsUsagesToXsdStrings()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarAudioPlaybackCallbackTest.java21 import static android.media.AudioAttributes.USAGE_MEDIA;
116 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withOneMatchingConfiguration_returnsActiveContext()
137 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withMultipleConfiguration_returnsActiveContexts()
162 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withInactiveConfigurations_returnsActiveContext()
188 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withNoActiveConfigurations_returnsEmptyContexts()
215 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withInactiveConfig_beforeTimeout_returnsContexts()
226 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withInactiveConfig_beforeTimeout_returnsContexts()
256 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withInactiveConfigs_beforeTimeout_returnsContexts()
267 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_withInactiveConfigs_beforeTimeout_returnsContexts()
298 .setUsage(USAGE_MEDIA) in getAllActiveContextsForPrimaryZone_afterResetStillActiveContexts_returnsEmptyContext()
[all …]
DCarDuckingUtilsTest.java23 import static android.media.AudioAttributes.USAGE_MEDIA;
111 generateAudioFocusInfoForUsage(USAGE_MEDIA), in getUsagesHoldingFocus_removesDuplicateUsages()
117 assertThat(usages).asList().containsExactly(USAGE_MEDIA, USAGE_NOTIFICATION); in getUsagesHoldingFocus_removesDuplicateUsages()
122 List<AudioFocusInfo> focusHolders = List.of(generateAudioFocusInfoForUsage(USAGE_MEDIA), in getUsagesHoldingFocus_includesSystemUsages()
129 assertThat(usages).asList().containsExactly(USAGE_MEDIA, USAGE_SAFETY, USAGE_EMERGENCY); in getUsagesHoldingFocus_includesSystemUsages()
136 List<String> addresses = CarDuckingUtils.getAddressesToDuck(new int[]{USAGE_MEDIA, in getAddressesToDuck_withOneUsage_returnsEmptyList()
146 List<String> addresses = CarDuckingUtils.getAddressesToDuck(new int[]{USAGE_MEDIA, in getAddressesToDuck_withMultipleUsagesForTheSameContext_returnsEmptyList()
156 new int[]{USAGE_MEDIA, USAGE_SAFETY, USAGE_ASSISTANCE_NAVIGATION_GUIDANCE}; in getAddressesToDuck_onlyReturnsDevicesForUsagesHoldingFocus()
167 int[] usages = new int[]{USAGE_MEDIA, USAGE_SAFETY, USAGE_ASSISTANCE_NAVIGATION_GUIDANCE}; in getAddressesToDuck_withDuckedAndUnduckedContextsSharingDevice_excludesThatDevice()
178 int[] usages = new int[]{USAGE_MEDIA, USAGE_SAFETY, USAGE_ALARM}; in getAddressesToDuck_withDuckedContextsSharingADevice_includesAddressOnce()
DCarAudioFocusUnitTest.java22 import static android.media.AudioAttributes.USAGE_MEDIA;
359 AudioFocusInfo firstRequestWithDelayedFocus = getInfo(USAGE_MEDIA, SECOND_CLIENT_ID, in onAudioFocus_multipleRequestWithDelayedFocus_requestsDelayed()
367 AudioFocusInfo secondRequestWithDelayedFocus = getInfo(USAGE_MEDIA, THIRD_CLIENT_ID, in onAudioFocus_multipleRequestWithDelayedFocus_requestsDelayed()
383 AudioFocusInfo firstRequestWithDelayedFocus = getInfo(USAGE_MEDIA, SECOND_CLIENT_ID, in onAudioFocus_multipleRequestWithDelayedFocus_firstRequestReceivesFocusLoss()
391 AudioFocusInfo secondRequestWithDelayedFocus = getInfo(USAGE_MEDIA, THIRD_CLIENT_ID, in onAudioFocus_multipleRequestWithDelayedFocus_firstRequestReceivesFocusLoss()
407 AudioFocusInfo firstRequestWithDelayedFocus = getInfo(USAGE_MEDIA, SECOND_CLIENT_ID, in onAudioFocus_multipleRequestOnlyOneWithDelayedFocus_delayedFocusNotChanged()
415 AudioFocusInfo secondRequestWithNoDelayedFocus = getInfo(USAGE_MEDIA, THIRD_CLIENT_ID, in onAudioFocus_multipleRequestOnlyOneWithDelayedFocus_delayedFocusNotChanged()
434 AudioFocusInfo mediaRequestWithOutDelayedFocus = getInfo(USAGE_MEDIA, SECOND_CLIENT_ID, in onAudioFocus_multipleRequestOnlyOneWithDelayedFocus_nonTransientRequestReceivesLoss()
441 AudioFocusInfo mediaRequestWithDelayedFocus = getInfo(USAGE_MEDIA, THIRD_CLIENT_ID, in onAudioFocus_multipleRequestOnlyOneWithDelayedFocus_nonTransientRequestReceivesLoss()
471 AudioFocusInfo mediaRequestWithDelayedFocus = getInfo(USAGE_MEDIA, THIRD_CLIENT_ID, in onAudioFocus_multipleRequestOnlyOneWithDelayedFocus_duckedRequestReceivesLoss()
[all …]
DCarAudioContextTest.java22 import static android.media.AudioAttributes.USAGE_MEDIA;
59 assertThat(CarAudioContext.getContextForUsage(USAGE_MEDIA)) in getContextForUsage_forValidUsage_returnsContext()
71 AudioAttributes attributes = new AudioAttributes.Builder().setUsage(USAGE_MEDIA).build(); in getContextForAudioAttributes_forAttributeWithValidUsage_returnsContext()
87 assertThat(usages).asList().containsExactly(USAGE_UNKNOWN, USAGE_GAME, USAGE_MEDIA); in getUsagesForContext_withValidContext_returnsUsages()
115 int[] usages = {USAGE_GAME, USAGE_MEDIA}; in getUniqueContextsForUsages_withMultipleUsages_filtersDuplicateContexts()
124 int[] usages = {USAGE_MEDIA, USAGE_ASSISTANCE_NAVIGATION_GUIDANCE, USAGE_EMERGENCY}; in getUniqueContextsForUsages_withMultipleUsages_returnsAllUniqueContexts()
DCarDuckingInfoTest.java19 import static android.media.AudioAttributes.USAGE_MEDIA;
41 private static final int[] sUsagesHoldingFocus = {USAGE_MEDIA, USAGE_NOTIFICATION};
69 .containsExactly(USAGE_MEDIA, USAGE_NOTIFICATION); in constructor_validInputs_succeeds()
DCarVolumeTest.java21 import static android.media.AudioAttributes.USAGE_MEDIA;
262 int[] activeHalUsages = new int[] {USAGE_MEDIA}; in getSuggestedAudioContext_withConfigAndHalActiveUsage_returnsHalActive()
274 int[] activeHalUsages = new int[] {USAGE_MEDIA}; in getSuggestedAudioContext_withHalActiveUsageAndActiveCall_returnsCall()
285 int[] activeHalUsages = new int[] {USAGE_MEDIA, USAGE_ANNOUNCEMENT, USAGE_ASSISTANT}; in getSuggestedAudioContext_withMultipleHalActiveUsages_returnsMusic()
471 @AttributeUsage int[] activeHalUsages = {USAGE_MEDIA, USAGE_ANNOUNCEMENT, USAGE_ASSISTANT}; in isAnyContextActive_withActiveHalUsagesAndMatchedContext_returnsTrue()
482 @AttributeUsage int[] activeHalUsages = {USAGE_MEDIA, USAGE_ANNOUNCEMENT, USAGE_ASSISTANT}; in isAnyContextActive_withActiveHalUsagesAndMismatchedContext_returnsFalse()
DCarDuckingTest.java20 import static android.media.AudioAttributes.USAGE_MEDIA;
60 private final AudioFocusInfo mMediaFocusInfo = generateAudioFocusInfoForUsage(USAGE_MEDIA);
102 .asList().containsExactly(USAGE_MEDIA); in onFocusChange_forPrimaryZone_updatesUsagesHoldingFocus()
140 assertThat(usagesHoldingFocus).asList().containsExactly(USAGE_MEDIA); in onFocusChange_notifiesHalOfUsagesHoldingFocus()
DCarZonesAudioFocusUnitTest.java19 import static android.media.AudioAttributes.USAGE_MEDIA;
248 AudioAttributes attributes = new AudioAttributes.Builder().setUsage(USAGE_MEDIA).build(); in generateAudioFocusRequest()
257 .setUsage(USAGE_MEDIA) in generateAudioFocusInfoWithBundledZoneId()
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/
DMediaOutputUtilsTest.java85 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
104 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in getActiveLocalMediaController_localMediaStopped_returnNull()
124 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in getActiveLocalMediaController_bothHaveRemoteMediaAndLocalMedia_returnNull()
150 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in getActiveLocalMediaController_bothHaveLocalMediaAndRemoteMedia_returnNull()
174 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in initPlayback()
DMediaOutputIndicatorWorkerTest.java218 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in initPlayback()
232 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
251 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in getActiveLocalMediaController_localMediaStopped_returnNull()
270 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).build(), in getActiveLocalMediaController_bothHaveRemoteMediaAndLocalMedia_returnNull()
/packages/services/Car/tests/CarSecurityPermissionTest/src/com/android/car/media/
DCarAudioManagerPermissionTest.java24 import static android.media.AudioAttributes.USAGE_MEDIA;
142 () -> mCarAudioManager.createAudioPatch("address", USAGE_MEDIA, 0)); in createAudioPatchPermission()
170 () -> mCarAudioManager.getVolumeGroupIdForUsage(USAGE_MEDIA)); in getVolumeGroupIdForUsagePermission()
177 () -> mCarAudioManager.getVolumeGroupIdForUsage(PRIMARY_AUDIO_ZONE, USAGE_MEDIA)); in getVolumeGroupIdForUsageWithZonePermission()
226 () -> mCarAudioManager.getOutputDeviceForUsage(PRIMARY_AUDIO_ZONE, USAGE_MEDIA)); in getOutputDeviceForUsagePermission()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/sound/
DVolumeSettingsRingtoneManagerTest.java20 import static android.media.AudioAttributes.USAGE_MEDIA;
55 private static final int TEST_USAGE_ID = USAGE_MEDIA;
88 new int[] {USAGE_MEDIA}, in getRingtoneUri_defaultsToDefaultRingtoneUriIfUsageNotInConfig()
100 @AttributeUsage int usage = USAGE_MEDIA; in getRingtoneUri_usesConfigValuesForUsageRingtoneMapping()
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/
DCarZonesAudioFocusTest.java20 import static android.media.AudioAttributes.USAGE_MEDIA;
116 AudioFocusInfo audioFocusInfoClient2 = new AudioFocusInfoBuilder().setUsage(USAGE_MEDIA) in onAudioFocusRequest_forTwoDifferentZones_requestGranted()
137 AudioFocusInfo audioFocusInfoClient2 = new AudioFocusInfoBuilder().setUsage(USAGE_MEDIA) in onAudioFocusRequest_forTwoDifferentZones_abandonInOne_requestGranted()
160 AudioFocusInfo audioFocusInfoClient = new AudioFocusInfoBuilder().setUsage(USAGE_MEDIA) in onAudioFocusRequest_withBundleFocusRequest_requestGranted()
268 new AudioFocusInfoBuilder().setUsage(USAGE_MEDIA) in onAudioFocusRequest_forMediaWhileOnCall_withDelayedEnable_delayedSucceeds()
311 return new AudioFocusInfoBuilder().setUsage(USAGE_MEDIA) in generateMediaRequestForPrimaryZone()
DCarAudioZoneTest.java22 import static android.media.AudioAttributes.USAGE_MEDIA;
125 new Builder().setUsage(USAGE_MEDIA).setDeviceAddress(MUSIC_ADDRESS).build(), in findActiveContextsFromPlaybackConfigurations_returnsAllActiveContext()
186 new Builder().setUsage(USAGE_MEDIA) in findActiveContextsFromPlaybackConfigurations_deviceWithMultiContext_returnsContext()
226 new Builder().setUsage(USAGE_MEDIA) in findActiveContextsFromPlaybackConfigurations_withMultiGroupMatch_returnsContexts()
233 assertThat(activeContexts).containsExactly(ALARM, USAGE_MEDIA); in findActiveContextsFromPlaybackConfigurations_withMultiGroupMatch_returnsContexts()
343 private @AudioAttributes.AttributeUsage int mUsage = USAGE_MEDIA;
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/media/
DCarAudioManagerTest.java112 CarAudioManager.PRIMARY_AUDIO_ZONE, AudioAttributes.USAGE_MEDIA); in test_getOutputDeviceForUsage()
118 int groupId = mCarAudioManager.getVolumeGroupIdForUsage(AudioAttributes.USAGE_MEDIA); in test_getVolumeGroupIdForUsage()
120 AudioAttributes.USAGE_MEDIA)).isEqualTo(groupId); in test_getVolumeGroupIdForUsage()
/packages/services/Car/tests/SampleCustomInputService/tests/src/com/android/car/custominput/sample/unittest/
DCustomInputEventListenerTest.java214 doTestIncreaseVolumeAndAssert(AudioAttributes.USAGE_MEDIA, CustomInputEvent.INPUT_CODE_F4); in testHandleEvent_increaseMediaVolume()
246 doTestIncreaseMaxVolumeAndAssert(AudioAttributes.USAGE_MEDIA, in testHandleEvent_increaseMediaVolumeMax()
278 doTestDecreaseVolumeAndAssert(AudioAttributes.USAGE_MEDIA, CustomInputEvent.INPUT_CODE_F5); in testHandleEvent_decreaseMediaVolume()
310 doTestDecreaseMinVolumeAndAssert(AudioAttributes.USAGE_MEDIA, in testHandleEvent_decreaseMediaMinVolume()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/audio/
DAudioTestFragment.java29 import static android.media.AudioAttributes.USAGE_MEDIA;
388 .setUsage(USAGE_MEDIA) in initializePlayers()
400 .setUsage(USAGE_MEDIA) in initializePlayers()
407 .setUsage(USAGE_MEDIA) in initializePlayers()
749 .getOutputDeviceForUsage(audioZoneId, USAGE_MEDIA); in setUpDeviceAddressPlayer()
779 .setUsage(USAGE_MEDIA) in createDeviceAddressAudioPlayer()
DCarAudioZoneInputFragment.java81 .setUsage(AudioAttributes.USAGE_MEDIA) in CarAudioZoneInputFragment()
203 AudioAttributes.USAGE_MEDIA, 0); in startAudioLocked()
/packages/services/Car/tests/SampleCustomInputService/src/com/android/car/custominput/sample/
DCustomInputEventListener.java108 increaseVolume(targetDisplayId, AudioAttributes.USAGE_MEDIA); in handle()
111 decreaseVolume(targetDisplayId, AudioAttributes.USAGE_MEDIA); in handle()
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dpsink/
DA2dpSinkStreamHandler.java268 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA) in requestAudioFocus()
301 .setUsage(AudioAttributes.USAGE_MEDIA) in requestMediaKeyFocus()
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioDynamicRouting.java45 AudioAttributes.USAGE_MEDIA,
/packages/apps/TV/src/com/android/tv/audio/
DAudioManagerHelper.java51 .setUsage(AudioAttributes.USAGE_MEDIA) in AudioManagerHelper()
/packages/apps/UniversalMediaPlayer/java/com/android/pump/activity/
DVideoPlayerActivity.java74 .setUsage(AudioAttributesCompat.USAGE_MEDIA) in onCreate()

12