private boolean overrideHasPendingData(){
  boolean hasPendingPassthroughData=needsPassthroughWorkarounds() && (audioTrack.getPlayState() == android.media.AudioTrack.PLAYSTATE_PAUSED) && (audioTrack.getPlaybackHeadPosition() == 0);
  if (hasPendingPassthroughData) {
    return true;
  }
  boolean hasPendingDataQuirk=AmazonQuirks.isLatencyQuirkEnabled() && (audioTrack.getPlayState() == android.media.AudioTrack.PLAYSTATE_PLAYING) && (((System.nanoTime() / 1000) - resumeSystemTimeUs) < C.MICROS_PER_SECOND);
  return hasPendingDataQuirk;
}

private boolean overrideHasPendingData ( ) { boolean hasPendingPassthroughData = needsPassthroughWorkarounds ( ) && ( audioTrack . getPlayState ( ) == android . media . AudioTrack . PLAYSTATE_PAUSED ) && ( audioTrack . getPlaybackHeadPosition ( ) == 0 ) ; if ( hasPendingPassthroughData ) { return true ; } boolean hasPendingDataQuirk = AmazonQuirks . isLatencyQuirkEnabled ( ) && ( audioTrack . getPlayState ( ) == android . media . AudioTrack . PLAYSTATE_PLAYING ) && ( ( ( System . nanoTime ( ) / 1000 ) - resumeSystemTimeUs ) < C . MICROS_PER_SECOND ) ; return hasPendingDataQuirk ; }
returns whether the audio track should behave as though it has pending data . this is to work around an issue on platform api versions 21 / 22 where ac - 3 audio tracks can ' t be paused , so we empty their buffers when paused . in this case , they should still behave as if they have pending data , otherwise writing will never resume . additionally , in fireos 4 based amazon tablets , after playback is resumed , the play head position returned by audiotrack during its stabilization phase jumps to a high value , causing us to falsely believe that there is an under - run . this workaround makes us behave as though audiotrack has pending data irrespective of the playback head position reported by audiotrack til 1 sec after playback has resumed .
