diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-04-11 12:07:09 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:16 -0700 |
commit | 7ca15ca81eee23a930eecc9f388cc73b4efc1994 (patch) | |
tree | a2393513201d5ece325b95456e1e742df1bf8eb4 | |
parent | aeddde20be2d01a2c052ee516f9015243dbaebf1 (diff) | |
download | external_bluetooth_bluedroid-7ca15ca81eee23a930eecc9f388cc73b4efc1994.zip external_bluetooth_bluedroid-7ca15ca81eee23a930eecc9f388cc73b4efc1994.tar.gz external_bluetooth_bluedroid-7ca15ca81eee23a930eecc9f388cc73b4efc1994.tar.bz2 |
Resolve HFP PTS issues related to 3way calling. Following were the changes
1. Enable the feature in stack to avoid sending duplicate indicators
2. AT command response return code was incorrect
3. Update the call indicator to confirm to errata#2043. call=1 implies a call is in progress - either held/active
Change-Id: I0243f83697ed7390ec0ad96c525e41ee9d93de2d
-rw-r--r-- | bta/ag/bta_ag_cmd.c | 2 | ||||
-rw-r--r-- | btif/src/btif_hf.c | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/bta/ag/bta_ag_cmd.c b/bta/ag/bta_ag_cmd.c index 5d60405..7787a75 100644 --- a/bta/ag/bta_ag_cmd.c +++ b/bta/ag/bta_ag_cmd.c @@ -1612,7 +1612,7 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result) break; case BTA_AG_IND_RES: - bta_ag_send_ind(p_scb, p_result->data.ind.id, p_result->data.ind.value, TRUE); + bta_ag_send_ind(p_scb, p_result->data.ind.id, p_result->data.ind.value, FALSE); break; case BTA_AG_BVRA_RES: diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c index 18939cb..f2e5bbf 100644 --- a/btif/src/btif_hf.c +++ b/btif/src/btif_hf.c @@ -788,6 +788,7 @@ static bt_status_t at_response(bthf_at_response_t response_code) /* TODO: Fix the errcode */ send_at_result((response_code == BTHF_AT_RESPONSE_OK) ? BTA_AG_OK_DONE : BTA_AG_OK_ERROR, 0); + return BT_STATUS_SUCCESS; } @@ -1002,14 +1003,16 @@ static bt_status_t phone_state_change(int num_active, int num_held, bthf_call_st memset(&ag_res, 0, sizeof(tBTA_AG_RES_DATA)); - /* Active Changed? */ - if ((num_active != btif_hf_cb.num_active) && !activeCallUpdated) + /* 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 + ** Handle call indicator change + **/ + if (!activeCallUpdated && ((num_active + num_held) != (btif_hf_cb.num_active + btif_hf_cb.num_held)) ) { BTIF_TRACE_DEBUG3("%s: Active call states changed. old: %d new: %d", __FUNCTION__, btif_hf_cb.num_active, num_active); - send_indicator_update(BTA_AG_IND_CALL, (num_active ? 1 : 0)); + send_indicator_update(BTA_AG_IND_CALL, ((num_active + num_held) > 0) ? 1 : 0); } - /* Held Changed? */ if (num_held != btif_hf_cb.num_held) { |