Merge "Clear calling identity before calling mountService" into nyc-dev
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index 6c05173..bc9f69e 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -1048,7 +1048,13 @@
     private void changeUserKey(int userId, byte[] token, byte[] secret)
             throws RemoteException {
         final UserInfo userInfo = UserManager.get(mContext).getUserInfo(userId);
-        getMountService().changeUserKey(userId, userInfo.serialNumber, token, null, secret);
+        final IMountService mountService = getMountService();
+        final long callingId = Binder.clearCallingIdentity();
+        try {
+            mountService.changeUserKey(userId, userInfo.serialNumber, token, null, secret);
+        } finally {
+            Binder.restoreCallingIdentity(callingId);
+        }
     }
 
     @Override