ST-HAL: Update check for stream state in destructor
Remove state check, as it does not matter what is the state,
if pal_handle_ has stream handle then stream is active and
we need to call pal_stream_close.
Change-Id: Ib3358ce9e083d8a2ba46a93e09e7bb04747af6f7
diff --git a/SoundTriggerSession.cpp b/SoundTriggerSession.cpp
index 62a15f6..361cec7 100644
--- a/SoundTriggerSession.cpp
+++ b/SoundTriggerSession.cpp
@@ -91,7 +91,7 @@
SoundTriggerSession::~SoundTriggerSession()
{
- if (pal_handle_ && IsState(IDLE))
+ if (pal_handle_)
pal_stream_close(pal_handle_);
pal_handle_ = nullptr;