From 24ef70212d2aa49414ad21b01747975c369469a2 Mon Sep 17 00:00:00 2001 From: Alice Kuo Date: Mon, 13 Nov 2023 17:24:22 +0800 Subject: [PATCH] Show LE audio toggle summary as default connection is classic Bug: 310092817 Test: manual test Change-Id: I733650a129dcbc9ab3acbb758c5a619359e25e4e --- .../bluetooth/BluetoothDetailsProfilesController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java index 73857f2c2a7..a3dace6f6a0 100644 --- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java @@ -126,9 +126,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll pref.setOnPreferenceClickListener(this); pref.setOrder(profile.getOrdinal()); - if (profile instanceof LeAudioProfile && !isModelNameInAllowList( + boolean isLeEnabledByDefault = + SystemProperties.getBoolean(LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY, true); + + if (profile instanceof LeAudioProfile && (!isLeEnabledByDefault || !isModelNameInAllowList( BluetoothUtils.getStringMetaData(mCachedDevice.getDevice(), - METADATA_MODEL_NAME))) { + METADATA_MODEL_NAME)))) { pref.setSummary(R.string.device_details_leaudio_toggle_summary); } return pref;