Add Bluetooth callback for device connection state changed
With the new Multi-A2DP/HFP support, need to add profile connection state
changed callback for every BT device connect/disconnect to profile.
Bug: 76447449
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=LocalBluetoothProfileManagerTest -j28
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=BluetoothEventManagerTest -j28
Change-Id: Iaaec369e8d10f9b1270491632fb5c91de1e28571
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java
index a1c8de5..ac5f537 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java
@@ -85,6 +85,11 @@
return mIsProfileReady;
}
+ @Override
+ public int getProfileId() {
+ return BluetoothProfile.A2DP_SINK;
+ }
+
A2dpSinkProfile(Context context, LocalBluetoothAdapter adapter,
CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {