OSDN Git Service

Media profile drop on ending the outgoing video call and music is heard locally
authorZhihai Xu <zhihaixu@google.com>
Thu, 16 May 2013 00:29:44 +0000 (17:29 -0700)
committerZhihai Xu <zhihaixu@google.com>
Tue, 21 May 2013 00:19:52 +0000 (17:19 -0700)
commit5ae72cf049004ac3c0f2f2bc048d1638a3b13d55
treef866a56e683facc5264c52974a0047a69c102bde
parent48ebe2c6928d8fd4dc97c8adb138c3440714dc89
Media profile drop on ending the outgoing video call and music is heard locally

receive AVDTP_Suspend response rejection which cause the A2DP disocnnected.
There is collision of AVDTP_Suspend request:
We send AVDTP_Suspend request and the headset send AVDTP_Suspend request also at the same time.
then We send AVDTP_Suspend response, but the headset send AVDTP_Suspend response rejection
with error code bad state after it receive the AVDTP_Suspend response from us.
we call bta_av_suspend_cfm twice in this case:
the first time we will call bta_av_suspend_cfm without error after receive AVDTP_Suspend request from headset.
the second time we will call bta_av_suspend_cfm with error bad state after receive AVDTP_Suspend response rejection from headset.
To fix this problem, we should ignore the AVDTP_Suspend response rejection from headset
after receive AVDTP_Suspend request from headset.
After we receive AVDTP_Suspend request from headset, the scb state will be changed to AVDT_SCB_OPEN_ST from AVDT_SCB_STREAM_ST.
but when we receive AVDTP_Suspend response rejection from headset, we should ignore it when we are in AVDT_SCB_OPEN_ST.
and also currently we already ignore AVDTP_Suspend response when we are in AVDT_SCB_OPEN_ST,
I don't know why we didn't do it for AVDTP Suspend rejection.

issue 8735903

Change-Id: I8db3ea6e7e4edfea41f255e7e29b8c7255cf3d96
bta/av/bta_av_aact.c
stack/avdt/avdt_scb.c