Work around stalled AudioTrack up to API 28

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188173078
This commit is contained in:
andrewlewis 2018-03-07 07:26:51 -08:00 committed by Oliver Woodman
parent f71b087fe4
commit 91c4490249

View File

@ -1443,7 +1443,7 @@ public final class DefaultAudioSink implements AudioSink {
rawPlaybackHeadPosition += passthroughWorkaroundPauseOffset;
}
if (Util.SDK_INT <= 26) {
if (Util.SDK_INT <= 28) {
if (rawPlaybackHeadPosition == 0 && lastRawPlaybackHeadPosition > 0
&& state == PLAYSTATE_PLAYING) {
// If connecting a Bluetooth audio device fails, the AudioTrack may be left in a state