Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a66bb86d authored by Ugo Yu's avatar Ugo Yu Committed by William Escande
Browse files

Handle AVDT_SCB_HDL_TC_CLOSE in avdt_scb idle state

Fix an issue of if the remote device disconnect AVDTP before it
is configured, the avdt_scb state machine ingores the close event
and cause the bta_av state machine stuck at INCOMING state.

The issue is:
1. remote initiates AVDTP connection, bta_av_ssm switches to INCOMING state
2. bta_av_accept_signalling_timer_cback() timer is fired, in case the remote device (AVDTP initiator) does not send discovery.
3. remote send discovery and found out we don't have A2DP sink, then disconnect.
4. avdt_scb ignores the L2C disconnection in IDLE state, makes the bta_av_ssm stays at INCOMING state.
5. bta_av_accept_signalling_timer_cback() timed out, and notice that bta_av_ssm is still in INCOMING state, it assumes that the remote did not finish discovery, so it starts a new discovery procedure.

This change makes the avdt_scb handle L2C close in idle state so the bta_av_ssm does not stuck at INCOMING state if the L2C link is disconnected before the AVDTP is configured.
Cherry picked from wear OS

Bug: 263323082
Bug: 239833275
Test: Manual
Change-Id: I629f44f477ffe111112db70738fb4241e179684d
(cherry picked from commit e440c1acacf0b53a0460475b0ecca5a74d552aec)
parent aea515f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment