summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom O'Neill <tomo@google.com>2013-08-27 14:38:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-27 14:38:07 +0000
commit5d821bedb1f065702b9920fe15a6f81bc19ba36b (patch)
tree32e19f10f07a4a51d53a7e167710797af604cd9e /src
parent0f9a405fd58f8f5d30fbbe975e063e324d46a1f2 (diff)
parentb578ac4f94542eb7a2988e51045b931305871b97 (diff)
downloadpackages_apps_Settings-5d821bedb1f065702b9920fe15a6f81bc19ba36b.zip
packages_apps_Settings-5d821bedb1f065702b9920fe15a6f81bc19ba36b.tar.gz
packages_apps_Settings-5d821bedb1f065702b9920fe15a6f81bc19ba36b.tar.bz2
Merge "Adapt to SettingsInjectorService API changes" into klp-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/location/LocationSettings.java4
-rw-r--r--src/com/android/settings/location/SettingsInjector.java11
2 files changed, 6 insertions, 9 deletions
diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java
index 1c9409c..818ec2b 100644
--- a/src/com/android/settings/location/LocationSettings.java
+++ b/src/com/android/settings/location/LocationSettings.java
@@ -180,8 +180,8 @@ public class LocationSettings extends LocationSettingsBase
injector.reloadStatusMessages();
}
};
- activity.registerReceiver(
- mReceiver, new IntentFilter(SettingInjectorService.UPDATE_INTENT));
+ activity.registerReceiver(mReceiver,
+ new IntentFilter(SettingInjectorService.ACTION_INJECTED_SETTING_CHANGED));
if (locationServices.size() > 0) {
addPreferencesSorted(locationServices, categoryLocationServices);
diff --git a/src/com/android/settings/location/SettingsInjector.java b/src/com/android/settings/location/SettingsInjector.java
index 532304d..22e2413 100644
--- a/src/com/android/settings/location/SettingsInjector.java
+++ b/src/com/android/settings/location/SettingsInjector.java
@@ -56,9 +56,6 @@ import java.util.Set;
* Code-sharing would require extracting {@link
* android.content.pm.RegisteredServicesCache#parseServiceAttributes(android.content.res.Resources,
* String, android.util.AttributeSet)} into an interface, which didn't seem worth it.
- *
- * TODO: register a broadcast receiver that calls updateUI() when it receives
- * {@link SettingInjectorService#UPDATE_INTENT}.
*/
class SettingsInjector {
static final String TAG = "SettingsInjector";
@@ -278,8 +275,8 @@ class SettingsInjector {
/**
* Settings whose status values need to be loaded. A set is used to prevent redundant loads
* even if {@link #reloadStatusMessages()} is called many times in rapid succession (for
- * example, if we receive a lot of
- * {@link android.location.SettingInjectorService#UPDATE_INTENT} broadcasts).
+ * example, if we receive a lot of {@link
+ * android.location.SettingInjectorService#ACTION_INJECTED_SETTING_CHANGED} broadcasts).
* <p/>
* We use a linked hash set to ensure that when {@link #reloadStatusMessages()} is called,
* any settings that haven't been loaded yet will finish loading before any already-loaded
@@ -386,12 +383,12 @@ class SettingsInjector {
@Override
public void handleMessage(Message msg) {
Bundle bundle = msg.getData();
- String status = bundle.getString(SettingInjectorService.STATUS_KEY);
+ String summary = bundle.getString(SettingInjectorService.SUMMARY_KEY);
boolean enabled = bundle.getBoolean(SettingInjectorService.ENABLED_KEY, true);
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, setting + ": received " + msg + ", bundle: " + bundle);
}
- preference.setSummary(status);
+ preference.setSummary(summary);
preference.setEnabled(enabled);
mHandler.sendMessage(
mHandler.obtainMessage(WHAT_RECEIVED_STATUS, Setting.this));