Make bluetooth profile toggles configurable
BUG: 343317785 Test: atest BluetoothDetailsProfilesControllerTest Flag: com.android.settings.flags.enable_bluetooth_device_details_polish Change-Id: I5aea110f7a42ffee20a56dbd9d5621f44311cc66
This commit is contained in:
@@ -419,12 +419,16 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
||||
|
||||
@Override
|
||||
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
List<String> invisibleProfiles = List.of();
|
||||
if (Flags.enableBluetoothDeviceDetailsPolish()) {
|
||||
mFormatter =
|
||||
FeatureFactory.getFeatureFactory()
|
||||
.getBluetoothFeatureProvider()
|
||||
.getDeviceDetailsFragmentFormatter(
|
||||
requireContext(), this, mBluetoothAdapter, mCachedDevice);
|
||||
invisibleProfiles =
|
||||
mFormatter.getInvisibleBluetoothProfiles(
|
||||
FragmentTypeModel.DeviceDetailsMainFragment.INSTANCE);
|
||||
}
|
||||
ArrayList<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||
|
||||
@@ -444,7 +448,7 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
|
||||
controllers.add(new BluetoothDetailsSpatialAudioController(context, this, mCachedDevice,
|
||||
lifecycle));
|
||||
controllers.add(new BluetoothDetailsProfilesController(context, this, mManager,
|
||||
mCachedDevice, lifecycle));
|
||||
mCachedDevice, lifecycle, invisibleProfiles));
|
||||
controllers.add(new BluetoothDetailsMacAddressController(context, this, mCachedDevice,
|
||||
lifecycle));
|
||||
controllers.add(new StylusDevicesController(context, mInputDevice, mCachedDevice,
|
||||
|
||||
Reference in New Issue
Block a user