Merge "Clear identity when asking for other users." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-26 15:06:28 +00:00
committed by Android (Google) Code Review

View File

@@ -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);