diff options
-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) { |