Home
last modified time | relevance | path

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

/frameworks/base/core/java/android/net/
DUidRange.java31 public final class UidRange implements Parcelable { class
35 public UidRange(int startUid, int stopUid) { in UidRange() method in UidRange
43 public static UidRange createForUser(int userId) { in createForUser()
44 return new UidRange(userId * PER_USER_RANGE, (userId + 1) * PER_USER_RANGE - 1); in createForUser()
71 public boolean containsRange(UidRange other) { in containsRange()
88 if (o instanceof UidRange) { in equals()
89 UidRange other = (UidRange) o; in equals()
114 public static final @android.annotation.NonNull Creator<UidRange> CREATOR =
115 new Creator<UidRange>() {
117 public UidRange createFromParcel(Parcel in) {
[all …]
DNetworkCapabilities.java1345 private ArraySet<UidRange> mUids = null;
1352 final ArraySet<UidRange> identity = new ArraySet<>(1); in setSingleUid()
1353 identity.add(new UidRange(uid, uid)); in setSingleUid()
1363 public @NonNull NetworkCapabilities setUids(Set<UidRange> uids) { in setUids()
1377 public @Nullable Set<UidRange> getUids() { in getUids()
1387 for (UidRange range : mUids) { in appliesToUid()
1411 Set<UidRange> comparedUids = nc.mUids; in equalsUids()
1416 final Set<UidRange> uids = new ArraySet<>(mUids); in equalsUids()
1417 for (UidRange range : comparedUids) { in equalsUids()
1445 for (UidRange requiredRange : mUids) { in satisfiedByUids()
[all …]
DUidRange.aidl24 parcelable UidRange;
DNetworkRequest.java221 public Builder setUids(Set<UidRange> uids) { in setUids()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DVpnTest.java72 import android.net.UidRange;
225 final Set<UidRange> ranges = vpn.createUserAndRestrictedProfilesRanges(primaryUser.id, in testRestrictedProfilesAreAddedToVpn()
228 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testRestrictedProfilesAreAddedToVpn()
229 UidRange.createForUser(primaryUser.id), in testRestrictedProfilesAreAddedToVpn()
230 UidRange.createForUser(restrictedProfileA.id) in testRestrictedProfilesAreAddedToVpn()
239 final Set<UidRange> ranges = vpn.createUserAndRestrictedProfilesRanges(primaryUser.id, in testManagedProfilesAreNotAddedToVpn()
242 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testManagedProfilesAreNotAddedToVpn()
243 UidRange.createForUser(primaryUser.id) in testManagedProfilesAreNotAddedToVpn()
252 final Set<UidRange> ranges = new ArraySet<>(); in testAddUserToVpnOnlyAddsOneUser()
255 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testAddUserToVpnOnlyAddsOneUser()
[all …]
DPermissionMonitorTest.java62 import android.net.UidRange;
450 final Set<UidRange> vpnRange1 = new HashSet<>(Arrays.asList(new UidRange[] { in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
451 new UidRange(0, MOCK_UID2 - 1), in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
452 new UidRange(MOCK_UID2 + 1, UserHandle.PER_USER_RANGE - 1)})); in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
453 final Set<UidRange> vpnRange2 = Collections.singleton(new UidRange(MOCK_UID2, MOCK_UID2)); in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
499 final Set<UidRange> vpnRange = Collections.singleton(UidRange.createForUser(MOCK_USER1)); in testUidFilteringDuringPackageInstallAndUninstall()
/frameworks/base/tests/net/java/android/net/
DUidRangeTest.java38 new UidRange(123, 123); in testSingleItemUidRangeAllowed()
39 new UidRange(0, 0); in testSingleItemUidRangeAllowed()
40 new UidRange(Integer.MAX_VALUE, Integer.MAX_VALUE); in testSingleItemUidRangeAllowed()
46 new UidRange(-2, 100); in testNegativeUidsDisallowed()
52 new UidRange(-200, -100); in testNegativeUidsDisallowed()
62 new UidRange(x, x - 1); in testStopLessThanStartDisallowed()
/frameworks/base/services/core/java/com/android/server/connectivity/
DPermissionMonitor.java49 import android.net.UidRange;
105 private final Map<String, Set<UidRange>> mVpnUidRanges = new HashMap<>();
380 for (Map.Entry<String, Set<UidRange>> vpn : mVpnUidRanges.entrySet()) { in onPackageAdded()
381 if (UidRange.containsUid(vpn.getValue(), uid)) { in onPackageAdded()
406 for (Map.Entry<String, Set<UidRange>> vpn : mVpnUidRanges.entrySet()) { in onPackageRemoved()
407 if (UidRange.containsUid(vpn.getValue(), uid)) { in onPackageRemoved()
488 public synchronized void onVpnUidRangesAdded(@NonNull String iface, Set<UidRange> rangesToAdd, in onVpnUidRangesAdded()
500 mVpnUidRanges.put(iface, new HashSet<UidRange>(rangesToAdd)); in onVpnUidRangesAdded()
512 Set<UidRange> rangesToRemove, int vpnAppUid) { in onVpnUidRangesRemoved()
518 Set<UidRange> existingRanges = mVpnUidRanges.getOrDefault(iface, null); in onVpnUidRangesRemoved()
[all …]
DVpn.java70 import android.net.UidRange;
250 private final Set<UidRange> mBlockedUidsAsToldToNetd = new ArraySet<>();
1203 Set<UidRange> oldUsers = mNetworkCapabilities.getUids();
1320 Set<UidRange> createUserAndRestrictedProfilesRanges(@UserIdInt int userHandle,
1323 final Set<UidRange> ranges = new ArraySet<>();
1360 void addUserToRanges(@NonNull Set<UidRange> ranges, @UserIdInt int userHandle,
1370 ranges.add(new UidRange(start, stop));
1375 if (start != -1) ranges.add(new UidRange(start, stop));
1378 final UidRange userRange = UidRange.createForUser(userHandle);
1384 ranges.add(new UidRange(start, uid - 1));
[all …]
/frameworks/base/tests/net/common/java/android/net/
DNetworkCapabilitiesTest.java238 final Set<UidRange> uids = new ArraySet<>(); in testSetUids()
239 uids.add(new UidRange(50, 100)); in testSetUids()
240 uids.add(new UidRange(3000, 4000)); in testSetUids()
254 assertTrue(netCap.appliesToUidRange(new UidRange(50, 100))); in testSetUids()
255 assertTrue(netCap.appliesToUidRange(new UidRange(70, 72))); in testSetUids()
256 assertTrue(netCap.appliesToUidRange(new UidRange(3500, 3912))); in testSetUids()
257 assertFalse(netCap.appliesToUidRange(new UidRange(1, 100))); in testSetUids()
258 assertFalse(netCap.appliesToUidRange(new UidRange(49, 100))); in testSetUids()
259 assertFalse(netCap.appliesToUidRange(new UidRange(1, 10))); in testSetUids()
260 assertFalse(netCap.appliesToUidRange(new UidRange(60, 101))); in testSetUids()
[all …]
/frameworks/base/core/java/android/os/
DINetworkManagementService.aidl26 import android.net.UidRange;
331 void addVpnUidRanges(int netId, in UidRange[] ranges); in addVpnUidRanges()
336 void removeVpnUidRanges(int netId, in UidRange[] ranges); in removeVpnUidRanges()
389 void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges); in setAllowOnlyVpnForUids()
/frameworks/base/tests/net/integration/util/com/android/server/
DNetworkAgentWrapper.java45 import android.net.UidRange;
184 public void setUids(Set<UidRange> uids) { in setUids()
/frameworks/base/tests/net/java/com/android/server/
DConnectivityServiceTest.java185 import android.net.UidRange;
1044 public void setUids(Set<UidRange> uids) { in setUids()
3212 final ArraySet<UidRange> ranges = new ArraySet<>(); in testRegisterDefaultNetworkCallback()
3213 ranges.add(new UidRange(uid, uid)); in testRegisterDefaultNetworkCallback()
5233 final ArraySet<UidRange> ranges = new ArraySet<>(); in testVpnNetworkActive()
5234 ranges.add(new UidRange(uid, uid)); in testVpnNetworkActive()
5276 ranges.add(new UidRange(uid, uid)); in testVpnNetworkActive()
5326 final ArraySet<UidRange> ranges = new ArraySet<>(); in testVpnWithoutInternet()
5327 ranges.add(new UidRange(uid, uid)); in testVpnWithoutInternet()
5358 final ArraySet<UidRange> ranges = new ArraySet<>(); in testVpnWithInternet()
[all …]
/frameworks/base/services/core/java/com/android/server/
DNetworkManagementService.java62 import android.net.UidRange;
1400 private static UidRangeParcel[] toStableParcels(UidRange[] ranges) { in toStableParcels()
1409 public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges) in setAllowOnlyVpnForUids()
1553 public void addVpnUidRanges(int netId, UidRange[] ranges) { in addVpnUidRanges()
1564 public void removeVpnUidRanges(int netId, UidRange[] ranges) { in removeVpnUidRanges()
DConnectivityService.java130 import android.net.UidRange;
6207 final Set<UidRange> ranges = nai.networkCapabilities.getUids(); in updateVpnFiltering()
6419 Set<UidRange> prevRanges = null == prevNc ? null : prevNc.getUids(); in updateUids()
6420 Set<UidRange> newRanges = null == newNc ? null : newNc.getUids(); in updateUids()
6423 final Set<UidRange> prevRangesCopy = new ArraySet<>(prevRanges); in updateUids()
6436 final UidRange[] addedRangesArray = new UidRange[newRanges.size()]; in updateUids()
6441 final UidRange[] removedRangesArray = new UidRange[prevRanges.size()]; in updateUids()
/frameworks/base/config/
Ddirty-image-objects135 android.net.UidRange
Dpreloaded-classes2588 android.net.UidRange$1
2589 android.net.UidRange
Dhiddenapi-greylist-max-o.txt43152 Landroid/net/INetd$Stub$Proxy;->networkAddUidRanges(I[Landroid/net/UidRange;)V
43156 Landroid/net/INetd$Stub$Proxy;->networkRejectNonSecureVpn(Z[Landroid/net/UidRange;)V
43158 Landroid/net/INetd$Stub$Proxy;->networkRemoveUidRanges(I[Landroid/net/UidRange;)V
43164 Landroid/net/INetd$Stub$Proxy;->socketDestroy([Landroid/net/UidRange;[I)V
43237 Landroid/net/INetd;->networkAddUidRanges(I[Landroid/net/UidRange;)V
43241 Landroid/net/INetd;->networkRejectNonSecureVpn(Z[Landroid/net/UidRange;)V
43243 Landroid/net/INetd;->networkRemoveUidRanges(I[Landroid/net/UidRange;)V
43264 Landroid/net/INetd;->socketDestroy([Landroid/net/UidRange;[I)V
44279 Landroid/net/NetworkCapabilities;->appliesToUidRange(Landroid/net/UidRange;)Z
45331 Landroid/net/UidRange;-><init>(II)V
[all …]
Dboot-image-profile.txt10562 HSPLandroid/net/UidRange$1;-><init>()V
10563 HSPLandroid/net/UidRange$1;->createFromParcel(Landroid/os/Parcel;)Landroid/net/UidRange;
10564 HSPLandroid/net/UidRange$1;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;
10565 HSPLandroid/net/UidRange;-><init>(II)V
10566 HSPLandroid/net/UidRange;->equals(Ljava/lang/Object;)Z
10567 HSPLandroid/net/UidRange;->hashCode()I
10568 HSPLandroid/net/UidRange;->writeToParcel(Landroid/os/Parcel;I)V
34953 Landroid/net/UidRange$1;
34954 Landroid/net/UidRange;
/frameworks/base/services/
Dart-profile1419 PLcom/android/server/NetworkManagementService;->addVpnUidRanges(I[Landroid/net/UidRange;)V