Clear pending BT messages in call audio routing

Clear the pending BT messages when receiving BT_AUDIO_CONNECTED and
BT_AUDIO_DISCONNECTED signals from the BT stack. We already do this as
part of routing when moving from the original route to the destination
route but we should also cover this explicitly as part of the BT stack
broadcasts that are sent to Telecom. This has been causing issues with
improper routing in some scenarios like the aforementioned bug.

In addition, we should remove pending BT_AUDIO_DISCONNECTED messages
from SPEAKER_ON. We should also clear SPEAKER_OFF in this case as well
and for SPEAKER_OFF, we should clear the SPEAKER_ON message similar to
the BT cases.

Bug: 404473378
Flag: EXEMPT bugfix
Test: atest CallAudioRouteControllerTest

Change-Id: Ibfafcf0680351c2b5c3f78cdfda8963a1a1d0c96
2 files changed