Skip to content
Snippets Groups Projects
Commit 1b5b14c9 authored by Yuyang Huang's avatar Yuyang Huang
Browse files

invoke bta_av_sco_chg_cback when SCO goes from SHUTTING to SHUTDOWN state

When BTA_AG_SCO_OPEN_ST transits to BTA_AG_SCO_SHUTTING_ST, the bta_av_sco_chg_cback may not report # of sco links on time.
Add another bta_av_sco_chg_cback check when BTA_AG_SCO_SHUTTING_ST goes to BTA_AG_SCO_SHUTDOWN_ST.

Bug: 234976097
Change-Id: I2e370facd0e01054645d018a663e41e2401a1f0f
Test: manual 
parent 7b1d3570
No related branches found
No related tags found
No related merge requests found
......@@ -1104,6 +1104,7 @@ static void bta_ag_sco_event(tBTA_AG_SCB* p_scb, uint8_t event) {
/* If last SCO instance then finish shutting down */
if (!bta_ag_other_scb_open(p_scb)) {
p_sco->state = BTA_AG_SCO_SHUTDOWN_ST;
bta_sys_sco_unuse(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);
} else /* Other instance is still listening */
{
p_sco->state = BTA_AG_SCO_LISTEN_ST;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment