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

Commit ad7bbf12 authored by Stanley Tng's avatar Stanley Tng Committed by android-build-merger
Browse files

Merge changes from topic "hearing-aid" into pi-dev

am: 9c3f60d2

Change-Id: Ie7580ef3e0a74011a274707f57d7cf0d0fa0ab3e
parents f0011cb9 9c3f60d2
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -123,6 +123,14 @@ public class LocalBluetoothProfileManager {

        ParcelUuid[] uuids = adapter.getUuids();

        List<Integer> supportedList = mLocalAdapter.getSupportedProfiles();
        if (supportedList.contains(BluetoothProfile.HEARING_AID)) {
            mHearingAidProfile = new HearingAidProfile(mContext, mLocalAdapter, mDeviceManager,
                                                       this);
            addProfile(mHearingAidProfile, HearingAidProfile.NAME,
                       BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED);
        }

        // uuids may be null if Bluetooth is turned off
        if (uuids != null) {
            updateLocalProfiles(uuids);
@@ -159,13 +167,6 @@ public class LocalBluetoothProfileManager {
        addProfile(mPbapProfile, PbapServerProfile.NAME,
             BluetoothPbap.ACTION_CONNECTION_STATE_CHANGED);

        List<Integer> supportedList = mLocalAdapter.getSupportedProfiles();
        if (supportedList.contains(BluetoothProfile.HEARING_AID)) {
            mHearingAidProfile = new HearingAidProfile(mContext, mLocalAdapter, mDeviceManager,
                                                       this);
            addProfile(mHearingAidProfile, HearingAidProfile.NAME,
                       BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED);
        }
        if (DEBUG) Log.d(TAG, "LocalBluetoothProfileManager construction complete");
    }