diff options
author | Svetoslav <svetoslavganov@google.com> | 2015-07-14 19:39:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-14 19:39:16 +0000 |
commit | 8b6d5b6b6ac3c363ad7aa36873dec1701d33de1e (patch) | |
tree | ad11d701ac51e414cf11eda125f9cb606478dda5 /services/core/java | |
parent | 66cc6bb65eac220a01b6a300cf64f1035a0463af (diff) | |
parent | 38c3dbb2092e153109503aa9487b15b11192d5c6 (diff) | |
download | frameworks_base-8b6d5b6b6ac3c363ad7aa36873dec1701d33de1e.zip frameworks_base-8b6d5b6b6ac3c363ad7aa36873dec1701d33de1e.tar.gz frameworks_base-8b6d5b6b6ac3c363ad7aa36873dec1701d33de1e.tar.bz2 |
Merge "Clear binder id when determining external storage state" into mnc-dev
Diffstat (limited to 'services/core/java')
-rw-r--r-- | services/core/java/com/android/server/MountService.java | 11 |
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++) { |