Merge "Do not show LE audio toggle in Device Detail by default" into udc-d1-dev am: 1f9f114495 am: 20b82c3646

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23898723

Change-Id: I302b91cd8502cca57a28e74cbbf72cf962d6468f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-07-07 11:21:28 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 2 deletions

View File

@@ -69,6 +69,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
private static final String ENABLE_DUAL_MODE_AUDIO = private static final String ENABLE_DUAL_MODE_AUDIO =
"persist.bluetooth.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 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 LocalBluetoothManager mManager;
private LocalBluetoothProfileManager mProfileManager; private LocalBluetoothProfileManager mProfileManager;
@@ -440,7 +441,8 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
SettingsUIDeviceConfig.BT_LE_AUDIO_CONTACT_SHARING_ENABLED, true); SettingsUIDeviceConfig.BT_LE_AUDIO_CONTACT_SHARING_ENABLED, true);
boolean isLeDeviceDetailEnabled = DeviceConfig.getBoolean( boolean isLeDeviceDetailEnabled = DeviceConfig.getBoolean(
DeviceConfig.NAMESPACE_SETTINGS_UI, 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, boolean isLeEnabledByDefault = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH,
CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT, false); CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT, false);
mIsLeAudioToggleEnabled = isLeDeviceDetailEnabled || isLeEnabledByDefault; mIsLeAudioToggleEnabled = isLeDeviceDetailEnabled || isLeEnabledByDefault;

View File

@@ -40,7 +40,7 @@ public class BluetoothLeAudioDeviceDetailsPreferenceController
private static final String PREFERENCE_KEY = "bluetooth_show_leaudio_device_details"; 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 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; static int sLeAudioSupportedStateCache = BluetoothStatusCodes.ERROR_UNKNOWN;
@VisibleForTesting @VisibleForTesting