Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b053e21d authored by Sal Savage's avatar Sal Savage Committed by Gerrit Code Review
Browse files

Merge "Use MAP Client UUIDs isProfileSupported" into main

parents b6112395 306b7c21
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1469,7 +1469,15 @@ public class AdapterService extends Service {
        ParcelUuid[] remoteDeviceUuids = getRemoteUuids(device);
        ParcelUuid[] localDeviceUuids = mAdapterProperties.getUuids();
        if (remoteDeviceUuids == null || remoteDeviceUuids.length == 0) {
            Log.e(TAG, "isSupported: Remote Device Uuids Empty");
            Log.e(TAG, "isProfileSupported(device=" + device + ", profile="
                    + BluetoothProfile.getProfileName(profile) + "): remote device Uuids Empty");
        }

        if (VERBOSE) {
            Log.v(TAG, "isProfileSupported(device=" + device + ", profile="
                    + BluetoothProfile.getProfileName(profile) + "): local_uuids="
                    + Arrays.toString(localDeviceUuids) + ", remote_uuids="
                    + Arrays.toString(remoteDeviceUuids));
        }

        if (profile == BluetoothProfile.HEADSET) {
@@ -1511,7 +1519,8 @@ public class AdapterService extends Service {
            return mPbapService.getConnectionState(device) == BluetoothProfile.STATE_CONNECTED;
        }
        if (profile == BluetoothProfile.MAP_CLIENT) {
            return true;
            return Utils.arrayContains(localDeviceUuids, BluetoothUuid.MNS)
                    && Utils.arrayContains(remoteDeviceUuids, BluetoothUuid.MAS);
        }
        if (profile == BluetoothProfile.PBAP_CLIENT) {
            return Utils.arrayContains(localDeviceUuids, BluetoothUuid.PBAP_PCE)