/frameworks/base/core/java/android/net/ |
D | UidRange.java | 31 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 …]
|
D | NetworkCapabilities.java | 1122 private ArraySet<UidRange> mUids = null; 1129 final ArraySet<UidRange> identity = new ArraySet<>(1); in setSingleUid() 1130 identity.add(new UidRange(uid, uid)); in setSingleUid() 1140 public @NonNull NetworkCapabilities setUids(Set<UidRange> uids) { in setUids() 1154 public @Nullable Set<UidRange> getUids() { in getUids() 1164 for (UidRange range : mUids) { in appliesToUid() 1188 Set<UidRange> comparedUids = nc.mUids; in equalsUids() 1193 final Set<UidRange> uids = new ArraySet<>(mUids); in equalsUids() 1194 for (UidRange range : comparedUids) { in equalsUids() 1222 for (UidRange requiredRange : mUids) { in satisfiedByUids() [all …]
|
D | UidRange.aidl | 24 parcelable UidRange;
|
D | NetworkRequest.java | 220 public Builder setUids(Set<UidRange> uids) { in setUids()
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | VpnTest.java | 67 import android.net.UidRange; 185 final Set<UidRange> ranges = vpn.createUserAndRestrictedProfilesRanges(primaryUser.id, in testRestrictedProfilesAreAddedToVpn() 188 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testRestrictedProfilesAreAddedToVpn() 189 UidRange.createForUser(primaryUser.id), in testRestrictedProfilesAreAddedToVpn() 190 UidRange.createForUser(restrictedProfileA.id) in testRestrictedProfilesAreAddedToVpn() 199 final Set<UidRange> ranges = vpn.createUserAndRestrictedProfilesRanges(primaryUser.id, in testManagedProfilesAreNotAddedToVpn() 202 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testManagedProfilesAreNotAddedToVpn() 203 UidRange.createForUser(primaryUser.id) in testManagedProfilesAreNotAddedToVpn() 212 final Set<UidRange> ranges = new ArraySet<>(); in testAddUserToVpnOnlyAddsOneUser() 215 assertEquals(new ArraySet<>(Arrays.asList(new UidRange[] { in testAddUserToVpnOnlyAddsOneUser() [all …]
|
D | PermissionMonitorTest.java | 62 import android.net.UidRange; 417 final Set<UidRange> vpnRange1 = new HashSet<>(Arrays.asList(new UidRange[] { in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates() 418 new UidRange(0, MOCK_UID2 - 1), in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates() 419 new UidRange(MOCK_UID2 + 1, UserHandle.PER_USER_RANGE - 1)})); in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates() 420 final Set<UidRange> vpnRange2 = Collections.singleton(new UidRange(MOCK_UID2, MOCK_UID2)); in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates() 465 final Set<UidRange> vpnRange = Collections.singleton(UidRange.createForUser(MOCK_USER1)); in testUidFilteringDuringPackageInstallAndUninstall()
|
/frameworks/base/tests/net/java/android/net/ |
D | UidRangeTest.java | 38 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/tests/net/common/java/android/net/ |
D | NetworkCapabilitiesTest.java | 206 final Set<UidRange> uids = new ArraySet<>(); in testSetUids() 207 uids.add(new UidRange(50, 100)); in testSetUids() 208 uids.add(new UidRange(3000, 4000)); in testSetUids() 222 assertTrue(netCap.appliesToUidRange(new UidRange(50, 100))); in testSetUids() 223 assertTrue(netCap.appliesToUidRange(new UidRange(70, 72))); in testSetUids() 224 assertTrue(netCap.appliesToUidRange(new UidRange(3500, 3912))); in testSetUids() 225 assertFalse(netCap.appliesToUidRange(new UidRange(1, 100))); in testSetUids() 226 assertFalse(netCap.appliesToUidRange(new UidRange(49, 100))); in testSetUids() 227 assertFalse(netCap.appliesToUidRange(new UidRange(1, 10))); in testSetUids() 228 assertFalse(netCap.appliesToUidRange(new UidRange(60, 101))); in testSetUids() [all …]
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | PermissionMonitor.java | 40 import android.net.UidRange; 97 private final Map<String, Set<UidRange>> mVpnUidRanges = new HashMap<>(); 398 for (Map.Entry<String, Set<UidRange>> vpn : mVpnUidRanges.entrySet()) { in onPackageAdded() 399 if (UidRange.containsUid(vpn.getValue(), uid)) { in onPackageAdded() 420 for (Map.Entry<String, Set<UidRange>> vpn : mVpnUidRanges.entrySet()) { in onPackageRemoved() 421 if (UidRange.containsUid(vpn.getValue(), uid)) { in onPackageRemoved() 495 public synchronized void onVpnUidRangesAdded(@NonNull String iface, Set<UidRange> rangesToAdd, in onVpnUidRangesAdded() 507 mVpnUidRanges.put(iface, new HashSet<UidRange>(rangesToAdd)); in onVpnUidRangesAdded() 519 Set<UidRange> rangesToRemove, int vpnAppUid) { in onVpnUidRangesRemoved() 525 Set<UidRange> existingRanges = mVpnUidRanges.getOrDefault(iface, null); in onVpnUidRangesRemoved() [all …]
|
D | Vpn.java | 63 import android.net.UidRange; 210 private Set<UidRange> mBlockedUsers = new ArraySet<>(); 1071 Set<UidRange> oldUsers = mNetworkCapabilities.getUids(); in establish() 1183 Set<UidRange> createUserAndRestrictedProfilesRanges(@UserIdInt int userHandle, in createUserAndRestrictedProfilesRanges() 1186 final Set<UidRange> ranges = new ArraySet<>(); in createUserAndRestrictedProfilesRanges() 1223 void addUserToRanges(@NonNull Set<UidRange> ranges, @UserIdInt int userHandle, in addUserToRanges() 1233 ranges.add(new UidRange(start, stop)); in addUserToRanges() 1238 if (start != -1) ranges.add(new UidRange(start, stop)); in addUserToRanges() 1241 final UidRange userRange = UidRange.createForUser(userHandle); in addUserToRanges() 1247 ranges.add(new UidRange(start, uid - 1)); in addUserToRanges() [all …]
|
/frameworks/base/core/java/android/os/ |
D | INetworkManagementService.aidl | 26 import android.net.UidRange; 343 void addVpnUidRanges(int netId, in UidRange[] ranges); in addVpnUidRanges() 348 void removeVpnUidRanges(int netId, in UidRange[] ranges); in removeVpnUidRanges() 401 void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges); in setAllowOnlyVpnForUids()
|
/frameworks/base/tests/net/java/com/android/server/ |
D | ConnectivityServiceTest.java | 153 import android.net.UidRange; 674 public void setUids(Set<UidRange> uids) { in setUids() 1010 public void setUids(Set<UidRange> uids) { in setUids() 3314 final ArraySet<UidRange> ranges = new ArraySet<>(); in testRegisterDefaultNetworkCallback() 3315 ranges.add(new UidRange(uid, uid)); in testRegisterDefaultNetworkCallback() 5360 final ArraySet<UidRange> ranges = new ArraySet<>(); in testVpnNetworkActive() 5361 ranges.add(new UidRange(uid, uid)); in testVpnNetworkActive() 5402 ranges.add(new UidRange(uid, uid)); in testVpnNetworkActive() 5451 final ArraySet<UidRange> ranges = new ArraySet<>(); in testVpnWithoutInternet() 5452 ranges.add(new UidRange(uid, uid)); in testVpnWithoutInternet() [all …]
|
/frameworks/base/services/core/java/com/android/server/ |
D | NetworkManagementService.java | 63 import android.net.UidRange; 1454 private static UidRangeParcel[] toStableParcels(UidRange[] ranges) { in toStableParcels() 1463 public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges) in setAllowOnlyVpnForUids() 1618 public void addVpnUidRanges(int netId, UidRange[] ranges) { in addVpnUidRanges() 1629 public void removeVpnUidRanges(int netId, UidRange[] ranges) { in removeVpnUidRanges()
|
D | ConnectivityService.java | 109 import android.net.UidRange; 5712 final Set<UidRange> ranges = nai.networkCapabilities.getUids(); in updateVpnFiltering() 5898 Set<UidRange> prevRanges = null == prevNc ? null : prevNc.getUids(); in updateUids() 5899 Set<UidRange> newRanges = null == newNc ? null : newNc.getUids(); in updateUids() 5902 final Set<UidRange> prevRangesCopy = new ArraySet<>(prevRanges); in updateUids() 5915 final UidRange[] addedRangesArray = new UidRange[newRanges.size()]; in updateUids() 5920 final UidRange[] removedRangesArray = new UidRange[prevRanges.size()]; in updateUids()
|
/frameworks/base/config/ |
D | dirty-image-objects | 135 android.net.UidRange
|
D | preloaded-classes | 2588 android.net.UidRange$1 2589 android.net.UidRange
|
/frameworks/base/services/ |
D | art-profile | 1419 PLcom/android/server/NetworkManagementService;->addVpnUidRanges(I[Landroid/net/UidRange;)V
|