diff --git a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java index 44f13e43fd..99b988edf7 100644 --- a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java @@ -178,10 +178,11 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH) .build()); } - if (Build.VERSION.SDK_INT < 26) { + //if (Build.VERSION.SDK_INT < 26) { // Deprecated in API Level 26, use above AudioAtrributes instead + // TODO: convert code to replace deprecated setAudioStreamType and requestAudioFocus(AudioManager.OnAudioFocusChangeListener l, int streamType, int durationHint) mediaPlayer.setAudioStreamType(streamType); - } + //} mediaPlayer.setDataSource(file.getAbsolutePath()); mediaPlayer.prepare(); mediaPlayer.setOnCompletionListener(this);