diff options
| author | 2019-05-31 02:39:49 -0700 | |
|---|---|---|
| committer | 2019-05-31 02:39:49 -0700 | |
| commit | a5a5bbcc906f6f040b15495e13e8a86f9b9393cf (patch) | |
| tree | 39df8b42510ca8fe61b7fc4baea2cba1336dcdef | |
| parent | b9fd9e294c8d6d71842dd709608b9dca7a8c8149 (diff) | |
| parent | a216a4995f5237b67438ab7dc022b5763f4a786f (diff) | |
Merge "Notify all running users of DeviceConfig changes" into qt-dev am: b26792a2ca am: fff8fe61ab
am: a216a4995f
Change-Id: If4e0a7194e62153602fe320545bd86b0085a4008
| -rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 373233d3c5f6..a6f7cd302ca1 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -3046,15 +3046,16 @@ public class SettingsProvider extends ContentProvider { // Increment the generation first, so observers always see the new value mGenerationRegistry.incrementGeneration(key); - if (isGlobalSettingsKey(key)) { + if (isGlobalSettingsKey(key) || isConfigSettingsKey(key)) { final long token = Binder.clearCallingIdentity(); try { - if (Global.LOCATION_GLOBAL_KILL_SWITCH.equals(name)) { + if (Global.LOCATION_GLOBAL_KILL_SWITCH.equals(name) + && isGlobalSettingsKey(key)) { // When the global kill switch is updated, send the // change notification for the location setting. notifyLocationChangeForRunningUsers(); } - notifyGlobalSettingChangeForRunningUsers(key, name); + notifySettingChangeForRunningUsers(key, name); } finally { Binder.restoreCallingIdentity(token); } @@ -3094,7 +3095,7 @@ public class SettingsProvider extends ContentProvider { } } - private void notifyGlobalSettingChangeForRunningUsers(int key, String name) { + private void notifySettingChangeForRunningUsers(int key, String name) { // Important: No need to update generation for each user as there // is a singleton generation entry for the global settings which // is already incremented be the caller. |