AudioDeviceBroker: Bluetooth LE communication route compatibility

Implement compatibility mode for Bluetooth LE audio or Hearing Aid (HA)
deviced and VoIP apps targetting a SDK before 32.
Before SDK 31 (Android S), there is no API to control routing to those
devices and users will not understand why their Bluetooth LE or HA device
does not work for popular VoIP applications. We set the bar at SDK 32 to
leave a grace period for app developers to adopt the new API.
In order to offer a better UX during the transition period when
applications migrate to the new routing APIs
(AudioManager.setCommunicationDevice()), we select the HA or LE Audio device
by default for VoIP calls if connected.
This behavior is similar to what is done for wired headsets and users can
transfer the call to the earpiece by disconnecting the Bluetooth device.
Speaker phone ON/OFF function still works.
We do not implement this compatibility mode for cell calls (audio mode IN_CALL)
because the Dialer app has already migrated to new APIs and supports
Bluetooth LE Audio adn HA devices.

Bug: 243827847
Test: regression on Voice and VoIP calls with HFP profile
Change-Id: I5d4391896a407dad9853ee7a0b964c4ebba203d6
3 files changed