summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-03-25 19:44:16 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-03-25 20:49:38 +0100
commit8160c3fb27060db57057d4d2b98942f2843269b3 (patch)
treec3086178de1b2cf3e8e65da7fa50ba8f5b1cdda7
parentbbc32b300ae4cfa9fcd1f0eab7f4eeab852f7e62 (diff)
downloadbluez-8160c3fb27060db57057d4d2b98942f2843269b3.tar.gz
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.
-rw-r--r--android/handsfree.c13
1 files changed, 12 insertions, 1 deletions
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;