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

Commit 7233ef22 authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Android (Google) Code Review
Browse files

Merge "HFP Client Permission" into nyc-dev

parents 47702be9 99fecc0d
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -399,6 +399,9 @@ public final class LocalBluetoothProfileManager {
        // Copy previous profile list into removedProfiles
        removedProfiles.clear();
        removedProfiles.addAll(profiles);
        if (DEBUG) {
            Log.d(TAG,"Current Profiles" + profiles.toString());
        }
        profiles.clear();

        if (uuids == null) {
@@ -415,6 +418,13 @@ public final class LocalBluetoothProfileManager {
            }
        }

        if ((mHfpClientProfile != null) &&
                BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Handsfree_AG) &&
                BluetoothUuid.isUuidPresent(localUuids, BluetoothUuid.Handsfree)) {
            profiles.add(mHfpClientProfile);
            removedProfiles.remove(mHfpClientProfile);
        }

        if (BluetoothUuid.containsAnyUuid(uuids, A2dpProfile.SINK_UUIDS) &&
            mA2dpProfile != null) {
            profiles.add(mA2dpProfile);
@@ -461,5 +471,9 @@ public final class LocalBluetoothProfileManager {
            profiles.remove(mPbapProfile);
            removedProfiles.add(mPbapProfile);
        }

        if (DEBUG) {
            Log.d(TAG,"New Profiles" + profiles.toString());
        }
    }
}