diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java index 724947c2fd6..aaedebd7634 100644 --- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java @@ -99,7 +99,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll mIsLeContactSharingEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI, SettingsUIDeviceConfig.BT_LE_AUDIO_CONTACT_SHARING_ENABLED, true); mIsLeAudioToggleEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI, - SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, false) + SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, true) || DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT, false); // Call refresh here even though it will get called later in onResume, to avoid the diff --git a/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java b/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java index a54c594c84d..298ced091a9 100644 --- a/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java +++ b/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java @@ -40,6 +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; static int sLeAudioSupportedStateCache = BluetoothStatusCodes.ERROR_UNKNOWN; @VisibleForTesting @@ -75,7 +76,7 @@ public class BluetoothLeAudioDeviceDetailsPreferenceController DeviceConfig.setProperty( DeviceConfig.NAMESPACE_SETTINGS_UI, SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, - isEnabled ? "true" : "false", false); + isEnabled ? "true" : "false", LE_AUDIO_DEVICE_DETAIL_DEFAULT_VALUE); return true; } @@ -87,7 +88,8 @@ public class BluetoothLeAudioDeviceDetailsPreferenceController final boolean leAudioDeviceDetailEnabled = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_SETTINGS_UI, - SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, false); + SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, + LE_AUDIO_DEVICE_DETAIL_DEFAULT_VALUE); final boolean leAudioEnabledByDefault = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_BLUETOOTH, CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT, false); @@ -102,6 +104,7 @@ public class BluetoothLeAudioDeviceDetailsPreferenceController // Reset the toggle to null when the developer option is disabled DeviceConfig.setProperty( DeviceConfig.NAMESPACE_SETTINGS_UI, - SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, "null", false); + SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, "null", + LE_AUDIO_DEVICE_DETAIL_DEFAULT_VALUE); } }