hal: fix voice call device routing issue
adev->voice_device_set flag is to indicate voice call
device routing update from policymanager to HAL. It is
set to true in voice_start_call and reset in update_calls()
which causes mismatch in flag update during back to back
voice calls scenario. Update adev->voice_device_set flag
in voice_stop_call instead of update_calls(). Rename
voice_device_set flag to in_call for readability.
Change-Id: Ie07105671f254899890bdb4c0635c7dc1f55dbff
diff --git a/hal/voice.h b/hal/voice.h
index 4df2d6a..5d1ae40 100644
--- a/hal/voice.h
+++ b/hal/voice.h
@@ -60,8 +60,8 @@
int tty_mode;
bool mic_mute;
float volume;
- bool voice_device_set;
bool is_in_call;
+ bool in_call;
};
enum {
@@ -77,8 +77,8 @@
void voice_get_parameters(struct audio_device *adev, struct str_parms *query,
struct str_parms *reply);
void voice_init(struct audio_device *adev);
-bool voice_is_in_call(struct audio_device *adev);
bool voice_is_in_call_rec_stream(struct stream_in *in);
+bool voice_is_call_state_active(struct audio_device *adev);
int voice_set_mic_mute(struct audio_device *dev, bool state);
bool voice_get_mic_mute(struct audio_device *dev);
int voice_set_volume(struct audio_device *adev, float volume);