summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
index 2fdf2ac0567b..ae9ad958b287 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
@@ -703,18 +703,18 @@ public class BluetoothUtils {
// However, app layer need to gate the feature based on whether the device has audio
// sharing capability regardless of the BT state.
// So here we check the BluetoothProperties when BT off.
- String mode = BluetoothProperties.le_audio_dynamic_switcher_mode().orElse("none");
- Set<String> disabledModes = ImmutableSet.of("disabled", "unicast");
+ //
+ // TODO: Also check SystemProperties "persist.bluetooth.leaudio_dynamic_switcher.mode"
+ // and return true if it is in broadcast mode.
+ // Now SystemUI don't have access to read the value.
int sourceSupportedCode = adapter.isLeAudioBroadcastSourceSupported();
int assistantSupportedCode = adapter.isLeAudioBroadcastAssistantSupported();
return (sourceSupportedCode == BluetoothStatusCodes.FEATURE_SUPPORTED
|| (sourceSupportedCode == BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED
- && BluetoothProperties.isProfileBapBroadcastSourceEnabled().orElse(false)
- && !disabledModes.contains(mode)))
+ && BluetoothProperties.isProfileBapBroadcastSourceEnabled().orElse(false)))
&& (assistantSupportedCode == BluetoothStatusCodes.FEATURE_SUPPORTED
|| (assistantSupportedCode == BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED
- && BluetoothProperties.isProfileBapBroadcastAssistEnabled().orElse(false)
- && !disabledModes.contains(mode)));
+ && BluetoothProperties.isProfileBapBroadcastAssistEnabled().orElse(false)));
} catch (IllegalStateException e) {
Log.d(TAG, "Fail to check isAudioSharingSupported, e = ", e);
return false;