Loading core/java/android/os/Process.java +6 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public class Process { */ public static final int LAST_ISOLATED_UID = 99999; /** * Defines the gid shared by all applications running under the same profile. * @hide */ public static final int SHARED_USER_GID = 9997; /** * First gid for applications to share resources. Used when forward-locking * is enabled but all UserHandles need to be able to read the resources. Loading core/java/android/os/UserHandle.java +8 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,14 @@ public final class UserHandle implements Parcelable { return uid % PER_USER_RANGE; } /** * Returns the gid shared between all apps with this userId. * @hide */ public static final int getUserGid(int userId) { return getUid(userId, Process.SHARED_USER_GID); } /** * Returns the shared app gid for a given uid or appId. * @hide Loading services/java/com/android/server/am/ActivityManagerService.java +6 −5 Original line number Diff line number Diff line Loading @@ -2735,16 +2735,17 @@ public final class ActivityManagerService extends ActivityManagerNative } /* * Add shared application GID so applications can share some * resources like shared libraries * Add shared application and profile GIDs so applications can share some * resources like shared libraries and access user-wide resources */ if (permGids == null) { gids = new int[1]; gids = new int[2]; } else { gids = new int[permGids.length + 1]; System.arraycopy(permGids, 0, gids, 1, permGids.length); gids = new int[permGids.length + 2]; System.arraycopy(permGids, 0, gids, 2, permGids.length); } gids[0] = UserHandle.getSharedAppGid(UserHandle.getAppId(uid)); gids[1] = UserHandle.getUserGid(UserHandle.getUserId(uid)); } if (mFactoryTest != SystemServer.FACTORY_TEST_OFF) { if (mFactoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL Loading Loading
core/java/android/os/Process.java +6 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public class Process { */ public static final int LAST_ISOLATED_UID = 99999; /** * Defines the gid shared by all applications running under the same profile. * @hide */ public static final int SHARED_USER_GID = 9997; /** * First gid for applications to share resources. Used when forward-locking * is enabled but all UserHandles need to be able to read the resources. Loading
core/java/android/os/UserHandle.java +8 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,14 @@ public final class UserHandle implements Parcelable { return uid % PER_USER_RANGE; } /** * Returns the gid shared between all apps with this userId. * @hide */ public static final int getUserGid(int userId) { return getUid(userId, Process.SHARED_USER_GID); } /** * Returns the shared app gid for a given uid or appId. * @hide Loading
services/java/com/android/server/am/ActivityManagerService.java +6 −5 Original line number Diff line number Diff line Loading @@ -2735,16 +2735,17 @@ public final class ActivityManagerService extends ActivityManagerNative } /* * Add shared application GID so applications can share some * resources like shared libraries * Add shared application and profile GIDs so applications can share some * resources like shared libraries and access user-wide resources */ if (permGids == null) { gids = new int[1]; gids = new int[2]; } else { gids = new int[permGids.length + 1]; System.arraycopy(permGids, 0, gids, 1, permGids.length); gids = new int[permGids.length + 2]; System.arraycopy(permGids, 0, gids, 2, permGids.length); } gids[0] = UserHandle.getSharedAppGid(UserHandle.getAppId(uid)); gids[1] = UserHandle.getUserGid(UserHandle.getUserId(uid)); } if (mFactoryTest != SystemServer.FACTORY_TEST_OFF) { if (mFactoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL Loading