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

* commit 'ddae5f1e584a309311387076cec7f399e6732187':
  Clear binder id when determining external storage state
This commit is contained in:
Svetoslav
2015-07-14 20:01:05 +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++) {