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:
@@ -326,16 +326,16 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
||||
lifecycle));
|
||||
controllers.add(new BluetoothDetailsPairOtherController(context, this, mCachedDevice,
|
||||
lifecycle));
|
||||
// Don't need to show hearing device again when launched from the same page.
|
||||
if (!isLaunchFromHearingDevicePage()) {
|
||||
controllers.add(new BluetoothDetailsHearingDeviceControlsController(context, this,
|
||||
mCachedDevice, lifecycle));
|
||||
}
|
||||
controllers.add(new BluetoothDetailsDataSyncController(context, this,
|
||||
mCachedDevice, lifecycle));
|
||||
controllers.add(
|
||||
new BluetoothDetailsExtraOptionsController(
|
||||
context, this, mCachedDevice, lifecycle));
|
||||
controllers.add(new BluetoothDetailsDataSyncController(context, this, mCachedDevice,
|
||||
lifecycle));
|
||||
controllers.add(new BluetoothDetailsExtraOptionsController(context, this, mCachedDevice,
|
||||
lifecycle));
|
||||
BluetoothDetailsHearingDeviceController hearingDeviceController =
|
||||
new BluetoothDetailsHearingDeviceController(context, this, mCachedDevice,
|
||||
lifecycle);
|
||||
controllers.add(hearingDeviceController);
|
||||
hearingDeviceController.initSubControllers(isLaunchFromHearingDevicePage());
|
||||
controllers.addAll(hearingDeviceController.getSubControllers());
|
||||
}
|
||||
return controllers;
|
||||
}
|
||||
|
Reference in New Issue
Block a user