Loading core/api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -7307,7 +7307,7 @@ package android.os { method @NonNull public static String formatUid(int); method public static int getAppId(int); method public int getIdentifier(); method public static int getUid(@NonNull android.os.UserHandle, int); method public int getUid(int); method @Deprecated public boolean isOwner(); method public boolean isSystem(); method public static int myUserId(); Loading core/java/android/os/UserHandle.java +4 −5 Original line number Diff line number Diff line Loading @@ -303,16 +303,15 @@ public final class UserHandle implements Parcelable { } /** * Returns the uid that is composed from the userHandle and the appId. * Returns the uid representing the given appId for this UserHandle. * * @param userHandle the UserHandle to compose the uid * @param appId the AppId to compose the uid * @return the uid that is composed from the userHandle and the appId * @return the uid representing the given appId for this UserHandle * @hide */ @SystemApi public static int getUid(@NonNull UserHandle userHandle, @AppIdInt int appId) { return getUid(userHandle.getIdentifier(), appId); public int getUid(@AppIdInt int appId) { return getUid(getIdentifier(), appId); } /** Loading packages/Connectivity/framework/src/android/net/UidRange.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,8 @@ public final class UidRange implements Parcelable { /** Creates a UidRange for the specified user. */ public static UidRange createForUser(UserHandle user) { final UserHandle nextUser = UserHandle.of(user.getIdentifier() + 1); final int start = UserHandle.getUid(user, 0 /* appId */); final int end = UserHandle.getUid(nextUser, 0) - 1; final int start = user.getUid(0 /* appId */); final int end = nextUser.getUid(0 /* appId */) - 1; return new UidRange(start, end); } Loading services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -9804,7 +9804,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } for (final UserHandle ui : users) { // Add the rules for all users as this policy is device wide. uids.get(pref).add(UserHandle.getUid(ui, uid)); uids.get(pref).add(ui.getUid(uid)); } } catch (PackageManager.NameNotFoundException e) { // Although this may seem like an error scenario, it is ok that uninstalled Loading services/core/java/com/android/server/connectivity/PermissionMonitor.java +2 −2 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public class PermissionMonitor { for (UserHandle user : users) { if (user == null) continue; list.add(UserHandle.getUid(user, app.getKey())); list.add(user.getUid(app.getKey())); } } try { Loading Loading @@ -555,7 +555,7 @@ public class PermissionMonitor { final UserHandle handle = UserHandle.of(userId); if (handle == null) continue; final int uid = UserHandle.getUid(handle, appId); final int uid = handle.getUid(appId); if (range.contains(uid)) { result.add(uid); } Loading Loading
core/api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -7307,7 +7307,7 @@ package android.os { method @NonNull public static String formatUid(int); method public static int getAppId(int); method public int getIdentifier(); method public static int getUid(@NonNull android.os.UserHandle, int); method public int getUid(int); method @Deprecated public boolean isOwner(); method public boolean isSystem(); method public static int myUserId(); Loading
core/java/android/os/UserHandle.java +4 −5 Original line number Diff line number Diff line Loading @@ -303,16 +303,15 @@ public final class UserHandle implements Parcelable { } /** * Returns the uid that is composed from the userHandle and the appId. * Returns the uid representing the given appId for this UserHandle. * * @param userHandle the UserHandle to compose the uid * @param appId the AppId to compose the uid * @return the uid that is composed from the userHandle and the appId * @return the uid representing the given appId for this UserHandle * @hide */ @SystemApi public static int getUid(@NonNull UserHandle userHandle, @AppIdInt int appId) { return getUid(userHandle.getIdentifier(), appId); public int getUid(@AppIdInt int appId) { return getUid(getIdentifier(), appId); } /** Loading
packages/Connectivity/framework/src/android/net/UidRange.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,8 @@ public final class UidRange implements Parcelable { /** Creates a UidRange for the specified user. */ public static UidRange createForUser(UserHandle user) { final UserHandle nextUser = UserHandle.of(user.getIdentifier() + 1); final int start = UserHandle.getUid(user, 0 /* appId */); final int end = UserHandle.getUid(nextUser, 0) - 1; final int start = user.getUid(0 /* appId */); final int end = nextUser.getUid(0 /* appId */) - 1; return new UidRange(start, end); } Loading
services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -9804,7 +9804,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } for (final UserHandle ui : users) { // Add the rules for all users as this policy is device wide. uids.get(pref).add(UserHandle.getUid(ui, uid)); uids.get(pref).add(ui.getUid(uid)); } } catch (PackageManager.NameNotFoundException e) { // Although this may seem like an error scenario, it is ok that uninstalled Loading
services/core/java/com/android/server/connectivity/PermissionMonitor.java +2 −2 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public class PermissionMonitor { for (UserHandle user : users) { if (user == null) continue; list.add(UserHandle.getUid(user, app.getKey())); list.add(user.getUid(app.getKey())); } } try { Loading Loading @@ -555,7 +555,7 @@ public class PermissionMonitor { final UserHandle handle = UserHandle.of(userId); if (handle == null) continue; final int uid = UserHandle.getUid(handle, appId); final int uid = handle.getUid(appId); if (range.contains(uid)) { result.add(uid); } Loading