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

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

Merge "Fix missing connection state changes intent for Hearing Aids"

am: 4c7123f8

Change-Id: I8fd60c7a9e1458c9d391407cd53c9cd56fb5509d
parents 130aacd5 4c7123f8
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -125,6 +125,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);
@@ -161,13 +169,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");
    }