Home
last modified time | relevance | path

Searched refs:Range (Results 1 – 25 of 138) sorted by relevance

123456

/packages/modules/AdServices/shared/tests/side-less/java/com/android/adservices/shared/testing/
DAndroidSdkRangeTest.java18 import static com.android.adservices.shared.testing.AndroidSdk.Range.forAnyLevel;
19 import static com.android.adservices.shared.testing.AndroidSdk.Range.forAtLeast;
20 import static com.android.adservices.shared.testing.AndroidSdk.Range.forAtMost;
21 import static com.android.adservices.shared.testing.AndroidSdk.Range.forExactly;
22 import static com.android.adservices.shared.testing.AndroidSdk.Range.forRange;
23 import static com.android.adservices.shared.testing.AndroidSdk.Range.merge;
30 import com.android.adservices.shared.testing.AndroidSdk.Range;
47 Range atLeast33 = forAtLeast(33); in testIsInRange()
55 Range atMost33 = forAtMost(33); in testIsInRange()
64 Range exactly33Indirectly = forRange(33, 33); in testIsInRange()
[all …]
DAbstractSdkLevelSupportedRuleTest.java34 import com.android.adservices.shared.testing.AndroidSdk.Range;
144 var ruleRange = Range.forRange(R.getLevel(), U.getLevel()); in testPassesWhenDeviceLevelIsInRange()
160 var ruleRange = Range.forRange(R.getLevel(), S.getLevel()); in testSkipsWhenDeviceLevelIsOutsideRange()
181 assertGetRequiredRangeForUnannotatedTest(/* ruleRange= */ Range.forAnyLevel()); in testGetRequiredRange_unannotatedTest()
182 assertGetRequiredRangeForUnannotatedTest(/* ruleRange= */ Range.forAtLeast(42)); in testGetRequiredRange_unannotatedTest()
183 assertGetRequiredRangeForUnannotatedTest(/* ruleRange= */ Range.forAtMost(42)); in testGetRequiredRange_unannotatedTest()
184 assertGetRequiredRangeForUnannotatedTest(/* ruleRange= */ Range.forExactly(42)); in testGetRequiredRange_unannotatedTest()
185 assertGetRequiredRangeForUnannotatedTest(/* ruleRange= */ Range.forRange(42, 108)); in testGetRequiredRange_unannotatedTest()
188 private void assertGetRequiredRangeForUnannotatedTest(Range ruleRange) { in assertGetRequiredRangeForUnannotatedTest()
216 var ruleForAnyLevel = Range.forAnyLevel(); in testGetRequiredRange_annotatedTest()
[all …]
DRequiredRangeTest.java19 import com.android.adservices.shared.testing.AndroidSdk.Range;
30 var range = Range.forAnyLevel(); in testToString()
41 var range1 = Range.forAnyLevel(); in testEqualsHashCode()
42 var range2 = Range.forExactly(42); in testEqualsHashCode()
/packages/modules/AdServices/shared/libraries/side-less/java/com/android/adservices/shared/testing/
DAndroidSdk.java119 public static final class Range { class in AndroidSdk
127 private Range(int minLevel, int maxLevel) { in Range() method in AndroidSdk.Range
141 public static Range forAtLeast(int level) { in forAtLeast()
142 return new Range(/* minLevel= */ level, NO_MAX); in forAtLeast()
146 public static Range forAtMost(int level) { in forAtMost()
147 return new Range(NO_MIN, /* maxLevel= */ level); in forAtMost()
151 public static Range forRange(int minLevel, int maxLevel) { in forRange()
152 return new Range(minLevel, maxLevel); in forRange()
156 public static Range forExactly(int level) { in forExactly()
157 return new Range(/* minLevel= */ level, /* maxLevel= */ level); in forExactly()
[all …]
DAbstractSdkLevelSupportedRule.java20 import com.android.adservices.shared.testing.AndroidSdk.Range;
66 private final Range mDefaultRequiredRange;
69 protected AbstractSdkLevelSupportedRule(RealLogger logger, Range defaultRange) { in AbstractSdkLevelSupportedRule()
76 this(logger, /* defaultRange= */ Range.forAnyLevel()); in AbstractSdkLevelSupportedRule()
115 Set<Range> ranges = new HashSet<>();
142 Range mergedRange = Range.merge(ranges);
175 Set<Range> ranges = new HashSet<>();
183 ranges.add(Range.forAtLeast(Level.R.getLevel()));
187 ranges.add(Range.forAtLeast(Level.S.getLevel()));
191 ranges.add(Range.forAtLeast(Level.S2.getLevel()));
[all …]
/packages/apps/Settings/src/com/android/settings/datausage/lib/
DNetworkCycleDataRepository.kt24 import android.util.Range in <lambda>()
28 fun getCycles(): List<Range<Long>> in <lambda>()
30 fun queryUsage(range: Range<Long>): NetworkUsageData in <lambda>()
44 override fun getCycles(): List<Range<Long>> = in getCycles()
47 private fun queryCyclesAsFourWeeks(): List<Range<Long>> = in queryCyclesAsFourWeeks()
56 override fun queryUsage(range: Range<Long>) = NetworkUsageData( in queryUsage()
64 Range(it.lower.toInstant().toEpochMilli(), it.upper.toInstant().toEpochMilli()) in queryUsage()
67 fun Range<Long>?.asFourWeeks(): List<Range<Long>> { in queryUsage() method
76 fun bucketRange(startTime: Long, endTime: Long, step: Long): List<Range<Long>> = in queryUsage()
77 (startTime..endTime step step).zipWithNext(::Range) in queryUsage()
[all …]
DAppDataUsageDetailsRepository.kt22 import android.util.Range in <lambda>()
45 private fun getCycles(): List<Range<Long>> = in getCycles()
46 cycles?.zipWithNext { endTime, startTime -> Range(startTime, endTime) } in getCycles()
49 private fun queryDetails(range: Range<Long>): NetworkUsageDetailsData { in queryDetails()
DNetworkUsageDetailsData.kt19 import android.util.Range
25 val range: Range<Long>,
32 range = Range(0, 0),
DNetworkCycleBucketRepository.kt21 import android.util.Range
40 private fun getCycles(): List<Range<Long>> = in getCycles()
44 private fun queryCyclesAsFourWeeks(): List<Range<Long>> = in queryCyclesAsFourWeeks()
56 private fun aggregateUsage(range: Range<Long>) = NetworkUsageData(
DNetworkStatsRepository.kt24 import android.util.Range
30 range: Range<Long>, in queryAggregateForUid()
50 fun getTimeRange(): Range<Long>? = queryDetailsForDevice().aggregate()?.timeRange in getTimeRange()
69 val AllTimeRange = Range(Long.MIN_VALUE, Long.MAX_VALUE)
/packages/modules/Virtualization/vmbase/src/
Dlayout.rs22 use core::ops::Range;
51 pub fn dtb_range() -> Range<VirtualAddress> { in dtb_range()
56 pub fn text_range() -> Range<VirtualAddress> { in text_range()
61 pub fn rodata_range() -> Range<VirtualAddress> { in rodata_range()
66 pub fn data_range() -> Range<VirtualAddress> { in data_range()
71 pub fn bss_range() -> Range<VirtualAddress> { in bss_range()
76 pub fn stack_range(stack_size: usize) -> Range<VirtualAddress> { in stack_range()
85 pub fn scratch_range() -> Range<VirtualAddress> { in scratch_range()
90 pub fn console_uart_range() -> Range<VirtualAddress> { in console_uart_range()
/packages/modules/OnDevicePersonalization/tests/chronicletests/src/com/android/libraries/pcc/chronicle/test/
DChronicleApiPolicyCapabilitiesTest.kt31 import com.android.libraries.pcc.chronicle.api.policy.capabilities.Capability.Range
115 listOf<Capability.Range>( in testCapabilitiesContains()
117 Capability.Range(Capability.Ttl.Days(30), Capability.Ttl.Hours(1)), in testCapabilitiesContains()
128 … capabilities.contains(Capability.Range(Capability.Ttl.Days(20), Capability.Ttl.Hours(15))) in testCapabilitiesContains()
140 listOf<Capability.Range>( in testCapabilitiesContains()
151 listOf<Capability.Range>( in testCapabilitiesContains()
160 … capabilities.containsAll(Capabilities(listOf<Capability.Range>(Capability.Queryable.ANY))) in testCapabilitiesContains()
167 val capabilities = Capabilities(listOf(Capability.Range(Ttl.Days(10), Ttl.Days(2)))) in testCapabilitiesIsEquivalent()
169 assertThat(capabilities.contains(Capability.Range(Ttl.Days(9), Ttl.Days(2)))).isTrue() in testCapabilitiesIsEquivalent()
172 … capabilities.containsAll(Capabilities(listOf(Capability.Range(Ttl.Days(9), Ttl.Days(2))))) in testCapabilitiesIsEquivalent()
[all …]
/packages/modules/OnDevicePersonalization/src/com/android/libraries/pcc/chronicle/api/policy/capabilities/
DCapability.kt27 is Range -> toRange().isEquivalent(other) in isEquivalent()
34 is Range -> toRange().contains(other) in contains()
51 is Range -> throw UnsupportedOperationException( in isLessStrict()
63 Capability.Range.TAG -> (this as Capability.Range).min.tag in getRealTag()
72 open fun toRange() = Range(this, this) in toRange()
93 val ANY = Range(Persistence.UNRESTRICTED, Persistence.NONE) in toRange()
169 val ANY = Range(Ttl.Infinite(), Ttl.Minutes(1))
219 val ANY = Range(Encryption(false), Encryption(true))
251 val ANY = Range(Queryable(false), Queryable(true))
283 val ANY = Range(Shareable(false), Shareable(true))
[all …]
/packages/services/DeviceAsWebcam/src/com/android/DeviceAsWebcam/
DVendorCameraPrefs.java23 import android.util.Range;
52 public final Range<Float> zoomRatioRange;
55 @Nullable Range<Float> zoomRatioRangeI) { in PhysicalCameraInfo()
81 public Range<Float> getPhysicalCameraZoomRatioRange(CameraId cameraId) { in getPhysicalCameraZoomRatioRange()
161 ArrayMap<String, Range<Float>> zoomRatioRangeInfo = getZoomRatioRangeInfo(context); in getVendorCameraPrefsFromJson()
177 Context context, ArrayMap<String, Range<Float>> zoomRatioRangeInfo) { in createLogicalToPhysicalMap()
219 private static ArrayMap<String, Range<Float>> getZoomRatioRangeInfo(Context context) { in getZoomRatioRangeInfo()
222 ArrayMap<String, Range<Float>> zoomRatioRangeInfo = new ArrayMap<>(); in getZoomRatioRangeInfo()
240 Range.create((float) zoomRatioRangeArray.getDouble(0), in getZoomRatioRangeInfo()
DCameraInfo.java20 import android.util.Range;
29 private final Range<Float> mZoomRatioRange;
36 int sensorOrientation, Range<Float> zoomRatioRange, Rect activeArraySize, in CameraInfo()
73 public Range<Float> getZoomRatioRange() { in getZoomRatioRange()
DMotionEventToZoomRatioConverter.java20 import android.util.Range;
34 private Range<Float> mZoomRatioRange;
58 Range<Float> zoomRatioRange, in MotionEventToZoomRatioConverter()
85 public void reset(float currZoomRatio, Range<Float> zoomRatioRange) { in reset()
/packages/modules/Connectivity/framework/src/android/net/
DUidRange.java24 import android.util.Range;
160 public static ArraySet<UidRange> fromIntRanges(@Nullable Set<Range<Integer>> ranges) { in fromIntRanges()
164 for (Range<Integer> range : ranges) { in fromIntRanges()
174 public static ArraySet<Range<Integer>> toIntRanges(@Nullable Set<UidRange> ranges) { in toIntRanges()
177 final ArraySet<Range<Integer>> uids = new ArraySet<>(); in toIntRanges()
179 uids.add(new Range<Integer>(range.start, range.stop)); in toIntRanges()
DDscpPolicy.java24 import android.util.Range;
71 private final @Nullable Range<Integer> mDstPortRange;
89 Range<Integer> dstPortRange) { in DscpPolicy()
185 public @Nullable Range<Integer> getDestinationPortRange() { in getDestinationPortRange()
249 this.mDstPortRange = new Range<Integer>(in.readInt(), in.readInt()); in DscpPolicy()
281 private @Nullable Range<Integer> mDstPortRange;
334 public @NonNull Builder setDestinationPortRange(@NonNull Range<Integer> range) { in setDestinationPortRange()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DDscpPolicyTest.kt60 import android.util.Range in <lambda>()
450 .setDestinationPortRange(Range(4444, 4444)).build() in <lambda>()
468 .setDestinationPortRange(Range(5555, 5555)) in <lambda>()
491 .setDestinationPortRange(Range(4444, 4444)).build() in <lambda>()
509 .setDestinationPortRange(Range(5555, 5555)) in <lambda>()
531 val policy = DscpPolicy.Builder(1, 1).setDestinationPortRange(Range(1111, 1111)).build() in <lambda>()
539 val policy2 = DscpPolicy.Builder(2, 1).setDestinationPortRange(Range(2222, 2222)).build() in <lambda>()
547 val policy3 = DscpPolicy.Builder(3, 1).setDestinationPortRange(Range(3333, 3333)).build() in <lambda>()
567 val policy = DscpPolicy.Builder(1, 1).setDestinationPortRange(Range(1111, 1111)).build() in <lambda>()
576 val policy2 = DscpPolicy.Builder(2, 1).setDestinationPortRange(Range(2222, 2222)).build() in <lambda>()
[all …]
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/lib/
DNetworkCycleDataRepositoryTest.kt23 import android.util.Range
68 Range(zonedDateTime(CYCLE1_START_TIME), zonedDateTime(CYCLE1_END_TIME)) in <lambda>()
83 on { cycleIterator() } doReturn emptyList<Range<ZonedDateTime>>().iterator() in <lambda>()
87 on { getTimeRange() } doReturn Range(CYCLE2_START_TIME, CYCLE2_END_TIME) in <lambda>()
105 on { getTimeRange() } doReturn Range(CYCLE2_START_TIME, CYCLE2_END_TIME) in <lambda>()
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/
DDataPlanRepositoryTest.kt21 import android.util.Range
36 override fun getCycles(): List<Range<Long>> = emptyList() in getCycles()
39 override fun queryUsage(range: Range<Long>) = NetworkUsageData( in getCycles()
50 Range(zonedDateTime(CYCLE_CYCLE_START_TIME), zonedDateTime(CYCLE_CYCLE_END_TIME)), in getCycles()
/packages/modules/AdServices/shared/libraries/side-less/java/com/android/adservices/shared/testing/annotations/
DRequiresSdkRange.java22 import com.android.adservices.shared.testing.AndroidSdk.Range;
43 int atLeast() default Range.NO_MIN; in atLeast()
49 int atMost() default Range.NO_MAX; in atMost()
/packages/apps/TV/src/com/android/tv/
DTimeShiftManager.java28 import android.util.Range;
872 private final Queue<Range<Long>> mProgramLoadQueue = new LinkedList<>();
939 Range<Long> period = Range.create(fetchStartTimeMs, fetchEndTimeMs); in onRecordTimeRangeChanged()
953 Range<Long> current = mProgramLoadTask.getPeriod(); in startTaskIfNeeded()
954 Iterator<Range<Long>> i = mProgramLoadQueue.iterator(); in startTaskIfNeeded()
956 Range<Long> r = i.next(); in startTaskIfNeeded()
970 Range<Long> next = mProgramLoadQueue.poll(); in startNext()
972 Iterator<Range<Long>> i = mProgramLoadQueue.iterator(); in startNext()
974 Range<Long> r = i.next(); in startNext()
990 private boolean addPlaceholderPrograms(Range<Long> period) { in addPlaceholderPrograms()
[all …]
/packages/modules/Virtualization/libs/fdtpci/src/
Dlib.rs22 ops::Range,
97 pub cam_range: Range<usize>,
99 pub bar_range: Range<u32>,
137 fn parse_cam_range(pci_node: &FdtNode) -> Result<Range<usize>, PciError> { in parse_cam_range()
159 fn parse_ranges(pci_node: &FdtNode) -> Result<Range<u32>, PciError> { in parse_ranges()
/packages/modules/Virtualization/pvmfw/src/
Dmemory.rs20 use core::ops::Range;
30 pub fn appended_payload_range() -> Range<VirtualAddress> { in appended_payload_range()
38 pub fn stack_range() -> Range<VirtualAddress> { in stack_range()

123456