diff options
| author | 2018-10-19 17:09:34 +0000 | |
|---|---|---|
| committer | 2018-10-19 17:09:34 +0000 | |
| commit | 4c7123f8e3534727eab79b70eb66848602a3c31e (patch) | |
| tree | c3970a390d0340aa4f870cfa2701100bfa262643 | |
| parent | c4b647458c89468f1ad86b1700133a42b740d793 (diff) | |
| parent | 3b24d97130b79b9266a85f0efd1fe0c382eebb64 (diff) | |
Merge "Fix missing connection state changes intent for Hearing Aids"
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java index 88ec1d8dccdd..a993306cc32d 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java @@ -128,6 +128,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); @@ -164,13 +172,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"); } |