Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6721a2cf authored by Patty Huang's avatar Patty Huang
Browse files

Change the toggle from "Enable LE audio" to "Disable LE audio"

- Adopt system property persist.bluetooth.leaudio_switcher.disabled
  to check the developer option toggle status

Bug: 275388899
Test: atest BluetoothInstrumentationTests
Test: Manual, switch LE audio toggle in developer option, and check LE audio functionality status
Change-Id: Idd14bcb89b4370853d674acab0855848ffd762f8
parent 6acb7d19
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -69,8 +69,8 @@ public class Config {
            "ro.bluetooth.leaudio_switcher.supported";
    private static final String LE_AUDIO_BROADCAST_DYNAMIC_SWITCH_PROPERTY =
            "ro.bluetooth.leaudio_broadcast_switcher.supported";
    private static final String LE_AUDIO_DYNAMIC_ENABLED_PROPERTY =
            "persist.bluetooth.leaudio_switcher.enabled";
    private static final String LE_AUDIO_SWITCHER_DISABLED_PROPERTY =
            "persist.bluetooth.leaudio_switcher.disabled";

    private static final Set<String> PERSISTENT_FLAGS = Set.of(
            FEATURE_HEARING_AID,
@@ -184,12 +184,12 @@ public class Config {
                SystemProperties.getBoolean(LE_AUDIO_DYNAMIC_SWITCH_PROPERTY, false);

        if (leAudioDynamicSwitchSupported) {
            final String leAudioDynamicEnabled = SystemProperties
                    .get(LE_AUDIO_DYNAMIC_ENABLED_PROPERTY, "none");
            if (leAudioDynamicEnabled.equals("true")) {
                setLeAudioProfileStatus(true);
            } else if (leAudioDynamicEnabled.equals("false")) {
            final String leAudioSwitcherDisabled = SystemProperties
                    .get(LE_AUDIO_SWITCHER_DISABLED_PROPERTY, "none");
            if (leAudioSwitcherDisabled.equals("true")) {
                setLeAudioProfileStatus(false);
            } else if (leAudioSwitcherDisabled.equals("false")) {
                setLeAudioProfileStatus(true);
            }
        }