summaryrefslogtreecommitdiffstats
path: root/libcutils
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2016-02-22 11:49:17 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-02-22 11:49:17 +0000
commitb219fe37c67fe735cd4e231cc03d8f56899d59df (patch)
tree48c613071597283dd5273732762ab203ecd9b73a /libcutils
parentf9603bcb4f9d796eca6e3fc87553f4f75b7bcf9a (diff)
parentaed972dead82d2a74c3a9be296ba3390477d30cf (diff)
downloadsystem_core-b219fe37c67fe735cd4e231cc03d8f56899d59df.tar.gz
system_core-b219fe37c67fe735cd4e231cc03d8f56899d59df.tar.bz2
system_core-b219fe37c67fe735cd4e231cc03d8f56899d59df.zip
Merge "Create profiles folders" into nyc-dev
am: aed972dead * commit 'aed972dead82d2a74c3a9be296ba3390477d30cf': Create profiles folders
Diffstat (limited to 'libcutils')
-rw-r--r--libcutils/multiuser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcutils/multiuser.c b/libcutils/multiuser.c
index 7c74bb867..0f4427b35 100644
--- a/libcutils/multiuser.c
+++ b/libcutils/multiuser.c
@@ -27,3 +27,9 @@ appid_t multiuser_get_app_id(uid_t uid) {
uid_t multiuser_get_uid(userid_t userId, appid_t appId) {
return userId * MULTIUSER_APP_PER_USER_RANGE + (appId % MULTIUSER_APP_PER_USER_RANGE);
}
+
+appid_t multiuser_get_shared_app_gid(uid_t id) {
+ return MULTIUSER_FIRST_SHARED_APPLICATION_GID + (id % MULTIUSER_APP_PER_USER_RANGE)
+ - MULTIUSER_FIRST_APPLICATION_UID;
+
+}