summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Stanley Tng <stng@google.com> 2018-10-19 10:59:53 -0700
committer android-build-merger <android-build-merger@google.com> 2018-10-19 10:59:53 -0700
commit76439a1665d45ea177eb9f2a33bc8553b24998bc (patch)
tree14f4044ef2085214164c3cd826aa614ecc72618d
parent130aacd56610cb68a5a1e4af2508849fcad026f0 (diff)
parent4c7123f8e3534727eab79b70eb66848602a3c31e (diff)
Merge "Fix missing connection state changes intent for Hearing Aids"
am: 4c7123f8e3 Change-Id: I8fd60c7a9e1458c9d391407cd53c9cd56fb5509d
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java15
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 463700d78ae3..d1ccc8fcc443 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
@@ -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");
}