Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -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); Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +15 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading @@ -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()) { Loading @@ -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)) { Loading Loading @@ -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()); Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -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); Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +15 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading @@ -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()) { Loading @@ -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)) { Loading Loading @@ -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()); Loading