diff options
| author | 2019-05-31 02:28:28 -0700 | |
|---|---|---|
| committer | 2019-05-31 02:28:28 -0700 | |
| commit | fff8fe61ab599a69b3ca84f2dd3286d2f979f94c (patch) | |
| tree | a6c3e72a6e60558c84ee0469c8688625ceb3aa60 | |
| parent | 83f485b20d51a19ac9bc348a7306c0e8c09c3c42 (diff) | |
| parent | b26792a2cafe69bb10c1841f2acb0068e81eca18 (diff) | |
Merge "Notify all running users of DeviceConfig changes" into qt-dev
am: b26792a2ca
Change-Id: I8a4cb135c18d586cff44de782560336328905a0a
| -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. |