[Ambient Volume] UI of volume sliders in Settings

Collapse/expand the controls when clicking on the hearder with arrow.

Flag: com.android.settingslib.flags.hearing_devices_ambient_volume_control
Bug: 357878944
Test: atest AmbientVolumePreferenceTest
Test: atest BluetoothDetailsAmbientVolumePreferenceControllerTest
Test: atest BluetoothDetailsHearingDeviceControllerTest

Change-Id: I845a4397601e563ed027d7d2a0a13651e95de708
This commit is contained in:
Angela Wang
2024-10-31 05:22:46 +00:00
parent 0ca6d53458
commit 0595aed386
8 changed files with 761 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ public class BluetoothDetailsHearingDeviceController extends BluetoothDetailsCon
public static final int ORDER_HEARING_DEVICE_SETTINGS = 1;
public static final int ORDER_HEARING_AIDS_PRESETS = 2;
public static final int ORDER_AMBIENT_VOLUME = 4;
static final String KEY_HEARING_DEVICE_GROUP = "hearing_device_group";
private final List<BluetoothDetailsController> mControllers = new ArrayList<>();
@@ -107,6 +108,10 @@ public class BluetoothDetailsHearingDeviceController extends BluetoothDetailsCon
mControllers.add(new BluetoothDetailsHearingAidsPresetsController(mContext, mFragment,
mManager, mCachedDevice, mLifecycle));
}
if (com.android.settingslib.flags.Flags.hearingDevicesAmbientVolumeControl()) {
mControllers.add(new BluetoothDetailsAmbientVolumePreferenceController(mContext,
mFragment, mCachedDevice, mLifecycle));
}
}
@NonNull