Clear binder id when determining external storage state

bug:22472435

Change-Id: I5badd51cb9fb2244395880eb1bbff8f4aa0abb8c
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index 8c215c9..8a58200 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -2659,8 +2659,15 @@
         boolean foundPrimary = false;
 
         final int userId = UserHandle.getUserId(uid);
-        final boolean reportUnmounted = !mMountServiceInternal.hasExternalStorage(
-                uid, packageName);
+        final boolean reportUnmounted;
+
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            reportUnmounted = !mMountServiceInternal.hasExternalStorage(
+                    uid, packageName);
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
 
         synchronized (mLock) {
             for (int i = 0; i < mVolumes.size(); i++) {