Merge "AudioFlinger: Fix spurious underrun logging" into rvc-dev am: 54cc1e3c43 am: 43fd672bd7 am: 19fa75e682

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/11956760

Change-Id: I2ad5e212669c920ecc9fd126b77b21a52a1d3164
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index abd5eb8..d366bb7 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -805,7 +805,7 @@
     status_t status = mServerProxy->obtainBuffer(&buf);
     buffer->frameCount = buf.mFrameCount;
     buffer->raw = buf.mRaw;
-    if (buf.mFrameCount == 0 && !isStopping() && !isStopped() && !isPaused()) {
+    if (buf.mFrameCount == 0 && !isStopping() && !isStopped() && !isPaused() && !isOffloaded()) {
         ALOGV("%s(%d): underrun,  framesReady(%zu) < framesDesired(%zd), state: %d",
                 __func__, mId, buf.mFrameCount, desiredFrames, mState);
         mAudioTrackServerProxy->tallyUnderrunFrames(desiredFrames);