use of com.android.settings.wifi.WifiMasterSwitchPreferenceController in project android_packages_apps_Settings by DirtyUnicorns.
the class NetworkDashboardFragment method buildPreferenceControllers.
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle, MetricsFeatureProvider metricsFeatureProvider, Fragment fragment, MobilePlanPreferenceHost mobilePlanHost) {
final AirplaneModePreferenceController airplaneModePreferenceController = new AirplaneModePreferenceController(context, fragment);
final MobilePlanPreferenceController mobilePlanPreferenceController = new MobilePlanPreferenceController(context, mobilePlanHost);
final WifiMasterSwitchPreferenceController wifiPreferenceController = new WifiMasterSwitchPreferenceController(context, metricsFeatureProvider);
final MobileNetworkPreferenceController mobileNetworkPreferenceController = new MobileNetworkPreferenceController(context);
final VpnPreferenceController vpnPreferenceController = new VpnPreferenceController(context);
if (lifecycle != null) {
lifecycle.addObserver(airplaneModePreferenceController);
lifecycle.addObserver(mobilePlanPreferenceController);
lifecycle.addObserver(wifiPreferenceController);
lifecycle.addObserver(mobileNetworkPreferenceController);
lifecycle.addObserver(vpnPreferenceController);
}
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(airplaneModePreferenceController);
controllers.add(mobileNetworkPreferenceController);
controllers.add(new TetherPreferenceController(context, lifecycle));
controllers.add(vpnPreferenceController);
controllers.add(new ProxyPreferenceController(context));
controllers.add(mobilePlanPreferenceController);
controllers.add(wifiPreferenceController);
return controllers;
}
Aggregations