Floss: Fix WebHID randomly fails to hang-up call from headset
When an app like Meet starts using WebHID it opens the UHID device, closes it then re-open it immediately. Closing triggers a hang-up, which should not have any effect, then the second open is followed by off-hook event. Hang-up and off-hook events call phone_state_change() which is managed asynchronously at C++ level. In this bug the phone state changes from off-hook event occurs before the phone state change from hang-up (which calls bta_ag_sco_disc_cback()) is completed. This race condition is triggered since Change-Id Iecf97a229b28b4fd0c03501011655ac8a34e9048 Bug: 324384285 Test: Conduct the following manual tests pair Bluetooth Headset Google Meet: headset is able to mute, un-mute and hang-up the call Test: Conduct the following manual tests pair Bluetooth Headset Open youtube and play music start Google meet call add Headset to Meet call control remove call control permissions on Headset switch Microphone to internal audio streaming is switch back to A2DP Test: atest bluetooth_test_gd Tag: #floss Flag: EXEMPT, no behavior change on Android; Floss-only changes Change-Id: I5dae5c950edc8723b1869d3197768d8c0acc46da
Loading
Please register or sign in to comment