Show LE audio toggle summary as default connection is classic

Bug: 310092817
Test: manual test
Change-Id: I733650a129dcbc9ab3acbb758c5a619359e25e4e
This commit is contained in:
Alice Kuo
2023-11-13 17:24:22 +08:00
parent 129919def7
commit 24ef70212d

View File

@@ -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;