diff options
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java | 2 | ||||
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java index 4b7cb36f2753..bf86911ee683 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java @@ -134,6 +134,8 @@ public class CsipDeviceManager { // Do nothing if GroupId has been assigned if (!isValidGroupId(cachedDevice.getGroupId())) { final int newGroupId = getBaseGroupId(cachedDevice.getDevice()); + log("updateCsipDevices: propose new group id " + newGroupId + " for device " + + cachedDevice.getDevice()); // Do nothing if there is no GroupId on Bluetooth device if (isValidGroupId(newGroupId)) { cachedDevice.setGroupId(newGroupId); diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java index 7c24df9e9019..ff5e9e657213 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java @@ -358,6 +358,9 @@ public class LocalBluetoothProfileManager { && mProfile instanceof CsipSetCoordinatorProfile; if (isAshaProfile && (newState == BluetoothProfile.STATE_CONNECTED)) { + if (DEBUG) { + Log.d(TAG, "onReceive, hearing aid profile connected, check hisyncid"); + } // Check if the HiSyncID has being initialized if (cachedDevice.getHiSyncId() == BluetoothHearingAid.HI_SYNC_ID_INVALID) { long newHiSyncId = getHearingAidProfile().getHiSyncId(cachedDevice.getDevice()); @@ -375,7 +378,9 @@ public class LocalBluetoothProfileManager { } if (isHapClientOrLeAudioProfile && newState == BluetoothProfile.STATE_CONNECTED) { - + if (DEBUG) { + Log.d(TAG, "onReceive, hap/lea profile connected, check hearing aid info"); + } // Checks if both profiles are connected to the device. Hearing aid info need // to be retrieved from these profiles separately. if (cachedDevice.isConnectedLeAudioHearingAidDevice()) { @@ -389,10 +394,16 @@ public class LocalBluetoothProfileManager { } if (isCsipProfile && (newState == BluetoothProfile.STATE_CONNECTED)) { + if (DEBUG) { + Log.d(TAG, "onReceive, csip profile connected, check group id"); + } // Check if the GroupID has being initialized if (cachedDevice.getGroupId() == BluetoothCsipSetCoordinator.GROUP_ID_INVALID) { final Map<Integer, ParcelUuid> groupIdMap = getCsipSetCoordinatorProfile() .getGroupUuidMapByDevice(cachedDevice.getDevice()); + if (DEBUG) { + Log.d(TAG, "csip group uuid map = " + groupIdMap); + } if (groupIdMap != null) { for (Map.Entry<Integer, ParcelUuid> entry: groupIdMap.entrySet()) { if (entry.getValue().equals(BluetoothUuid.CAP)) { @@ -431,6 +442,9 @@ public class LocalBluetoothProfileManager { mProfile.getProfileId()); } if (needDispatchProfileConnectionState) { + if (DEBUG) { + Log.d(TAG, "needDispatchProfileConnectionState"); + } cachedDevice.refresh(); mEventManager.dispatchProfileConnectionStateChanged(cachedDevice, newState, mProfile.getProfileId()); |