File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -657,18 +657,10 @@ public static AudioCapabilities getCapabilitiesInternalForDirectPlayback(
657
657
@ Nullable
658
658
public static AudioDeviceInfoApi23 getDefaultRoutedDeviceForAttributes (
659
659
AudioManager audioManager , AudioAttributes audioAttributes ) {
660
- List <AudioDeviceInfo > audioDevices ;
661
- try {
662
- audioDevices =
663
- checkNotNull (audioManager )
664
- .getAudioDevicesForAttributes (
665
- audioAttributes .getAudioAttributesV21 ().audioAttributes );
666
- } catch (RuntimeException e ) {
667
- // Audio manager failed to retrieve devices.
668
- // TODO: b/306324391 - Remove once https://github.com/robolectric/robolectric/commit/442dff
669
- // is released.
670
- return null ;
671
- }
660
+ List <AudioDeviceInfo > audioDevices =
661
+ checkNotNull (audioManager )
662
+ .getAudioDevicesForAttributes (
663
+ audioAttributes .getAudioAttributesV21 ().audioAttributes );
672
664
if (audioDevices .isEmpty ()) {
673
665
// Can't find current device.
674
666
return null ;
You can’t perform that action at this time.
0 commit comments