Move AudioSwitch state change at the beginning of every flow execution, to eliminate two potential race conditions:
Incorrect state and exception thrown when selected device is activated shortly after starting the AudioSwitch
Bluetooth device is reactivated after stopping AudioSwitch due to incorrect state which caused permanent audio focus (only fixed by reconnecting the Bluetooth device). This also made device to not appear on the list since it was always in active audio connected state.
Breakdown
Move state change before any other execution
Validation
[Bulleted summary of validation steps]
[eg. Add new unit tests to validate changes]
[eg. Verified all CI checks pass on the feature branch]
Additional Notes
[Any additional comments, notes, or information relevant to reviewers.]
Submission Checklist
[ ] The source has been evaluated for semantic versioning changes and are reflected in gradle.properties
[ ] The CHANGELOG.md reflects any feature, bug fixes, or known issues made in the source code
Description
Move AudioSwitch state change at the beginning of every flow execution, to eliminate two potential race conditions:
Breakdown
Validation
Additional Notes
[Any additional comments, notes, or information relevant to reviewers.]
Submission Checklist
gradle.properties
CHANGELOG.md
reflects any feature, bug fixes, or known issues made in the source code