Search in sources :

Example 1 with WifiMasterSwitchPreferenceController

use of com.android.settings.wifi.WifiMasterSwitchPreferenceController in project android_packages_apps_Settings by LineageOS.

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;
}
Also used : WifiMasterSwitchPreferenceController(com.android.settings.wifi.WifiMasterSwitchPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList)

Example 2 with WifiMasterSwitchPreferenceController

use of com.android.settings.wifi.WifiMasterSwitchPreferenceController in project android_packages_apps_Settings by crdroidandroid.

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;
}
Also used : WifiMasterSwitchPreferenceController(com.android.settings.wifi.WifiMasterSwitchPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList)

Example 3 with WifiMasterSwitchPreferenceController

use of com.android.settings.wifi.WifiMasterSwitchPreferenceController in project android_packages_apps_Settings by SudaMod.

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;
}
Also used : WifiMasterSwitchPreferenceController(com.android.settings.wifi.WifiMasterSwitchPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList)

Example 4 with WifiMasterSwitchPreferenceController

use of com.android.settings.wifi.WifiMasterSwitchPreferenceController in project platform_packages_apps_Settings by BlissRoms.

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;
}
Also used : WifiMasterSwitchPreferenceController(com.android.settings.wifi.WifiMasterSwitchPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList)

Example 5 with WifiMasterSwitchPreferenceController

use of com.android.settings.wifi.WifiMasterSwitchPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class NetworkDashboardFragment method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle, MetricsFeatureProvider metricsFeatureProvider, Fragment fragment, MobilePlanPreferenceHost mobilePlanHost) {
    final MobilePlanPreferenceController mobilePlanPreferenceController = new MobilePlanPreferenceController(context, mobilePlanHost);
    final WifiMasterSwitchPreferenceController wifiPreferenceController = new WifiMasterSwitchPreferenceController(context, metricsFeatureProvider);
    MobileNetworkPreferenceController mobileNetworkPreferenceController = null;
    if (!FeatureFlagPersistent.isEnabled(context, FeatureFlags.NETWORK_INTERNET_V2)) {
        mobileNetworkPreferenceController = new MobileNetworkPreferenceController(context);
    }
    final VpnPreferenceController vpnPreferenceController = new VpnPreferenceController(context);
    final PrivateDnsPreferenceController privateDnsPreferenceController = new PrivateDnsPreferenceController(context);
    if (lifecycle != null) {
        lifecycle.addObserver(mobilePlanPreferenceController);
        lifecycle.addObserver(wifiPreferenceController);
        if (mobileNetworkPreferenceController != null) {
            lifecycle.addObserver(mobileNetworkPreferenceController);
        }
        lifecycle.addObserver(vpnPreferenceController);
        lifecycle.addObserver(privateDnsPreferenceController);
    }
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    if (FeatureFlagPersistent.isEnabled(context, FeatureFlags.NETWORK_INTERNET_V2)) {
        controllers.add(new MobileNetworkSummaryController(context, lifecycle));
    }
    if (mobileNetworkPreferenceController != null) {
        controllers.add(mobileNetworkPreferenceController);
    }
    controllers.add(new TetherPreferenceController(context, lifecycle));
    controllers.add(vpnPreferenceController);
    controllers.add(new ProxyPreferenceController(context));
    controllers.add(mobilePlanPreferenceController);
    controllers.add(wifiPreferenceController);
    controllers.add(privateDnsPreferenceController);
    return controllers;
}
Also used : WifiMasterSwitchPreferenceController(com.android.settings.wifi.WifiMasterSwitchPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList)

Aggregations

WifiMasterSwitchPreferenceController (com.android.settings.wifi.WifiMasterSwitchPreferenceController)6 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)6 ArrayList (java.util.ArrayList)6