diff options
author | Tom O'Neill <tomo@google.com> | 2013-08-26 14:40:54 -0700 |
---|---|---|
committer | Tom O'Neill <tomo@google.com> | 2013-08-26 14:40:54 -0700 |
commit | 93259c14f3aca4739e2cf7691cb0416ded509d8d (patch) | |
tree | 83cf7eab2f74bb3c1ffe5ce1dc0929f205a79e77 /src/com/android/settings/location | |
parent | cbf589e73cd8b9a62c413c804b698e489f44c403 (diff) | |
download | packages_apps_Settings-93259c14f3aca4739e2cf7691cb0416ded509d8d.zip packages_apps_Settings-93259c14f3aca4739e2cf7691cb0416ded509d8d.tar.gz packages_apps_Settings-93259c14f3aca4739e2cf7691cb0416ded509d8d.tar.bz2 |
Switch to new location mode API recommended by API council
- Part of b/10461763 fix
Change-Id: I202ce4c817f24a1682796e92fed9cc3efcc31a81
Diffstat (limited to 'src/com/android/settings/location')
-rw-r--r-- | src/com/android/settings/location/LocationSettingsBase.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/settings/location/LocationSettingsBase.java b/src/com/android/settings/location/LocationSettingsBase.java index 415e343..5637b25 100644 --- a/src/com/android/settings/location/LocationSettingsBase.java +++ b/src/com/android/settings/location/LocationSettingsBase.java @@ -17,7 +17,6 @@ package com.android.settings.location; import android.content.ContentQueryMap; -import android.content.ContentResolver; import android.content.Context; import android.database.Cursor; import android.os.UserManager; @@ -79,13 +78,13 @@ public abstract class LocationSettingsBase extends SettingsPreferenceFragment { if (um.hasUserRestriction(UserManager.DISALLOW_SHARE_LOCATION)) { return; } - Settings.Secure.setLocationMode(getContentResolver(), mode); + Settings.Secure.putInt(getContentResolver(), Settings.Secure.LOCATION_MODE, mode); refreshLocationMode(); } public void refreshLocationMode() { - ContentResolver res = getContentResolver(); - int mode = Settings.Secure.getLocationMode(getContentResolver()); + int mode = Settings.Secure.getInt(getContentResolver(), Settings.Secure.LOCATION_MODE, + Settings.Secure.LOCATION_MODE_OFF); onModeChanged(mode); } } |