From: Luiz Augusto von Dentz Date: Wed, 5 Jan 2011 15:59:39 +0000 (+0200) Subject: telephony-ofono: fix not being able to answer alerting/waiting calls X-Git-Tag: android-x86-4.4-r3~14926 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=16ec168ac7fdd18cb2cbc7b3be7df349fd84c41c;p=android-x86%2Fexternal-bluetooth-bluez.git telephony-ofono: fix not being able to answer alerting/waiting calls --- diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c index babf38f53..4f6967338 100644 --- a/audio/telephony-ofono.c +++ b/audio/telephony-ofono.c @@ -263,9 +263,16 @@ void telephony_terminate_call_req(void *telephony_device) void telephony_answer_call_req(void *telephony_device) { - struct voice_call *vc = find_vc_with_status(CALL_STATUS_INCOMING); + struct voice_call *vc; int ret; + vc = find_vc_with_status(CALL_STATUS_INCOMING); + if (!vc) + vc = find_vc_with_status(CALL_STATUS_ALERTING); + + if (!vc) + vc = find_vc_with_status(CALL_STATUS_WAITING); + if (!vc) { telephony_answer_call_rsp(telephony_device, CME_ERROR_NOT_ALLOWED);