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); } }