Add developer options toggle for Bluetooth A2DP hardware offload

Bug: 63932139
Bug: 79568680
Test: robotests
Change-Id: I54943cb591be1bfed0cdfe7eebf90bad64ce13c7
This commit is contained in:
Chienyuan
2018-05-16 20:52:00 +08:00
committed by Petri Gynther
parent 68e531526c
commit ea14ef88ee
6 changed files with 265 additions and 1 deletions

View File

@@ -58,7 +58,8 @@ import java.util.List;
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFragment
implements SwitchBar.OnSwitchChangeListener, OemUnlockDialogHost, AdbDialogHost,
AdbClearKeysDialogHost, LogPersistDialogHost {
AdbClearKeysDialogHost, LogPersistDialogHost,
BluetoothA2dpHwOffloadRebootDialog.OnA2dpHwDialogConfirmedListener {
private static final String TAG = "DevSettingsDashboard";
@@ -271,6 +272,13 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
controller.onDisableLogPersistDialogRejected();
}
@Override
public void onA2dpHwDialogConfirmed() {
final BluetoothA2dpHwOffloadPreferenceController controller =
getDevelopmentOptionsController(BluetoothA2dpHwOffloadPreferenceController.class);
controller.onA2dpHwDialogConfirmed();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
boolean handledResult = false;
@@ -408,6 +416,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
controllers.add(new BluetoothDeviceNoNamePreferenceController(context));
controllers.add(new BluetoothAbsoluteVolumePreferenceController(context));
controllers.add(new BluetoothAvrcpVersionPreferenceController(context));
controllers.add(new BluetoothA2dpHwOffloadPreferenceController(context, fragment));
controllers.add(new BluetoothAudioCodecPreferenceController(context, lifecycle,
bluetoothA2dpConfigStore));
controllers.add(new BluetoothAudioSampleRatePreferenceController(context, lifecycle,