From 5ab9fa432d17fe72c74a25770a26d405635cc0f6 Mon Sep 17 00:00:00 2001 From: Lifu Tang Date: Mon, 30 Sep 2013 17:03:25 -0700 Subject: [PATCH] Renamed "App settings" back to "Location services" - Fix b/10610559 Change-Id: Id98a1b4e8d04238f371322fe6232647fa13b5c4a --- res/values/strings.xml | 4 ++-- res/xml/location_settings.xml | 4 ++-- .../settings/location/LocationSettings.java | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 2ebda689fbb..9c5d0398b21 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -2416,8 +2416,8 @@ Recent location requests No apps have requested location recently - - App settings + + Location services High battery use diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml index 5be6bd3d9ef..83b80b1baee 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" /> + android:key="location_services" + android:title="@string/location_category_location_services" /> diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java index 7cc6f4c81c5..6a29e9962cc 100644 --- a/src/com/android/settings/location/LocationSettings.java +++ b/src/com/android/settings/location/LocationSettings.java @@ -55,7 +55,7 @@ public class LocationSettings extends LocationSettingsBase /** 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 @@ public class LocationSettings extends LocationSettingsBase 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 @@ public class LocationSettings extends LocationSettingsBase * 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 appSettings = injector.getInjectedSettings(); + List locationServices = injector.getInjectedSettings(); mReceiver = new BroadcastReceiver() { @Override @@ -198,11 +198,11 @@ public class LocationSettings extends LocationSettingsBase 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); } }