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

Skip to content
Commit 92641885 authored by Ugo Yu's avatar Ugo Yu
Browse files

SCO: Don't set active device if a diconnect message is defered

- Fix a pin-pon scenario in HeadsetService.
- If a headset B is set as active deivce while headset A is connecting SCO,
  HeadsetService request headset A's state machine to do disconnect SCO.
- However, when state machine is at AudioConnecting state, DISCONNECT_AUDIO
  would be pending in defered meesage queue and will be handled in next state.
- Once headset A entered AndioOn state, it set it self to as active device again
  then start handling DISCONNECT_AUDIO.
- After headset A finally disconnect SCO, HeadsetService won't reconnect
  it and rout to headset B since active device is still headset A.
- Active deivce would be like A->B->A, and no device SCO stay connected.

Bug: 110642515
Test: Manual test, make a call and switch path A->speaker->B on phone UI

Change-Id: I7dde255c2ba9f04aec86b7fdd30e7bfadfdd5068
(cherry picked from commit aebfbb7e)
parent 5851f9b5
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