Assert effect hal interface not null before access
Also add debugging information to assert
Bug: 315995877
Test: atest CtsMediaAudioTestCases
Change-Id: Ic43c375bb57b64bb169eece8f7be28f011ecebc0
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h
index 0fa1b83..64a4e62 100644
--- a/services/audioflinger/Effects.h
+++ b/services/audioflinger/Effects.h
@@ -228,7 +228,7 @@
bool isOffloaded_l() const final
REQUIRES(audio_utils::EffectChain_Mutex) EXCLUDES_EffectBase_Mutex;
void addEffectToHal_l() final REQUIRES(audio_utils::EffectChain_Mutex);
- void release_l() final REQUIRES(audio_utils::EffectChain_Mutex);
+ void release_l(const std::string& from = "") final REQUIRES(audio_utils::EffectChain_Mutex);
sp<IAfEffectModule> asEffectModule() final { return this; }
@@ -308,6 +308,8 @@
pid_t mSetVolumeReentrantTid = INVALID_PID;
std::optional<std::vector<uint32_t>> mVolume;
+ // TODO: b/315995877, remove this debugging string after root cause
+ std::string mEffectInterfaceDebug;
};
// The EffectHandle class implements the IEffect interface. It provides resources