From 627a584f39ce1d5bac4a5e41d682a4db848e5789 Mon Sep 17 00:00:00 2001 From: Patty Huang Date: Tue, 4 Jul 2023 17:54:00 +0800 Subject: [PATCH] Do not show LE audio toggle in Device Detail by default Bug: 289884263 Bug: 289957406 Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest Test: Checks the LE Audio toggle is not shown in Device Detail by default Change-Id: I2c6430c791dd852d238d7122a72f218f395c4a0b --- .../bluetooth/BluetoothDetailsProfilesController.java | 4 +++- .../BluetoothLeAudioDeviceDetailsPreferenceController.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java index 701967bfb5e..3472e3940ce 100644 --- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java @@ -69,6 +69,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll private static final String ENABLE_DUAL_MODE_AUDIO = "persist.bluetooth.enable_dual_mode_audio"; private static final String CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT = "le_audio_enabled_by_default"; + private static final boolean LE_AUDIO_DEVICE_DETAIL_DEFAULT_VALUE = false; private LocalBluetoothManager mManager; private LocalBluetoothProfileManager mProfileManager; @@ -444,7 +445,8 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll SettingsUIDeviceConfig.BT_LE_AUDIO_CONTACT_SHARING_ENABLED, true); boolean isLeDeviceDetailEnabled = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_SETTINGS_UI, - SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, true); + SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, + LE_AUDIO_DEVICE_DETAIL_DEFAULT_VALUE); boolean isLeEnabledByDefault = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT, false); mIsLeAudioToggleEnabled = isLeDeviceDetailEnabled || isLeEnabledByDefault; diff --git a/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java b/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java index 298ced091a9..9545728d87e 100644 --- a/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java +++ b/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java @@ -40,7 +40,7 @@ public class BluetoothLeAudioDeviceDetailsPreferenceController private static final String PREFERENCE_KEY = "bluetooth_show_leaudio_device_details"; private static final String CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT = "le_audio_enabled_by_default"; - private static final boolean LE_AUDIO_DEVICE_DETAIL_DEFAULT_VALUE = true; + private static final boolean LE_AUDIO_DEVICE_DETAIL_DEFAULT_VALUE = false; static int sLeAudioSupportedStateCache = BluetoothStatusCodes.ERROR_UNKNOWN; @VisibleForTesting