diff options
author | Calin Juravle <calin@google.com> | 2016-02-22 11:49:17 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-02-22 11:49:17 +0000 |
commit | b219fe37c67fe735cd4e231cc03d8f56899d59df (patch) | |
tree | 48c613071597283dd5273732762ab203ecd9b73a /libcutils | |
parent | f9603bcb4f9d796eca6e3fc87553f4f75b7bcf9a (diff) | |
parent | aed972dead82d2a74c3a9be296ba3390477d30cf (diff) | |
download | system_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.c | 6 |
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; + +} |