am f4c4294c
: Merge "Renamed "Location services" to "App settings"" into klp-dev
* commit 'f4c4294c502d774c1c56d6b2dca56a604cc85f87': Renamed "Location services" to "App settings"
This commit is contained in:
@@ -2400,8 +2400,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 in the last 15 minutes.</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, sub category for app settings -->
|
||||
<string name="location_category_app_settings">App settings</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-->
|
||||
|
@@ -26,7 +26,7 @@
|
||||
android:title="@string/location_category_recent_location_requests" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="location_services"
|
||||
android:title="@string/location_category_location_services" />
|
||||
android:key="app_settings"
|
||||
android:title="@string/location_category_app_settings" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -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_LOCATION_SERVICES = "location_services";
|
||||
private static final String KEY_APP_SETTINGS = "app_settings";
|
||||
|
||||
private Switch mSwitch;
|
||||
private boolean mValidListener;
|
||||
@@ -165,10 +165,10 @@ public class LocationSettings extends LocationSettingsBase
|
||||
categoryRecentLocationRequests.addPreference(banner);
|
||||
}
|
||||
|
||||
PreferenceCategory categoryLocationServices =
|
||||
(PreferenceCategory) root.findPreference(KEY_LOCATION_SERVICES);
|
||||
PreferenceCategory categoryAppSettings =
|
||||
(PreferenceCategory) root.findPreference(KEY_APP_SETTINGS);
|
||||
final SettingsInjector injector = new SettingsInjector(activity);
|
||||
List<Preference> locationServices = injector.getInjectedSettings();
|
||||
List<Preference> appSettings = injector.getInjectedSettings();
|
||||
|
||||
mReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
@@ -182,11 +182,11 @@ public class LocationSettings extends LocationSettingsBase
|
||||
activity.registerReceiver(mReceiver,
|
||||
new IntentFilter(SettingInjectorService.ACTION_INJECTED_SETTING_CHANGED));
|
||||
|
||||
if (locationServices.size() > 0) {
|
||||
addPreferencesSorted(locationServices, categoryLocationServices);
|
||||
if (appSettings.size() > 0) {
|
||||
addPreferencesSorted(appSettings, categoryAppSettings);
|
||||
} else {
|
||||
// If there's no item to display, remove the whole category.
|
||||
root.removePreference(categoryLocationServices);
|
||||
root.removePreference(categoryAppSettings);
|
||||
}
|
||||
|
||||
// Only show the master switch when we're not in multi-pane mode, and not being used as
|
||||
|
Reference in New Issue
Block a user