diff options
| author | 2019-05-30 12:47:39 +0100 | |
|---|---|---|
| committer | 2019-05-30 15:46:47 +0000 | |
| commit | 93c3855a3894c2247fa31fc8bc1de0fd211b8006 (patch) | |
| tree | d2c7bba1e8db392f51f380bd8e4296797bb3f7d0 | |
| parent | 80b53bd68bcb911ce4bd2a7207766c0689a13c49 (diff) | |
Notify all running users of DeviceConfig changes
Test: adb shell pm create-user dude
adb shell am switch-user 10
atest CtsDeviceConfigTestCases
Bug: 133793612
Change-Id: If614c4a6fea92d858994b113fcdf0f537a94a054
| -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 f7132e368e94..d07bc327971a 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -3043,15 +3043,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); } @@ -3091,7 +3092,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. |