diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-04-26 19:50:39 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:19 -0700 |
commit | c02b3a558e7789dcd73bcabf5a90f24fee327364 (patch) | |
tree | 2435bb548919399b537fd4e12d5926c8bfd25f14 | |
parent | 4ccd6261b39fef1854761442b10deac3490be623 (diff) | |
download | external_bluetooth_bluedroid-c02b3a558e7789dcd73bcabf5a90f24fee327364.zip external_bluetooth_bluedroid-c02b3a558e7789dcd73bcabf5a90f24fee327364.tar.gz external_bluetooth_bluedroid-c02b3a558e7789dcd73bcabf5a90f24fee327364.tar.bz2 |
Match the call and callheld indicator status in CIND with CLCC. call indicates call in progress (active+held), callheld has three values 0, 1, 2 depending on active and held status
Change-Id: I35442ed36036c93ae92a27a12c60ebb4842992de
-rw-r--r-- | bta/ag/bta_ag_cmd.c | 3 | ||||
-rw-r--r-- | btif/src/btif_hf.c | 17 |
2 files changed, 12 insertions, 8 deletions
diff --git a/bta/ag/bta_ag_cmd.c b/bta/ag/bta_ag_cmd.c index 7787a75..ae0febd 100644 --- a/bta/ag/bta_ag_cmd.c +++ b/bta/ag/bta_ag_cmd.c @@ -515,7 +515,8 @@ static void bta_ag_send_ind(tBTA_AG_SCB *p_scb, UINT16 id, UINT16 value, BOOLEAN if ((id == BTA_AG_IND_CALLHELD) && (on_demand == FALSE)) { - if (value == p_scb->callheld_ind) + /* call swap could result in sending callheld=1 multiple times */ + if ((value != 1) && (value == p_scb->callheld_ind)) return; p_scb->callheld_ind = (UINT8)value; diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c index f2e5bbf..3079214 100644 --- a/btif/src/btif_hf.c +++ b/btif/src/btif_hf.c @@ -726,14 +726,17 @@ static bt_status_t cind_response(int svc, int num_active, int num_held, tBTA_AG_RES_DATA ag_res; memset (&ag_res, 0, sizeof (ag_res)); + /* per the errata 2043, call=1 implies atleast one call is in progress (active/held) + ** https://www.bluetooth.org/errata/errata_view.cfm?errata_id=2043 + **/ sprintf (ag_res.str, "%d,%d,%d,%d,%d,%d,%d", - (num_active ? 1 : 0), /* Call state */ - callstate_to_callsetup(call_setup_state), /* Callsetup state */ - svc, /* network service */ - signal, /* Signal strength */ - roam, /* Roaming indicator */ - batt_chg, /* Battery level */ - (num_held ? 1 : 0)); /* Call held */ + (num_active + num_held) ? 1 : 0, /* Call state */ + callstate_to_callsetup(call_setup_state), /* Callsetup state */ + svc, /* network service */ + signal, /* Signal strength */ + roam, /* Roaming indicator */ + batt_chg, /* Battery level */ + ((num_held == 0) ? 0 : ((num_active == 0) ? 2 : 1))); /* Call held */ BTA_AgResult (btif_hf_cb.handle, BTA_AG_CIND_RES, &ag_res); |