am 8ff6d70d: Merge "Clear identity before calling into the mount service." into lmp-dev

* commit '8ff6d70d44626cd515f517962378d89ab3954979':
  Clear identity before calling into the mount service.
This commit is contained in:
Svetoslav
2014-10-03 23:53:25 +00:00
committed by Android Git Automerger

View File

@@ -1610,11 +1610,16 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
if (userState.mUserId != UserHandle.USER_OWNER) { if (userState.mUserId != UserHandle.USER_OWNER) {
return; return;
} }
final long identity = Binder.clearCallingIdentity();
try {
if (hasRunningServicesLocked(userState) && LockPatternUtils.isDeviceEncrypted()) { if (hasRunningServicesLocked(userState) && LockPatternUtils.isDeviceEncrypted()) {
// If there are running accessibility services we do not have encryption as // If there are running accessibility services we do not have encryption as
// the user needs the accessibility layer to be running to authenticate. // the user needs the accessibility layer to be running to authenticate.
mLockPatternUtils.clearEncryptionPassword(); mLockPatternUtils.clearEncryptionPassword();
} }
} finally {
Binder.restoreCallingIdentity(identity);
}
} }
private boolean hasRunningServicesLocked(UserState userState) { private boolean hasRunningServicesLocked(UserState userState) {