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

Commit 5a790602 authored by Danesh M's avatar Danesh M Committed by Zhao Wei Liew
Browse files

Settings: Add overlay for hiding wifi region code

CYNGNOS-1637

Change-Id: Ieb1f6553a2addb17ec6b93b51ab8fb19f6c5ca49
parent fdc7f94b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -103,4 +103,7 @@

    <!-- Does the device allow updating the recovery. -->
    <bool name="config_enableRecoveryUpdater">true</bool>

    <!-- Enable/disable wifi region code preferences -->
    <bool name="config_hideWifiRegionCode">false</bool>
</resources>
+11 −5
Original line number Diff line number Diff line
@@ -199,6 +199,11 @@ public class AdvancedWifiSettings extends RestrictedSettingsFragment

        ListPreference ccodePref = (ListPreference) findPreference(KEY_COUNTRY_CODE);
        if (ccodePref != null) {
            boolean hideWifiRegion = getResources()
                    .getBoolean(R.bool.config_hideWifiRegionCode);
            if (hideWifiRegion) {
                removePreference(KEY_COUNTRY_CODE);
            } else {
                ccodePref.setOnPreferenceChangeListener(this);
                String value = mWifiManager.getCountryCode();
                if (value != null) {
@@ -207,6 +212,7 @@ public class AdvancedWifiSettings extends RestrictedSettingsFragment
                    Log.e(TAG, "Failed to fetch country code");
                }
            }
        }

        mAutoConnectEnablePref =
                (CheckBoxPreference) findPreference(KEY_AUTO_CONNECT_ENABLE);