[hearing devices page][Audio routing] Add feature flag to control visibility of the hearing device controls and audio output

* Setup basic xml for hearing device controls and audio output in bluetooth detail device page.
* Use same PreferenceCategory with spatial audio and rename to
  `feature_controls_group`

Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsHearingDeviceControlsControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsAudioRoutingControllerTest
Change-Id: Ibe71757b53b9d65c6ab6efa1053d035e78882b68
This commit is contained in:
jasonwshsu
2022-12-07 03:12:08 +08:00
committed by Jason Hsu
parent ad41a194a3
commit a7d5801d28
7 changed files with 311 additions and 4 deletions

View File

@@ -63,6 +63,11 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
public static final String KEY_DEVICE_ADDRESS = "device_address";
private static final String TAG = "BTDeviceDetailsFrg";
static final int FEATURE_HEARING_DEVICE_CONTROLS_ORDER = 1;
static final int FEATURE_AUDIO_ROUTING_ORDER = 2;
static final int FEATURE_SPATIAL_AUDIO_ORDER = 3;
static final int FEATURE_HEAD_TRACKING_ORDER = 4;
@VisibleForTesting
static int EDIT_DEVICE_NAME_ITEM_ID = Menu.FIRST;
@@ -312,6 +317,10 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
lifecycle));
controllers.add(new BluetoothDetailsPairOtherController(context, this, mCachedDevice,
lifecycle));
controllers.add(new BluetoothDetailsHearingDeviceControlsController(context, this,
mCachedDevice, lifecycle));
controllers.add(new BluetoothDetailsAudioRoutingController(context, this, mCachedDevice,
lifecycle));
}
return controllers;
}