hal: use consistent in call indication
Use voice_is_in_call() instead of mode == MODE_IN_CALL
as a valid indication that we are in call to choose sound
devices.
Change-Id: Iefa968ee463d4ade6c7d09626be667faab6eda98
diff --git a/hal/voice.c b/hal/voice.c
index c4fa163..53e3033 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -373,11 +373,11 @@
{
int ret = 0;
+ adev->voice.in_call = true;
ret = voice_extn_start_call(adev);
if (ret == -ENOSYS) {
ret = voice_start_usecase(adev, USECASE_VOICE_CALL);
}
- adev->voice.in_call = true;
return ret;
}