Add LE Audio feature switcher in the developer option menu

Add a switcher to enable/disable LE audio feature. The switcher could be
enabled by setprop ro.bluetooth.leaudio_offload.supported=true

screenshot: https://screenshot.googleplex.com/6aGP664S9PX5EMS

Bug: 233018305
Bug: 233005340
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Test: switch LE audio feature, and check LE audio functionality status
Change-Id: I8adcf27edd1438df445d32fca93f35ff5020a3b3
Merged-In: I8adcf27edd1438df445d32fca93f35ff5020a3b3
(cherry picked from commit 0d11fd07e7)
This commit is contained in:
Alice Kuo
2022-05-25 13:49:59 +08:00
parent 791bb4e948
commit 948b7cb959
10 changed files with 279 additions and 38 deletions

View File

@@ -353,6 +353,11 @@
<!-- UI debug setting: Disable Bluetooth hardware offload [CHAR LIMIT=none] -->
<string name="bluetooth_disable_hw_offload_dialog_cancel">Cancel</string>
<!-- Setting Checkbox title for enabling Bluetooth LE Audio feature. [CHAR LIMIT=40] -->
<string name="bluetooth_enable_leaudio">Enable LE Audio</string>
<!-- Summary of checkbox for enabling Bluetooth le audio [CHAR LIMIT=none]-->
<string name="bluetooth_enable_leaudio_summary">Enables the Bluetooth LE Audio feature if this device supports LE audio hardware capabilities.</string>
<!-- Title for Bluetooth device group with media capability group [CHAR LIMIT=none]-->
<string name="connected_device_media_device_title">Media devices</string>
<!-- Title for Bluetooth device group with media capability group [CHAR LIMIT=none]-->

View File

@@ -319,6 +319,11 @@
android:title="@string/bluetooth_disable_absolute_volume"
android:summary="@string/bluetooth_disable_absolute_volume_summary" />
<SwitchPreference
android:key="bluetooth_enable_leaudio"
android:title="@string/bluetooth_enable_leaudio"
android:summary="@string/bluetooth_enable_leaudio_summary" />
<SwitchPreference
android:key="bluetooth_disable_a2dp_hw_offload"
android:title="@string/bluetooth_disable_a2dp_hw_offload" />