am 5ab9fa43: Renamed "App settings" back to "Location services"

* commit '5ab9fa432d17fe72c74a25770a26d405635cc0f6':
  Renamed "App settings" back to "Location services"
This commit is contained in:
Lifu Tang
2013-10-02 09:35:42 -07:00
committed by Android Git Automerger
3 changed files with 13 additions and 13 deletions

View File

@@ -2416,8 +2416,8 @@
<string name="location_category_recent_location_requests">Recent location requests</string> <string name="location_category_recent_location_requests">Recent location requests</string>
<!-- Location settings screen, displayed when there's no recent app accessing location --> <!-- 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> <string name="location_no_recent_apps">No apps have requested location recently</string>
<!-- [CHAR LIMIT=30] Location settings screen, sub category for app settings --> <!-- [CHAR LIMIT=30] Location settings screen, sub category for location services -->
<string name="location_category_app_settings">App settings</string> <string name="location_category_location_services">Location services</string>
<!-- [CHAR LIMIT=30] Location settings screen, recent location requests high battery use--> <!-- [CHAR LIMIT=30] Location settings screen, recent location requests high battery use-->
<string name="location_high_battery_use">High battery use</string> <string name="location_high_battery_use">High battery use</string>
<!-- [CHAR LIMIT=30] Location settings screen, recent location requests low battery use--> <!-- [CHAR LIMIT=30] Location settings screen, recent location requests low battery use-->

View File

@@ -26,7 +26,7 @@
android:title="@string/location_category_recent_location_requests" /> android:title="@string/location_category_recent_location_requests" />
<PreferenceCategory <PreferenceCategory
android:key="app_settings" android:key="location_services"
android:title="@string/location_category_app_settings" /> android:title="@string/location_category_location_services" />
</PreferenceScreen> </PreferenceScreen>

View File

@@ -55,7 +55,7 @@ public class LocationSettings extends LocationSettingsBase
/** Key for preference category "Recent location requests" */ /** Key for preference category "Recent location requests" */
private static final String KEY_RECENT_LOCATION_REQUESTS = "recent_location_requests"; private static final String KEY_RECENT_LOCATION_REQUESTS = "recent_location_requests";
/** Key for preference category "Location services" */ /** 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 Switch mSwitch;
private boolean mValidListener; private boolean mValidListener;
@@ -145,7 +145,7 @@ public class LocationSettings extends LocationSettingsBase
mCategoryRecentLocationRequests.addPreference(banner); 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 // Only show the master switch when we're not in multi-pane mode, and not being used as
// Setup Wizard. // 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 * up-to-date after mode changes even if an affected app doesn't send the setting changed
* broadcast. * broadcast.
*/ */
private void addAppSettings(Context context, PreferenceScreen root) { private void addLocationServices(Context context, PreferenceScreen root) {
PreferenceCategory categoryAppSettings = PreferenceCategory categoryLocationServices =
(PreferenceCategory) root.findPreference(KEY_APP_SETTINGS); (PreferenceCategory) root.findPreference(KEY_LOCATION_SERVICES);
final SettingsInjector injector = new SettingsInjector(context); final SettingsInjector injector = new SettingsInjector(context);
List<Preference> appSettings = injector.getInjectedSettings(); List<Preference> locationServices = injector.getInjectedSettings();
mReceiver = new BroadcastReceiver() { mReceiver = new BroadcastReceiver() {
@Override @Override
@@ -198,11 +198,11 @@ public class LocationSettings extends LocationSettingsBase
filter.addAction(LocationManager.MODE_CHANGED_ACTION); filter.addAction(LocationManager.MODE_CHANGED_ACTION);
context.registerReceiver(mReceiver, filter); context.registerReceiver(mReceiver, filter);
if (appSettings.size() > 0) { if (locationServices.size() > 0) {
addPreferencesSorted(appSettings, categoryAppSettings); addPreferencesSorted(locationServices, categoryLocationServices);
} else { } else {
// If there's no item to display, remove the whole category. // If there's no item to display, remove the whole category.
root.removePreference(categoryAppSettings); root.removePreference(categoryLocationServices);
} }
} }