Loading src/com/android/settings/DateTimeSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ public class DateTimeSettings extends SettingsPreferenceFragment mAutoTimeZonePref = (CheckBoxPreference) findPreference(KEY_AUTO_TIME_ZONE); // Override auto-timezone if it's a wifi-only device or if we're still in setup wizard. // TODO: Remove the wifiOnly test when auto-timezone is implemented based on wifi-location. if (Utils.isWifiOnly() || isFirstRun) { if (Utils.isWifiOnly(getActivity()) || isFirstRun) { getPreferenceScreen().removePreference(mAutoTimeZonePref); autoTimeZoneEnabled = false; } Loading src/com/android/settings/DeviceInfoSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment { PROPERTY_URL_SAFETYLEGAL); // Remove Baseband version if wifi-only device if (Utils.isWifiOnly()) { if (Utils.isWifiOnly(getActivity())) { getPreferenceScreen().removePreference(findPreference(KEY_BASEBAND_VERSION)); } Loading src/com/android/settings/LocationSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class LocationSettings extends SettingsPreferenceFragment } // Change the summary for wifi-only devices if (Utils.isWifiOnly()) { if (Utils.isWifiOnly(getActivity())) { mNetwork.setSummaryOn(R.string.location_neighborhood_level_wifi); } Loading src/com/android/settings/Utils.java +4 −2 Original line number Diff line number Diff line Loading @@ -290,8 +290,10 @@ public class Utils { return telephony != null && telephony.isVoiceCapable(); } public static boolean isWifiOnly() { return "wifi-only".equals(SystemProperties.get("ro.carrier")); public static boolean isWifiOnly(Context context) { ConnectivityManager cm = (ConnectivityManager)context.getSystemService( Context.CONNECTIVITY_SERVICE); return (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false); } /** Loading src/com/android/settings/WirelessSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class WirelessSettings extends SettingsPreferenceFragment { } // Remove Mobile Network Settings if it's a wifi-only device. if (Utils.isWifiOnly()) { if (Utils.isWifiOnly(getActivity())) { getPreferenceScreen().removePreference(findPreference(KEY_MOBILE_NETWORK_SETTINGS)); } Loading Loading
src/com/android/settings/DateTimeSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ public class DateTimeSettings extends SettingsPreferenceFragment mAutoTimeZonePref = (CheckBoxPreference) findPreference(KEY_AUTO_TIME_ZONE); // Override auto-timezone if it's a wifi-only device or if we're still in setup wizard. // TODO: Remove the wifiOnly test when auto-timezone is implemented based on wifi-location. if (Utils.isWifiOnly() || isFirstRun) { if (Utils.isWifiOnly(getActivity()) || isFirstRun) { getPreferenceScreen().removePreference(mAutoTimeZonePref); autoTimeZoneEnabled = false; } Loading
src/com/android/settings/DeviceInfoSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment { PROPERTY_URL_SAFETYLEGAL); // Remove Baseband version if wifi-only device if (Utils.isWifiOnly()) { if (Utils.isWifiOnly(getActivity())) { getPreferenceScreen().removePreference(findPreference(KEY_BASEBAND_VERSION)); } Loading
src/com/android/settings/LocationSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class LocationSettings extends SettingsPreferenceFragment } // Change the summary for wifi-only devices if (Utils.isWifiOnly()) { if (Utils.isWifiOnly(getActivity())) { mNetwork.setSummaryOn(R.string.location_neighborhood_level_wifi); } Loading
src/com/android/settings/Utils.java +4 −2 Original line number Diff line number Diff line Loading @@ -290,8 +290,10 @@ public class Utils { return telephony != null && telephony.isVoiceCapable(); } public static boolean isWifiOnly() { return "wifi-only".equals(SystemProperties.get("ro.carrier")); public static boolean isWifiOnly(Context context) { ConnectivityManager cm = (ConnectivityManager)context.getSystemService( Context.CONNECTIVITY_SERVICE); return (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false); } /** Loading
src/com/android/settings/WirelessSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class WirelessSettings extends SettingsPreferenceFragment { } // Remove Mobile Network Settings if it's a wifi-only device. if (Utils.isWifiOnly()) { if (Utils.isWifiOnly(getActivity())) { getPreferenceScreen().removePreference(findPreference(KEY_MOBILE_NETWORK_SETTINGS)); } Loading