Home
last modified time | relevance | path

Searched refs:UidRange (Results 1 – 15 of 15) sorted by relevance

/frameworks/base/core/java/android/net/
DUidRange.java29 public final class UidRange implements Parcelable { class
33 public UidRange(int startUid, int stopUid) { in UidRange() method in UidRange
41 public static UidRange createForUser(int userId) { in createForUser()
42 return new UidRange(userId * PER_USER_RANGE, (userId + 1) * PER_USER_RANGE - 1); in createForUser()
63 public boolean containsRange(UidRange other) { in containsRange()
80 if (o instanceof UidRange) { in equals()
81 UidRange other = (UidRange) o; in equals()
104 public static final Creator<UidRange> CREATOR =
105 new Creator<UidRange>() {
107 public UidRange createFromParcel(Parcel in) {
[all …]
DNetworkCapabilities.java1018 private ArraySet<UidRange> mUids = null;
1025 final ArraySet<UidRange> identity = new ArraySet<>(1); in setSingleUid()
1026 identity.add(new UidRange(uid, uid)); in setSingleUid()
1036 public NetworkCapabilities setUids(Set<UidRange> uids) { in setUids()
1050 public Set<UidRange> getUids() { in getUids()
1060 for (UidRange range : mUids) { in appliesToUid()
1084 Set<UidRange> comparedUids = nc.mUids; in equalsUids()
1089 final Set<UidRange> uids = new ArraySet<>(mUids); in equalsUids()
1090 for (UidRange range : comparedUids) { in equalsUids()
1118 for (UidRange requiredRange : mUids) { in satisfiedByUids()
[all …]
DNetworkRequest.java213 public Builder setUids(Set<UidRange> uids) { in setUids()
/frameworks/base/tests/net/java/android/net/
DUidRangeTest.java44 UidRange original = new UidRange(1234, Integer.MAX_VALUE); in testNativeParcelUnparcel()
48 UidRange roundTrip = unmarshall(outParcel); in testNativeParcelUnparcel()
56 UidRange original = new UidRange(0x11115678, 0x22224321); in testIndividualNativeFields()
65 new UidRange(123, 123); in testSingleItemUidRangeAllowed()
66 new UidRange(0, 0); in testSingleItemUidRangeAllowed()
67 new UidRange(Integer.MAX_VALUE, Integer.MAX_VALUE); in testSingleItemUidRangeAllowed()
73 new UidRange(-2, 100); in testNegativeUidsDisallowed()
79 new UidRange(-200, -100); in testNegativeUidsDisallowed()
89 new UidRange(x, x - 1); in testStopLessThanStartDisallowed()
100 private static byte[] marshall(UidRange range) { in marshall()
[all …]
DNetworkCapabilitiesTest.java202 final Set<UidRange> uids = new ArraySet<>(); in testSetUids()
203 uids.add(new UidRange(50, 100)); in testSetUids()
204 uids.add(new UidRange(3000, 4000)); in testSetUids()
218 assertTrue(netCap.appliesToUidRange(new UidRange(50, 100))); in testSetUids()
219 assertTrue(netCap.appliesToUidRange(new UidRange(70, 72))); in testSetUids()
220 assertTrue(netCap.appliesToUidRange(new UidRange(3500, 3912))); in testSetUids()
221 assertFalse(netCap.appliesToUidRange(new UidRange(1, 100))); in testSetUids()
222 assertFalse(netCap.appliesToUidRange(new UidRange(49, 100))); in testSetUids()
223 assertFalse(netCap.appliesToUidRange(new UidRange(1, 10))); in testSetUids()
224 assertFalse(netCap.appliesToUidRange(new UidRange(60, 101))); in testSetUids()
[all …]
/frameworks/base/tests/net/java/com/android/server/connectivity/
DVpnTest.java67 import android.net.UidRange;
182 final Set<UidRange> ranges = vpn.createUserAndRestrictedProfilesRanges(primaryUser.id, in testRestrictedProfilesAreAddedToVpn()
185 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testRestrictedProfilesAreAddedToVpn()
186 UidRange.createForUser(primaryUser.id), in testRestrictedProfilesAreAddedToVpn()
187 UidRange.createForUser(restrictedProfileA.id) in testRestrictedProfilesAreAddedToVpn()
196 final Set<UidRange> ranges = vpn.createUserAndRestrictedProfilesRanges(primaryUser.id, in testManagedProfilesAreNotAddedToVpn()
199 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testManagedProfilesAreNotAddedToVpn()
200 UidRange.createForUser(primaryUser.id) in testManagedProfilesAreNotAddedToVpn()
209 final Set<UidRange> ranges = new ArraySet<>(); in testAddUserToVpnOnlyAddsOneUser()
212 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testAddUserToVpnOnlyAddsOneUser()
[all …]
/frameworks/base/tests/net/jni/
DUidRangeTest.cpp23 using android::net::UidRange;
28 const UidRange range = unmarshall(env, inParcel); in Java_android_net_UidRangeTest_readAndWriteNative()
34 const UidRange range = unmarshall(env, inParcel); in Java_android_net_UidRangeTest_getStart()
40 const UidRange range = unmarshall(env, inParcel); in Java_android_net_UidRangeTest_getStop()
49 UidRange unmarshall(JNIEnv* env, jbyteArray parcelData) { in unmarshall()
58 UidRange range; in unmarshall()
70 jbyteArray marshall(JNIEnv* env, const UidRange& range) { in marshall()
DUidRangeTest.h24 android::net::UidRange unmarshall(JNIEnv* env, jbyteArray parcelData);
26 jbyteArray marshall(JNIEnv* env, const android::net::UidRange& range);
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java62 import android.net.UidRange;
204 private Set<UidRange> mBlockedUsers = new ArraySet<>();
1043 Set<UidRange> oldUsers = mNetworkCapabilities.getUids(); in establish()
1155 Set<UidRange> createUserAndRestrictedProfilesRanges(@UserIdInt int userHandle, in createUserAndRestrictedProfilesRanges()
1158 final Set<UidRange> ranges = new ArraySet<>(); in createUserAndRestrictedProfilesRanges()
1195 void addUserToRanges(@NonNull Set<UidRange> ranges, @UserIdInt int userHandle, in addUserToRanges()
1205 ranges.add(new UidRange(start, stop)); in addUserToRanges()
1210 if (start != -1) ranges.add(new UidRange(start, stop)); in addUserToRanges()
1213 final UidRange userRange = UidRange.createForUser(userHandle); in addUserToRanges()
1219 ranges.add(new UidRange(start, uid - 1)); in addUserToRanges()
[all …]
/frameworks/base/core/java/android/os/
DINetworkManagementService.aidl27 import android.net.UidRange;
357 void addVpnUidRanges(int netId, in UidRange[] ranges); in addVpnUidRanges()
362 void removeVpnUidRanges(int netId, in UidRange[] ranges); in removeVpnUidRanges()
450 void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges); in setAllowOnlyVpnForUids()
/frameworks/base/services/core/java/com/android/server/
DNetworkManagementService.java70 import android.net.UidRange;
1790 public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges) in setAllowOnlyVpnForUids()
1960 public void addVpnUidRanges(int netId, UidRange[] ranges) { in addVpnUidRanges()
1982 public void removeVpnUidRanges(int netId, UidRange[] ranges) { in removeVpnUidRanges()
2034 UidRange[] ranges; in closeSocketsForFirewallChainLocked()
2042 ranges = new UidRange[] { in closeSocketsForFirewallChainLocked()
2045 new UidRange(Process.FIRST_APPLICATION_UID, Integer.MAX_VALUE), in closeSocketsForFirewallChainLocked()
2072 ranges = new UidRange[rules.size()]; in closeSocketsForFirewallChainLocked()
2076 ranges[numUids] = new UidRange(uid, uid); in closeSocketsForFirewallChainLocked()
DConnectivityService.java81 import android.net.UidRange;
4985 Set<UidRange> prevRanges = null == prevNc ? null : prevNc.getUids(); in updateUids()
4986 Set<UidRange> newRanges = null == newNc ? null : newNc.getUids(); in updateUids()
4989 final Set<UidRange> prevRangesCopy = new ArraySet<>(prevRanges); in updateUids()
4996 final UidRange[] addedRangesArray = new UidRange[newRanges.size()]; in updateUids()
5001 final UidRange[] removedRangesArray = new UidRange[prevRanges.size()]; in updateUids()
/frameworks/base/tests/net/java/com/android/server/
DConnectivityServiceTest.java114 import android.net.UidRange;
469 public void setUids(Set<UidRange> uids) { in setUids()
776 public void setUids(Set<UidRange> uids) { in setUids()
2675 final ArraySet<UidRange> ranges = new ArraySet<>(); in testRegisterDefaultNetworkCallback()
2676 ranges.add(new UidRange(uid, uid)); in testRegisterDefaultNetworkCallback()
4207 final ArraySet<UidRange> ranges = new ArraySet<>(); in testVpnNetworkActive()
4208 ranges.add(new UidRange(uid, uid)); in testVpnNetworkActive()
4243 ranges.add(new UidRange(uid, uid)); in testVpnNetworkActive()
4292 final ArraySet<UidRange> ranges = new ArraySet<>(); in testVpnWithAndWithoutInternet()
4293 ranges.add(new UidRange(uid, uid)); in testVpnWithAndWithoutInternet()
[all …]
/frameworks/base/config/
Dpreloaded-classes2287 android.net.UidRange
2288 android.net.UidRange$1
Dboot-image-profile.txt25855 HSPLandroid/net/INetd$Stub$Proxy;->socketDestroy([Landroid/net/UidRange;[I)V
25876 HSPLandroid/net/INetd;->networkAddUidRanges(I[Landroid/net/UidRange;)V
25880 HSPLandroid/net/INetd;->networkRejectNonSecureVpn(Z[Landroid/net/UidRange;)V
25882 HSPLandroid/net/INetd;->networkRemoveUidRanges(I[Landroid/net/UidRange;)V
25888 HSPLandroid/net/INetd;->socketDestroy([Landroid/net/UidRange;[I)V
26351 HSPLandroid/net/UidRange$1;-><init>()V
26352 HSPLandroid/net/UidRange$1;->createFromParcel(Landroid/os/Parcel;)Landroid/net/UidRange;
26353 HSPLandroid/net/UidRange$1;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;
26354 HSPLandroid/net/UidRange;-><init>(II)V
26355 HSPLandroid/net/UidRange;->equals(Ljava/lang/Object;)Z
[all …]