Revert^2 "AudioFlinger: do not reset mHwPaused on flush"
This reverts commit 5f1ee2c965d5b15402f43c0c124e89d689bd7023.
Reason for revert: <The problem has been fixed at AOSP/2893100, this patch is ok to merge now>
Change-Id: I8431c6c0a368d986405c9200c55e24ff099c353d
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index bcd8b99..fd5d5fc 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -7145,11 +7145,14 @@
{
PlaybackThread::flushHw_l();
mOutput->flush();
- mHwPaused = false;
mFlushPending = false;
mTimestampVerifier.discontinuity(discontinuityForStandbyOrFlush());
mTimestamp.clear();
mMonotonicFrameCounter.onFlush();
+ // We do not reset mHwPaused which is hidden from the Track client.
+ // Note: the client track in Tracks.cpp and AudioTrack.cpp
+ // has a FLUSHED state but the DirectOutputThread does not;
+ // those tracks will continue to show isStopped().
}
int64_t DirectOutputThread::computeWaitTimeNs_l() const {