voice_extn: remove redundant check of mode when stop voice use case
voice use case is still active when mode switched from MODE_IN_CALL to MODE_IN_COMMUNICATION, while the output used for driving call is NULL. This could possibly makes segment fault in mediaserver when call is activated before the output updated to valid value. Change-Id: I070dd5e7a1c6d2883ea611588737b1f5c577b275 CRs-Fixed: 953010
This commit is contained in:
parent
26c67740c7
commit
d50037291b
|
@ -430,15 +430,12 @@ int voice_extn_stop_call(struct audio_device *adev)
|
|||
* set routing with device BT A2DP profile. Hence end all voice calls when
|
||||
* set_mode(AUDIO_MODE_NORMAL) before BT A2DP profile is selected.
|
||||
*/
|
||||
if (adev->mode == AUDIO_MODE_NORMAL) {
|
||||
ALOGD("%s: end all calls", __func__);
|
||||
for (i = 0; i < MAX_VOICE_SESSIONS; i++) {
|
||||
adev->voice.session[i].state.new = CALL_INACTIVE;
|
||||
}
|
||||
|
||||
ret = update_calls(adev);
|
||||
ALOGD("%s: end all calls", __func__);
|
||||
for (i = 0; i < MAX_VOICE_SESSIONS; i++) {
|
||||
adev->voice.session[i].state.new = CALL_INACTIVE;
|
||||
}
|
||||
|
||||
ret = update_calls(adev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue