summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Liana Kazanova (xWF) <lkazanova@google.com> 2025-03-10 15:55:54 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-10 15:55:54 -0700
commit8faf21e62b99c200258514fc9f8ae79552151d14 (patch)
tree6b40ccda1f93fff9aee0062fbafb4ed25ac8fbad
parent7b594824c2e8d354521118f1099f476b33a62e87 (diff)
parentdb9d2cf9cb294ec2b7ac0b82f394480e3e487317 (diff)
Merge "Revert "[Audiosharing] Check le audio mode for feature availability"" into main
-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;