summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/wifi
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-05-30 11:33:36 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2013-05-30 11:33:36 -0700
commit5ac904321d81a0a0b7892c5722c464dc3c693f9f (patch)
treee8f08b0583a876b8968365364b0a896bed1cb259 /src/com/android/settings/wifi
parent1182f6755f17753f5b551ea40c11c263801a90c1 (diff)
downloadpackages_apps_Settings-5ac904321d81a0a0b7892c5722c464dc3c693f9f.tar.gz
packages_apps_Settings-5ac904321d81a0a0b7892c5722c464dc3c693f9f.tar.bz2
packages_apps_Settings-5ac904321d81a0a0b7892c5722c464dc3c693f9f.zip
Don't show scan-always text if it is off.
bug:9206410 Change-Id: If7e06f50d3d8db6ea198f437d4d268e65ec96c16
Diffstat (limited to 'src/com/android/settings/wifi')
-rw-r--r--src/com/android/settings/wifi/WifiSettings.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 82d15e53e..cb35e10c1 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -743,16 +743,19 @@ public class WifiSettings extends SettingsPreferenceFragment
private void setOffMessage() {
if (mEmptyView != null) {
mEmptyView.setText(R.string.wifi_empty_list_wifi_off);
- mEmptyView.append("\n\n");
- int resId;
- if (Settings.Secure.isLocationProviderEnabled(getActivity().getContentResolver(),
- LocationManager.NETWORK_PROVIDER)) {
- resId = R.string.wifi_scan_notify_text_location_on;
- } else {
- resId = R.string.wifi_scan_notify_text_location_off;
+ if (Settings.Global.getInt(getActivity().getContentResolver(),
+ Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1) {
+ mEmptyView.append("\n\n");
+ int resId;
+ if (Settings.Secure.isLocationProviderEnabled(getActivity().getContentResolver(),
+ LocationManager.NETWORK_PROVIDER)) {
+ resId = R.string.wifi_scan_notify_text_location_on;
+ } else {
+ resId = R.string.wifi_scan_notify_text_location_off;
+ }
+ CharSequence charSeq = getText(resId);
+ mEmptyView.append(charSeq);
}
- CharSequence charSeq = getText(resId);
- mEmptyView.append(charSeq);
}
getPreferenceScreen().removeAll();
}