summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2015-07-08 15:57:24 -0700
committerAmith Yamasani <yamasani@google.com>2015-07-08 15:57:24 -0700
commit6b53c162102e2a4b3d745fcceb1224cc94860b64 (patch)
tree6c4ae3093ad25dc199845bf565345358d8283086 /services
parent4f5630e51d03980e80fde93154f5a0302c8179a2 (diff)
downloadframeworks_base-6b53c162102e2a4b3d745fcceb1224cc94860b64.zip
frameworks_base-6b53c162102e2a4b3d745fcceb1224cc94860b64.tar.gz
frameworks_base-6b53c162102e2a4b3d745fcceb1224cc94860b64.tar.bz2
Qualify the uid with the userId when granting permissions
Calls to remountUid() for secondary users was not using the correct uid. This would prevent providing the required storage permissions to default apps. Discovered when investigating bug: 22356546 Change-Id: I98c8f6da724e46331c1c90b95969ca0871ef4fe9
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 124214c..fb0054f 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -3383,7 +3383,7 @@ public class PackageManagerService extends IPackageManager.Stub {
enforceDeclaredAsUsedAndRuntimePermission(pkg, bp);
- uid = pkg.applicationInfo.uid;
+ uid = UserHandle.getUid(userId, pkg.applicationInfo.uid);
sb = (SettingBase) pkg.mExtras;
if (sb == null) {
throw new IllegalArgumentException("Unknown package: " + packageName);