am 8b6d5b6b: Merge "Clear binder id when determining external storage state" into mnc-dev

* commit '8b6d5b6b6ac3c363ad7aa36873dec1701d33de1e':
  Clear binder id when determining external storage state
This commit is contained in:
Svetoslav
2015-07-14 19:51:25 +00:00
committed by Android Git Automerger

View File

@@ -2659,8 +2659,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++) {