Use the new isNetworkSupported api for wifi-only

Didn't have an API for this before so people used a hacked system property (ro.carrier)
to determine if the device supported mobile data.  Added new API and switching callsites.

bug:5087537
Change-Id: Ibd799559be102a9e2fd552d1a23d1afbcf8f4614
This commit is contained in:
Robert Greenwalt
2011-08-31 11:17:47 -07:00
parent ca6d987a87
commit 8af88fb838
9 changed files with 14 additions and 12 deletions

View File

@@ -97,7 +97,7 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
ListPreference sleepPolicyPref = (ListPreference) findPreference(KEY_SLEEP_POLICY);
if (sleepPolicyPref != null) {
if (Utils.isWifiOnly()) {
if (Utils.isWifiOnly(getActivity())) {
sleepPolicyPref.setEntries(R.array.wifi_sleep_policy_entries_wifi_only);
sleepPolicyPref.setSummary(R.string.wifi_setting_sleep_policy_summary_wifi_only);
}