summaryrefslogtreecommitdiffstats
path: root/services/accessibility
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-10-03 16:32:23 -0700
committerSvetoslav <svetoslavganov@google.com>2014-10-03 16:32:26 -0700
commit9f70a4cc6dbdd7b509527cef892e8af3c8b09702 (patch)
treefe89642caef4a032c9e11b2932e9b86974336c71 /services/accessibility
parent900e3b5fc5bb4bf4947f63c0fed0757dfb7effa6 (diff)
downloadframeworks_base-9f70a4cc6dbdd7b509527cef892e8af3c8b09702.zip
frameworks_base-9f70a4cc6dbdd7b509527cef892e8af3c8b09702.tar.gz
frameworks_base-9f70a4cc6dbdd7b509527cef892e8af3c8b09702.tar.bz2
Clear identity before calling into the mount service.
bug:17787265 Change-Id: I4b9268d101e9ccfc30876fbf54bf28bb41fb4be6
Diffstat (limited to 'services/accessibility')
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java13
1 files changed, 9 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 8ab3588..8b24066 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -1604,10 +1604,15 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
if (userState.mUserId != UserHandle.USER_OWNER) {
return;
}
- if (hasRunningServicesLocked(userState) && LockPatternUtils.isDeviceEncrypted()) {
- // If there are running accessibility services we do not have encryption as
- // the user needs the accessibility layer to be running to authenticate.
- mLockPatternUtils.clearEncryptionPassword();
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ if (hasRunningServicesLocked(userState) && LockPatternUtils.isDeviceEncrypted()) {
+ // If there are running accessibility services we do not have encryption as
+ // the user needs the accessibility layer to be running to authenticate.
+ mLockPatternUtils.clearEncryptionPassword();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(identity);
}
}