summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2013-02-25 13:22:42 -0800
committerRomain Guy <romainguy@google.com>2013-02-25 13:22:42 -0800
commit01d159d88a51c44d7e282e07b834535e5b0e8bd1 (patch)
tree87d98fe2d57cf241f679838408dc95e258722f16 /services
parentff4fcdb98c9575642c48f1daeafff4b257769e81 (diff)
downloadframeworks_base-01d159d88a51c44d7e282e07b834535e5b0e8bd1.zip
frameworks_base-01d159d88a51c44d7e282e07b834535e5b0e8bd1.tar.gz
frameworks_base-01d159d88a51c44d7e282e07b834535e5b0e8bd1.tar.bz2
Lookup permission groups by name
When a top-level permission group is specified, lookup the group id by name instead of parsing the value as an integer. This matches what we do when the group tag is a child of <permission/>. Change-Id: I54954ae683cecdf72cf846f75383bf6ba862dc5b
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 5f44ff4..7fb8902 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -1454,7 +1454,7 @@ public class PackageManagerService extends IPackageManager.Stub {
if ("group".equals(name)) {
String gidStr = parser.getAttributeValue(null, "gid");
if (gidStr != null) {
- int gid = Integer.parseInt(gidStr);
+ int gid = Process.getGidForName(gidStr);
mGlobalGids = appendInt(mGlobalGids, gid);
} else {
Slog.w(TAG, "<group> without gid at "