diff options
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java | 3 | ||||
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 1c9d9cf376f1..5d794357f473 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -1105,7 +1105,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> final boolean isOnCall = Utils.isAudioModeOngoingCall(mContext); if ((mIsActiveDeviceHearingAid) || (mIsActiveDeviceHeadset && isOnCall) - || (mIsActiveDeviceA2dp && !isOnCall)) { + || (mIsActiveDeviceA2dp && !isOnCall) + || mIsActiveDeviceLeAudio) { if (isTwsBatteryAvailable(leftBattery, rightBattery) && !shortSummary) { stringRes = R.string.bluetooth_active_battery_level_untethered; } else if (batteryLevelPercentageString != null && !shortSummary) { diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java index e203cbaa3da5..19df1e9c0730 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java @@ -246,6 +246,13 @@ public class LeAudioProfile implements LocalBluetoothProfile { return R.drawable.ic_bt_le_audio; } + public int getAudioLocation(BluetoothDevice device) { + if (mService == null || device == null) { + return BluetoothLeAudio.AUDIO_LOCATION_INVALID; + } + return mService.getAudioLocation(device); + } + @RequiresApi(Build.VERSION_CODES.S) protected void finalize() { if (DEBUG) { |