diff options
| author | 2018-03-25 22:53:29 -0600 | |
|---|---|---|
| committer | 2018-03-25 22:54:16 -0600 | |
| commit | 308093f53bb78f3a02d7cb77bb6caf5bc0a8997b (patch) | |
| tree | 55f29bcc5c94bee772c0afc6113791e9848edb77 | |
| parent | a5b29ffffe82e504726c1bbd288023c5d081e0c3 (diff) | |
Clear identity when asking for other users.
Bug: 76394640
Test: nope
Change-Id: I8d1530ed01669947e91725e905240729e31c7234
| -rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 3a2ec0678c5a..a6d6250df885 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -2754,12 +2754,17 @@ public class SettingsProvider extends ContentProvider { mGenerationRegistry.incrementGeneration(key); if (isGlobalSettingsKey(key)) { - if (Global.LOCATION_GLOBAL_KILL_SWITCH.equals(name)) { - // When the global kill switch is updated, send the - // change notification for the location setting. - notifyLocationChangeForRunningUsers(); + final long token = Binder.clearCallingIdentity(); + try { + if (Global.LOCATION_GLOBAL_KILL_SWITCH.equals(name)) { + // When the global kill switch is updated, send the + // change notification for the location setting. + notifyLocationChangeForRunningUsers(); + } + notifyGlobalSettingChangeForRunningUsers(key, name); + } finally { + Binder.restoreCallingIdentity(token); } - notifyGlobalSettingChangeForRunningUsers(key, name); } else { final int userId = getUserIdFromKey(key); final Uri uri = getNotificationUriFor(key, name); |