Revert "Revert "AudioFlinger: Keep track of music effect thread ..."
Revert submission 26624467-revert-25712917-SEPJYAPZTA
Reason for revert: b/330202134 fixed with ag/26627359
Reverted changes: /q/submissionid:26624467-revert-25712917-SEPJYAPZTA
Change-Id: 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;