Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a532e7d authored by nadlabak's avatar nadlabak Committed by Gerrit Code Review
Browse files

Revert "wifi: forward port avoid poor connection setting"

This reverts commit d77990f4.

Change-Id: I0987d8eb9e8e6c7730f0576f174b61115973d5fb
parent d67600a4
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -38,13 +38,6 @@
            android:dialogTitle="@string/wifi_select_assistant_dialog_title"
            android:persistent="false" />

    <!-- android:dependency="enable_wifi" -->
    <SwitchPreference
            android:key="wifi_poor_network_detection"
            android:title="@string/wifi_poor_network_detection"
            android:summary="@string/wifi_poor_network_detection_summary"
            android:persistent="false" />

    <ListPreference
            android:key="frequency_band"
            android:title="@string/wifi_setting_frequency_band_title"
+0 −18
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
    private static final String KEY_COUNTRY_CODE = "wifi_countrycode";
    private static final String KEY_NOTIFY_OPEN_NETWORKS = "notify_open_networks";
    private static final String KEY_SLEEP_POLICY = "sleep_policy";
    private static final String KEY_POOR_NETWORK_DETECTION = "wifi_poor_network_detection";
    private static final String KEY_INSTALL_CREDENTIALS = "install_credentials";
    private static final String KEY_WIFI_ASSISTANT = "wifi_assistant";
    private static final String KEY_WIFI_DIRECT = "wifi_direct";
@@ -135,19 +134,6 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
                Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0) == 1);
        notifyOpenNetworks.setEnabled(mWifiManager.isWifiEnabled());

        SwitchPreference poorNetworkDetection =
            (SwitchPreference) findPreference(KEY_POOR_NETWORK_DETECTION);
        if (poorNetworkDetection != null) {
            if (Utils.isWifiOnly(getActivity())) {
                getPreferenceScreen().removePreference(poorNetworkDetection);
            } else {
                poorNetworkDetection.setChecked(Settings.Global.getInt(getContentResolver(),
                        Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED,
                        WifiManager.DEFAULT_POOR_NETWORK_AVOIDANCE_ENABLED ?
                        1 : 0) == 1);
            }
        }

        Intent intent = new Intent(Credentials.INSTALL_AS_USER_ACTION);
        intent.setClassName("com.android.certinstaller",
                "com.android.certinstaller.CertInstallerMain");
@@ -289,10 +275,6 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
            Global.putInt(getContentResolver(),
                    Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
                    ((SwitchPreference) preference).isChecked() ? 1 : 0);
        } else if (KEY_POOR_NETWORK_DETECTION.equals(key)) {
            Global.putInt(getContentResolver(),
                    Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED,
                    ((SwitchPreference) preference).isChecked() ? 1 : 0);
        } else {
            return super.onPreferenceTreeClick(screen, preference);
        }