From 01d159d88a51c44d7e282e07b834535e5b0e8bd1 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 25 Feb 2013 13:22:42 -0800 Subject: 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 . Change-Id: I54954ae683cecdf72cf846f75383bf6ba862dc5b --- services/java/com/android/server/pm/PackageManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services') 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, " without gid at " -- cgit v1.1