diff options
author | Amith Yamasani <yamasani@google.com> | 2015-07-23 17:22:29 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-23 17:22:29 +0000 |
commit | b3e407609f567884f9322e7b34461baa14e3f3ae (patch) | |
tree | 6d96282b6b11f3a4740fc033ab014df5791269b1 /services | |
parent | 304b01c2493f16c2537563b3e00e4770765942a2 (diff) | |
parent | 2bd5cff7c639ed4bba2fc7ba3a545f4c764f0019 (diff) | |
download | frameworks_base-b3e407609f567884f9322e7b34461baa14e3f3ae.zip frameworks_base-b3e407609f567884f9322e7b34461baa14e3f3ae.tar.gz frameworks_base-b3e407609f567884f9322e7b34461baa14e3f3ae.tar.bz2 |
Merge "Avoid a deadlock between PMS and AppOpsService" into mnc-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/MountService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java index 92b98a7..ed136e9 100644 --- a/services/core/java/com/android/server/MountService.java +++ b/services/core/java/com/android/server/MountService.java @@ -3431,6 +3431,11 @@ class MountService extends IMountService.Stub } public boolean hasExternalStorage(int uid, String packageName) { + // No need to check for system uid. This avoids a deadlock between + // PackageManagerService and AppOpsService. + if (uid == Process.SYSTEM_UID) { + return true; + } // No locking - CopyOnWriteArrayList for (ExternalStorageMountPolicy policy : mPolicies) { final boolean policyHasStorage = policy.hasExternalStorage(uid, packageName); |