summaryrefslogtreecommitdiffstats
path: root/services/core/java
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2015-07-14 11:27:06 -0700
committerSvetoslav <svetoslavganov@google.com>2015-07-14 11:30:10 -0700
commit38c3dbb2092e153109503aa9487b15b11192d5c6 (patch)
tree60a70515d02c9c677d101b7d834a30813afa201c /services/core/java
parent51b4e97ae42fb789b7d1c9d4134ddaa7e2b27b11 (diff)
downloadframeworks_base-38c3dbb2092e153109503aa9487b15b11192d5c6.zip
frameworks_base-38c3dbb2092e153109503aa9487b15b11192d5c6.tar.gz
frameworks_base-38c3dbb2092e153109503aa9487b15b11192d5c6.tar.bz2
Clear binder id when determining external storage state
bug:22472435 Change-Id: I5badd51cb9fb2244395880eb1bbff8f4aa0abb8c
Diffstat (limited to 'services/core/java')
-rw-r--r--services/core/java/com/android/server/MountService.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index bc61c3d..0e158a2 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -2602,8 +2602,15 @@ class MountService extends IMountService.Stub
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++) {