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
This commit is contained in:
Alice Kuo
2022-05-25 13:49:59 +08:00
parent ba69fd0d3f
commit 0d11fd07e7
10 changed files with 279 additions and 38 deletions

View File

@@ -59,7 +59,7 @@ public class BluetoothLeAudioHwOffloadPreferenceController
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
BluetoothHwOffloadRebootDialog.show(mFragment);
BluetoothRebootDialog.show(mFragment);
mChanged = true;
return false;
}
@@ -104,9 +104,9 @@ public class BluetoothLeAudioHwOffloadPreferenceController
}
/**
* Called when the HwOffloadDialog confirm is clicked.
* Called when the RebootDialog confirm is clicked.
*/
public void onHwOffloadDialogConfirmed() {
public void onRebootDialogConfirmed() {
if (!mChanged) {
return;
}
@@ -119,9 +119,9 @@ public class BluetoothLeAudioHwOffloadPreferenceController
}
/**
* Called when the HwOffloadDialog cancel is clicked.
* Called when the RebootDialog cancel is clicked.
*/
public void onHwOffloadDialogCanceled() {
public void onRebootDialogCanceled() {
mChanged = false;
}
}