diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-03-23 16:51:22 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2015-03-23 19:14:19 -0700 |
commit | 00f3904629ef89192e061c1995801ef322fc0bcf (patch) | |
tree | bbb49b68ec6171faf692eb5c874eed2da271bf43 /services/core/java/com/android/server/SystemConfig.java | |
parent | 95c1adea0c5fe10ceba217a327163757f4589d3d (diff) | |
download | frameworks_base-00f3904629ef89192e061c1995801ef322fc0bcf.zip frameworks_base-00f3904629ef89192e061c1995801ef322fc0bcf.tar.gz frameworks_base-00f3904629ef89192e061c1995801ef322fc0bcf.tar.bz2 |
Introduce per-user GIDs for storage.
This will eventually allow us to have a single unified filesystem
instead of requiring zygote to use bind mounts.
Change-Id: I29b819ab51498b4bab874e0367b1ab4165f84025
Diffstat (limited to 'services/core/java/com/android/server/SystemConfig.java')
-rw-r--r-- | services/core/java/com/android/server/SystemConfig.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/SystemConfig.java b/services/core/java/com/android/server/SystemConfig.java index 6ad128c..4c9d7d3 100644 --- a/services/core/java/com/android/server/SystemConfig.java +++ b/services/core/java/com/android/server/SystemConfig.java @@ -71,9 +71,11 @@ public class SystemConfig { public static final class PermissionEntry { public final String name; public int[] gids; + public boolean perUser; - PermissionEntry(String _name) { - name = _name; + PermissionEntry(String name, boolean perUser) { + this.name = name; + this.perUser = perUser; } } @@ -363,14 +365,14 @@ public class SystemConfig { void readPermission(XmlPullParser parser, String name) throws IOException, XmlPullParserException { + if (mPermissions.containsKey(name)) { + throw new IllegalStateException("Duplicate permission definition for " + name); + } - name = name.intern(); + final boolean perUser = XmlUtils.readBooleanAttribute(parser, "perUser", false); + final PermissionEntry perm = new PermissionEntry(name, perUser); + mPermissions.put(name, perm); - PermissionEntry perm = mPermissions.get(name); - if (perm == null) { - perm = new PermissionEntry(name); - mPermissions.put(name, perm); - } int outerDepth = parser.getDepth(); int type; while ((type=parser.next()) != XmlPullParser.END_DOCUMENT |