Remove UidRange.createForUser() with userId integers

UidRange will be a part of connectivity mainline module.
Mainline modules should use strongly-typed UserHandle arguments.
The method also refer to the hidden UserHandle.PER_USER_RANGE
which is not available after UidRange is moved into module.
Thus, replace the usage and remove the createForUser method that
takes userId parameter.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I3f33ea92c4a24342af9ec4b0367c50bb64ce6450
This commit is contained in:
Chiachang Wang 2021-02-19 17:26:34 +08:00
commit c94d3238a3

View file

@ -42,10 +42,6 @@ public final class UidRange implements Parcelable {
stop = stopUid;
}
public static UidRange createForUser(int userId) {
return new UidRange(userId * PER_USER_RANGE, (userId + 1) * PER_USER_RANGE - 1);
}
/** Creates a UidRange for the specified user. */
public static UidRange createForUser(UserHandle user) {
final UserHandle nextUser = UserHandle.of(user.getIdentifier() + 1);