diff options
| author | 2017-04-12 22:09:19 +0000 | |
|---|---|---|
| committer | 2017-04-12 22:09:24 +0000 | |
| commit | c240c9b134fe4d1843433e76c0f6721bd712918c (patch) | |
| tree | a31dab9814b8f7d0beadab7cecd30a6cf9ce0081 | |
| parent | 682ce66309bd446cd3526ea2058334e0fb7edb46 (diff) | |
| parent | 35ba7ec539a91013aed6c78e48011903255ae4cb (diff) | |
Merge "clear calling identity before calling settings provider" into oc-dev
| -rw-r--r-- | services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java index 0488d22188da..000394155ff1 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -2036,10 +2036,16 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { } if (!shortcutServiceIsInstalled) { userState.mServiceToEnableWithShortcut = null; - Settings.Secure.putStringForUser(mContext.getContentResolver(), - Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE, null, userState.mUserId); - Settings.Secure.putIntForUser(mContext.getContentResolver(), - Settings.Secure.ACCESSIBILITY_SHORTCUT_ENABLED, 0, userState.mUserId); + final long identity = Binder.clearCallingIdentity(); + try { + Settings.Secure.putStringForUser(mContext.getContentResolver(), + Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE, null, userState.mUserId); + + Settings.Secure.putIntForUser(mContext.getContentResolver(), + Settings.Secure.ACCESSIBILITY_SHORTCUT_ENABLED, 0, userState.mUserId); + } finally { + Binder.restoreCallingIdentity(identity); + } } } |