diff options
author | Amith Yamasani <yamasani@google.com> | 2015-07-13 23:02:03 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-13 23:02:03 +0000 |
commit | 7efb0521ff4af2eeca5c99011ece066848069ffc (patch) | |
tree | 6a5b8a3424ef3b8e6b76214092ad12944dcec6fc /services | |
parent | d5b0f69a457db4622e7ee6f73695a32e6f8c96f4 (diff) | |
parent | 1578357df737296aa151c6934fe7dd749a43ae15 (diff) | |
download | frameworks_base-7efb0521ff4af2eeca5c99011ece066848069ffc.zip frameworks_base-7efb0521ff4af2eeca5c99011ece066848069ffc.tar.gz frameworks_base-7efb0521ff4af2eeca5c99011ece066848069ffc.tar.bz2 |
am 1578357d: Merge "Check user state after clearing identity." into mnc-dev
* commit '1578357df737296aa151c6934fe7dd749a43ae15':
Check user state after clearing identity.
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 4c8174c..cdeb687 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -3461,13 +3461,14 @@ public class PackageManagerService extends IPackageManager.Stub { // Only need to do this if user is initialized. Otherwise it's a new user // and there are no processes running as the user yet and there's no need // to make an expensive call to remount processes for the changed permissions. - if ((READ_EXTERNAL_STORAGE.equals(name) - || WRITE_EXTERNAL_STORAGE.equals(name)) - && sUserManager.isInitialized(userId)) { + if (READ_EXTERNAL_STORAGE.equals(name) + || WRITE_EXTERNAL_STORAGE.equals(name)) { final long token = Binder.clearCallingIdentity(); try { - final StorageManager storage = mContext.getSystemService(StorageManager.class); - storage.remountUid(uid); + if (sUserManager.isInitialized(userId)) { + final StorageManager storage = mContext.getSystemService(StorageManager.class); + storage.remountUid(uid); + } } finally { Binder.restoreCallingIdentity(token); } |