Prevent auto-routing to wearable devices.

Currently, if BT is supported, Telecom will auto-route to one of the
available devices. Consequently, a watch that is paired with the phone
will receive the call audio when it is not explicitly requested.

This CL ensures that implicit routing to watches is ignored. When
connecting an arbitrary BT device, the wearable devices need to be
filtered out. Wearable (Pixel) devices are distinguishable by their
class/type (BluetoothClass.Device.WEARABLE_WRIST_WATCH,
BluetoothDevice.DEVICE_TYPE_WATCH). In addition to that, if there are no
devices to connect to, fallback is required to ensure that the audio
route is properly handled.

Bug: 294378768
Bug: 322330341
Test: Manual test with wired headset plugged in and Pixel watch paired.
Unplugged headset during call to verify that audio is routed to earpiece
and that there aren't any issues with user switching to the watch.
Test: Unit test verifying that the audio is routed into another
supported route when there are no non-wearable devices to arbitrarily
connect to.

(cherry picked from commit 96cb64ba5d8fa35fab1b2276185ed9443cbfa8b4)
(cherry picked from
Merged-In: I14be322037ad968009850d69387ad1aca76a0e05
Change-Id: I14be322037ad968009850d69387ad1aca76a0e05
3 files changed