summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-19 13:11:40 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-06-19 13:11:40 -0700
commit3cb2205eee99cf271686df62795f445d5b853fbd (patch)
tree716d65f097fe155fde3d48403914238ffa118226 /src/com/android
parentf67de7e86ff0b712e6a1dd833b7fb7375921d698 (diff)
parent4226b0af53a8f300b347836199bd03018489d192 (diff)
downloadpackages_apps_settings-3cb2205eee99cf271686df62795f445d5b853fbd.zip
packages_apps_settings-3cb2205eee99cf271686df62795f445d5b853fbd.tar.gz
packages_apps_settings-3cb2205eee99cf271686df62795f445d5b853fbd.tar.bz2
am 4226b0af: Merge change 4797 into donut
Merge commit '4226b0af53a8f300b347836199bd03018489d192' * commit '4226b0af53a8f300b347836199bd03018489d192': Use new location of USE_LOCATION_FOR_SERVICES setting (Secure).
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/settings/SecuritySettings.java29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 41b4148..c17e2a0 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -288,26 +288,7 @@ public class SecuritySettings extends PreferenceActivity implements
if (force) {
mUseLocation.setChecked(true);
}
- /*
- Resources res = getResources();
- CharSequence msg = new SpannableString(
- res.getText(R.string.use_location_warning_message));
- SpannableString spannable = (SpannableString) msg;
- Annotation[] spans = spannable.getSpans(0, spannable.length(), Annotation.class);
- if (spans != null && spans.length > 0) {
- SpannableStringBuilder builder = new SpannableStringBuilder(spannable);
- int start = spannable.getSpanStart(spans[0]);
- int end = spannable.getSpanEnd(spans[0]);
- ClickableSpan link = new ClickableSpan() {
- @Override
- public void onClick(View view) {
- showPrivacyPolicy();
- }
- };
- builder.setSpan(link, start, end, spannable.getSpanFlags(link));
- msg = builder;
- }
- */
+
CharSequence msg = getResources().getText(R.string.use_location_warning_message);
mUseLocationDialog = new AlertDialog.Builder(this).setMessage(msg)
.setTitle(R.string.use_location_title)
@@ -329,8 +310,8 @@ public class SecuritySettings extends PreferenceActivity implements
res, LocationManager.NETWORK_PROVIDER));
mGps.setChecked(Settings.Secure.isLocationProviderEnabled(
res, LocationManager.GPS_PROVIDER));
- mUseLocation.setChecked(Settings.Gservices.getInt(res,
- Settings.Gservices.USE_LOCATION_FOR_SERVICES, 2) == 1);
+ mUseLocation.setChecked(Settings.Secure.getInt(res,
+ Settings.Secure.USE_LOCATION_FOR_SERVICES, 2) == 1);
}
private boolean isToggled(Preference pref) {
@@ -339,8 +320,8 @@ public class SecuritySettings extends PreferenceActivity implements
private void updateUseLocation() {
boolean use = mUseLocation.isChecked();
- Settings.Gservices.putString(getContentResolver(),
- Settings.Gservices.USE_LOCATION_FOR_SERVICES, use ? "1" : "0");
+ Settings.Secure.putInt(getContentResolver(),
+ Settings.Secure.USE_LOCATION_FOR_SERVICES, use ? 1 : 0);
}