audioflinger: avoid removing the same effect from the audio HAL twice
Add a flag to record whether the effect has been added to the audio
HAL.
Bug: 191754292
Test: mm libaudioflinger, Google Meet
Change-Id: Iabe73c6029e8daeb0e5f6d983321cc989013451f
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h
index 661881e..a727e04 100644
--- a/services/audioflinger/Effects.h
+++ b/services/audioflinger/Effects.h
@@ -286,6 +286,7 @@
// sending disable command.
uint32_t mDisableWaitCnt; // current process() calls count during disable period.
bool mOffloaded; // effect is currently offloaded to the audio DSP
+ bool mAddedToHal; // effect has been added to the audio HAL
#ifdef FLOAT_EFFECT_CHAIN
bool mSupportsFloat; // effect supports float processing