summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author SongFerng Wang <songferngwang@google.com> 2022-07-27 06:23:53 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-07-27 06:23:53 +0000
commita7457a15a43cd3f3bc904c1134c08cf3a78f0f0c (patch)
tree8a5f5cb51cbf756ff4d7f797042e8f6a8f0c96c5
parent8b43c577e1f225807f3acf01398d7eebd290c9a6 (diff)
parent5379ffded78d276a069e6ace9902ecd37009ac57 (diff)
Merge "[LE unicast] The icon is not LE Audio one" into tm-qpr-dev am: 7c85779ae9 am: 5379ffded7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19394151 Change-Id: I6d9b3a15160341f5ddff79eda36d7e5eb8ed27ba Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
index 58944f653869..4714ff93625b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
@@ -576,6 +576,15 @@ public class LocalBluetoothProfileManager {
return;
}
+ // The profiles list's sequence will affect the bluetooth icon at
+ // BluetoothUtils.getBtClassDrawableWithDescription(Context,CachedBluetoothDevice).
+
+ // Moving the LE audio profile to be the first priority if the device supports LE audio.
+ if (ArrayUtils.contains(uuids, BluetoothUuid.LE_AUDIO) && mLeAudioProfile != null) {
+ profiles.add(mLeAudioProfile);
+ removedProfiles.remove(mLeAudioProfile);
+ }
+
if (mHeadsetProfile != null) {
if ((ArrayUtils.contains(localUuids, BluetoothUuid.HSP_AG)
&& ArrayUtils.contains(uuids, BluetoothUuid.HSP))
@@ -660,11 +669,6 @@ public class LocalBluetoothProfileManager {
removedProfiles.remove(mHearingAidProfile);
}
- if (ArrayUtils.contains(uuids, BluetoothUuid.LE_AUDIO) && mLeAudioProfile != null) {
- profiles.add(mLeAudioProfile);
- removedProfiles.remove(mLeAudioProfile);
- }
-
if (mSapProfile != null && ArrayUtils.contains(uuids, BluetoothUuid.SAP)) {
profiles.add(mSapProfile);
removedProfiles.remove(mSapProfile);