summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/location/LocationSettingsBase.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/location/LocationSettingsBase.java')
-rw-r--r--src/com/android/settings/location/LocationSettingsBase.java7
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);
}
}