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

Commit 7972e55e authored by Sal Savage's avatar Sal Savage Committed by Automerger Merge Worker
Browse files

Merge "Use MAP Client UUIDs isProfileSupported" into main am: b053e21d am: 0f7ac6fe

parents 26caa99a 0f7ac6fe
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1471,7 +1471,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) {
@@ -1513,7 +1521,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)