From 8160c3fb27060db57057d4d2b98942f2843269b3 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 25 Mar 2014 19:44:16 +0100 Subject: [PATCH] android/handsfree: Update indicators if calls changed with waiting call If ongoing calls were changed while there is waiting call, callheld and call indicators should be updated to match new calls state. This was affecting TC_AG_TCA_BV_05_I qualification test case. --- android/handsfree.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/android/handsfree.c b/android/handsfree.c index 99451eded..fce258984 100644 --- a/android/handsfree.c +++ b/android/handsfree.c @@ -2014,8 +2014,19 @@ static void phone_state_incoming(int num_active, int num_held, uint8_t type, { char *clip, *num; - if (device.setup_state == HAL_HANDSFREE_CALL_STATE_INCOMING) + if (device.setup_state == HAL_HANDSFREE_CALL_STATE_INCOMING) { + if (device.num_active != num_active || + device.num_held != num_held) { + /* calls changed while waiting call ie. due to + * termination of active call + */ + update_indicator(IND_CALLHELD, + num_held ? (num_active ? 1 : 2) : 0); + update_indicator(IND_CALL, !!(num_active + num_held)); + } + return; + } if (device.call_hanging_up) return; -- 2.47.3