diff options
| author | 2025-01-13 14:48:27 +0800 | |
|---|---|---|
| committer | 2025-01-12 22:51:50 -0800 | |
| commit | ced955039f0bbf94bd3223d9cb1ee9cebf106f4e (patch) | |
| tree | a972cf42ae9d221feba81e5ff221720d29ee6670 | |
| parent | 9c77f4eb9ca9e5ee7ea7dd15459d081372c2a843 (diff) | |
Add some debugging logs for CSIP logic
Flag: EXEMPT add logging
Test: compile
Bug: 375358149
Change-Id: I945d9611fbbf8313322db79397d94fd822d188ea
| -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()); |