Fix video calls incorrectly routing to earpiece
A race condition during call setup can cause the audio routing decision
to be made before the call's video state is known. This results in
video calls defaulting to the earpiece instead of the speaker.
This change fixes the issue by triggering a re-evaluation of the audio
route when the call's video state is updated after it becomes active.
This ensures the call is correctly switched to speakerphone if needed.
Flag: com.android.server.telecom.flags.maybe_reroute_audio_on_video_state_change
Fixes: 439441943
Test: 1 new unit test
Change-Id: Iaa60bc98a420057f3198f9e1c6fde3ca55e14577
4 files changed