Don't show scan-always text if it is off.
bug:9206410 Change-Id: If7e06f50d3d8db6ea198f437d4d268e65ec96c16
This commit is contained in:
@@ -743,6 +743,8 @@ public class WifiSettings extends SettingsPreferenceFragment
|
|||||||
private void setOffMessage() {
|
private void setOffMessage() {
|
||||||
if (mEmptyView != null) {
|
if (mEmptyView != null) {
|
||||||
mEmptyView.setText(R.string.wifi_empty_list_wifi_off);
|
mEmptyView.setText(R.string.wifi_empty_list_wifi_off);
|
||||||
|
if (Settings.Global.getInt(getActivity().getContentResolver(),
|
||||||
|
Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1) {
|
||||||
mEmptyView.append("\n\n");
|
mEmptyView.append("\n\n");
|
||||||
int resId;
|
int resId;
|
||||||
if (Settings.Secure.isLocationProviderEnabled(getActivity().getContentResolver(),
|
if (Settings.Secure.isLocationProviderEnabled(getActivity().getContentResolver(),
|
||||||
@@ -754,6 +756,7 @@ public class WifiSettings extends SettingsPreferenceFragment
|
|||||||
CharSequence charSeq = getText(resId);
|
CharSequence charSeq = getText(resId);
|
||||||
mEmptyView.append(charSeq);
|
mEmptyView.append(charSeq);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
getPreferenceScreen().removeAll();
|
getPreferenceScreen().removeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user