Selects presets in device details page (1/2)

Enables users to select their presets in Bluetooth device details page if the device supports HAP.

This CL only contains the UI elements. The full functionality will be introduce in the next CL.

Bug: 300015207
Test: atest BluetoothDetailsHearingDeviceControllerTest
Test: atest BluetoothDetailsHearingAidsPresetsControllerTest
Change-Id: I1ab4781191b0c9e1033a29c30ca61671878bb7e1
This commit is contained in:
Angela Wang
2024-02-27 13:41:56 +00:00
parent 4af270b231
commit 82e4ed3bd1
7 changed files with 403 additions and 6 deletions

View File

@@ -17,6 +17,7 @@
package com.android.settings.bluetooth;
import static com.android.settings.bluetooth.BluetoothDetailsHearingDeviceController.KEY_HEARING_DEVICE_GROUP;
import static com.android.settings.bluetooth.BluetoothDetailsHearingDeviceController.ORDER_HEARING_DEVICE_SETTINGS;
import android.content.Context;
import android.text.TextUtils;
@@ -87,6 +88,7 @@ public class BluetoothDetailsHearingDeviceSettingsController extends BluetoothDe
private Preference createHearingDeviceSettingsPreference(Context context) {
final ArrowPreference preference = new ArrowPreference(context);
preference.setKey(KEY_HEARING_DEVICE_SETTINGS);
preference.setOrder(ORDER_HEARING_DEVICE_SETTINGS);
preference.setTitle(context.getString(R.string.bluetooth_hearing_device_settings_title));
preference.setSummary(
context.getString(R.string.bluetooth_hearing_device_settings_summary));