Merge "Make some of the UID-based VPN code reusable" into nyc-dev
am: 89bf3e3aa2
* commit '89bf3e3aa2b3e95486445a50f4666a20b3d8e830':
Make some of the UID-based VPN code reusable
Change-Id: I3f1b1a08059aa58cb76db6cdd070b103024b9bf3
This commit is contained in:
@@ -48,6 +48,17 @@ public final class UidRange implements Parcelable {
|
||||
return start / PER_USER_RANGE;
|
||||
}
|
||||
|
||||
public boolean contains(int uid) {
|
||||
return start <= uid && uid <= stop;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if this range contains every UID contained by the {@param other} range.
|
||||
*/
|
||||
public boolean containsRange(UidRange other) {
|
||||
return start <= other.start && other.stop <= stop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
|
||||
Reference in New Issue
Block a user