Renamed "App settings" back to "Location services"
- Fix b/10610559
Change-Id: Id98a1b4e8d04238f371322fe6232647fa13b5c4a
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2ebda68..9c5d039 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2416,8 +2416,8 @@
<string name="location_category_recent_location_requests">Recent location requests</string>
<!-- Location settings screen, displayed when there's no recent app accessing location -->
<string name="location_no_recent_apps">No apps have requested location recently</string>
- <!-- [CHAR LIMIT=30] Location settings screen, sub category for app settings -->
- <string name="location_category_app_settings">App settings</string>
+ <!-- [CHAR LIMIT=30] Location settings screen, sub category for location services -->
+ <string name="location_category_location_services">Location services</string>
<!-- [CHAR LIMIT=30] Location settings screen, recent location requests high battery use-->
<string name="location_high_battery_use">High battery use</string>
<!-- [CHAR LIMIT=30] Location settings screen, recent location requests low battery use-->
diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml
index 5be6bd3..83b80b1 100644
--- a/res/xml/location_settings.xml
+++ b/res/xml/location_settings.xml
@@ -26,7 +26,7 @@
android:title="@string/location_category_recent_location_requests" />
<PreferenceCategory
- android:key="app_settings"
- android:title="@string/location_category_app_settings" />
+ android:key="location_services"
+ android:title="@string/location_category_location_services" />
</PreferenceScreen>
diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java
index 7cc6f4c..6a29e99 100644
--- a/src/com/android/settings/location/LocationSettings.java
+++ b/src/com/android/settings/location/LocationSettings.java
@@ -55,7 +55,7 @@
/** Key for preference category "Recent location requests" */
private static final String KEY_RECENT_LOCATION_REQUESTS = "recent_location_requests";
/** Key for preference category "Location services" */
- private static final String KEY_APP_SETTINGS = "app_settings";
+ private static final String KEY_LOCATION_SERVICES = "location_services";
private Switch mSwitch;
private boolean mValidListener;
@@ -145,7 +145,7 @@
mCategoryRecentLocationRequests.addPreference(banner);
}
- addAppSettings(activity, root);
+ addLocationServices(activity, root);
// Only show the master switch when we're not in multi-pane mode, and not being used as
// Setup Wizard.
@@ -177,11 +177,11 @@
* up-to-date after mode changes even if an affected app doesn't send the setting changed
* broadcast.
*/
- private void addAppSettings(Context context, PreferenceScreen root) {
- PreferenceCategory categoryAppSettings =
- (PreferenceCategory) root.findPreference(KEY_APP_SETTINGS);
+ private void addLocationServices(Context context, PreferenceScreen root) {
+ PreferenceCategory categoryLocationServices =
+ (PreferenceCategory) root.findPreference(KEY_LOCATION_SERVICES);
final SettingsInjector injector = new SettingsInjector(context);
- List<Preference> appSettings = injector.getInjectedSettings();
+ List<Preference> locationServices = injector.getInjectedSettings();
mReceiver = new BroadcastReceiver() {
@Override
@@ -198,11 +198,11 @@
filter.addAction(LocationManager.MODE_CHANGED_ACTION);
context.registerReceiver(mReceiver, filter);
- if (appSettings.size() > 0) {
- addPreferencesSorted(appSettings, categoryAppSettings);
+ if (locationServices.size() > 0) {
+ addPreferencesSorted(locationServices, categoryLocationServices);
} else {
// If there's no item to display, remove the whole category.
- root.removePreference(categoryAppSettings);
+ root.removePreference(categoryLocationServices);
}
}