Lines Matching refs:ranges

846      * the UID ranges will match the app whitelist or blacklist specified there. Otherwise, all UIDs
849 * @param userHandle The userId to create UID ranges for along with any of its restricted
858 final Set<UidRange> ranges = new ArraySet<>();
860 // Assign the top-level user to the set of ranges
861 addUserToRanges(ranges, userHandle, allowedApplications, disallowedApplications);
874 addUserToRanges(ranges, user.id, allowedApplications, disallowedApplications);
878 return ranges;
886 * the UID ranges will match the app whitelist or blacklist specified there. Otherwise, all UIDs
889 * @param ranges {@link Set} of {@link UidRange}s to which to add.
890 * @param userHandle The userId to add to {@param ranges}.
895 void addUserToRanges(@NonNull Set<UidRange> ranges, @UserIdInt int userHandle,
899 // Add ranges covering all UIDs for allowedApplications.
905 ranges.add(new UidRange(start, stop));
910 if (start != -1) ranges.add(new UidRange(start, stop));
912 // Add all ranges for user skipping UIDs for disallowedApplications.
919 ranges.add(new UidRange(start, uid - 1));
923 if (start <= userRange.stop) ranges.add(new UidRange(start, userRange.stop));
926 ranges.add(UidRange.createForUser(userHandle));
930 // Returns the subset of the full list of active UID ranges the VPN applies to (mVpnUsers) that
934 final List<UidRange> ranges = new ArrayList<UidRange>();
937 ranges.add(range);
940 return ranges;
947 final List<UidRange> ranges = uidRangesForUser(userHandle);
949 mNetworkAgent.removeUidRanges(ranges.toArray(new UidRange[ranges.size()]));
951 mVpnUsers.removeAll(ranges);
964 final List<UidRange> ranges = uidRangesForUser(userHandle);
965 mNetworkAgent.addUidRanges(ranges.toArray(new UidRange[ranges.size()]));
1050 * @param ranges {@link Collection} of {@link UidRange}s to add (if {@param enforce} is
1053 * including added ranges that already existed or removed ones that didn't.
1056 private boolean setAllowOnlyVpnForUids(boolean enforce, Collection<UidRange> ranges) {
1057 if (ranges.size() == 0) {
1060 final UidRange[] rangesArray = ranges.toArray(new UidRange[ranges.size()]);
1065 + " for UIDs " + Arrays.toString(ranges.toArray()) + " failed", e);
1069 mBlockedUsers.addAll(ranges);
1071 mBlockedUsers.removeAll(ranges);
1231 * A UID is blocked if it's included in one of the mBlockedUsers ranges and the VPN is