commit | 8555621d76c31045ad3b046d93b6b3ed8d6094d9 | [log] [tgz] |
---|---|---|
author | Shunkai Yao <yaoshunkai@google.com> | Tue Mar 19 04:31:47 2024 +0000 |
committer | Shunkai Yao <yaoshunkai@google.com> | Wed Jul 10 19:52:04 2024 +0000 |
tree | 475c970a74dbb89a66814bbbd6e111e4f093fc18 | |
parent | 03d96f08b9ff85f827b59fad3756c2b36540ba77 [diff] [blame] |
AudioFlinger: Keep track of music effect thread when primary output is unavailable Test: atest CtsMediaAudioTestCases Bug: 307216402 Bug: 330202134 Bug: 309578734 Change-Id: I0a43627e18368f3b883e9d3e33d60d679f2920d5 Merged-In: I0a43627e18368f3b883e9d3e33d60d679f2920d5
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h index 46c44a6..5e527d3 100644 --- a/services/audioflinger/Effects.h +++ b/services/audioflinger/Effects.h
@@ -616,7 +616,9 @@ mThreadType = thread->type(); mAfThreadCallback = thread->afThreadCallback(); } - + bool hasThreadAttached() const { + return thread().promote() != nullptr; + } private: const wp<IAfEffectChain> mChain; mediautils::atomic_wp<IAfThreadBase> mThread;