Separate category controller out of HearingDeviceControlsController
We're going to add more different device controls (such as hearing aids presets, volume offset controls or microphone volume controls) into "device_controls_general" PreferenceCategory. It's better to keep the category controller separated from the child controller to better maintain the visibility of the whole category and have a clearer stucture of these controllers. Bug: 300015207 Test: atest BluetoothDetailsHearingDeviceControllerTest Test: atest BluetoothDetailsHearingDeviceSettingsControllerTest Test: atest BluetoothDeviceDetailsFragmentTest Change-Id: I7f35b02a1120aefa8307e500f7abfce3b8055fbf
This commit is contained in:
@@ -18,7 +18,7 @@ package com.android.settings.bluetooth;
|
||||
|
||||
import static android.bluetooth.BluetoothDevice.BOND_NONE;
|
||||
|
||||
import static com.android.settings.bluetooth.BluetoothDetailsHearingDeviceControlsController.KEY_DEVICE_CONTROLS_GENERAL_GROUP;
|
||||
import static com.android.settings.bluetooth.BluetoothDetailsHearingDeviceSettingsController.KEY_HEARING_DEVICE_SETTINGS;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -237,7 +237,7 @@ public class BluetoothDeviceDetailsFragmentTest {
|
||||
|
||||
assertThat(controllerList.stream()
|
||||
.anyMatch(controller -> controller.getPreferenceKey().equals(
|
||||
KEY_DEVICE_CONTROLS_GENERAL_GROUP))).isFalse();
|
||||
KEY_HEARING_DEVICE_SETTINGS))).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -253,7 +253,7 @@ public class BluetoothDeviceDetailsFragmentTest {
|
||||
|
||||
assertThat(controllerList.stream()
|
||||
.anyMatch(controller -> controller.getPreferenceKey().equals(
|
||||
KEY_DEVICE_CONTROLS_GENERAL_GROUP))).isTrue();
|
||||
KEY_HEARING_DEVICE_SETTINGS))).isTrue();
|
||||
}
|
||||
|
||||
private InputDevice createInputDeviceWithMatchingBluetoothAddress() {
|
||||
|
Reference in New Issue
Block a user