Home
last modified time | relevance | path

Searched refs:ranges (Results 1 – 25 of 50) sorted by relevance

12

/frameworks/base/core/java/android/os/
DRedactingFileDescriptor.java74 private static long[] checkRangesArgument(long[] ranges) { in checkRangesArgument() argument
75 if (ranges.length % 2 != 0) { in checkRangesArgument()
78 for (int i = 0; i < ranges.length - 1; i += 2) { in checkRangesArgument()
79 if (ranges[i] > ranges[i + 1]) { in checkRangesArgument()
83 return ranges; in checkRangesArgument()
113 public static long[] removeRange(long[] ranges, long start, long end) { in removeRange() argument
115 return ranges; in removeRange()
121 for (int i = 0; i < ranges.length; i += 2) { in removeRange()
122 if (start <= ranges[i] && end >= ranges[i + 1]) { in removeRange()
124 } else if (start >= ranges[i] && end <= ranges[i + 1]) { in removeRange()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCellBroadcastConfigTrackerTest.java93 List<CellBroadcastIdRange> ranges = new ArrayList<>(); in testSetCellBroadcastIdRangesSuccess() local
95 ranges.add(new CellBroadcastIdRange(channelValues[i][0], channelValues[i][1], in testSetCellBroadcastIdRangesSuccess()
109 mPhone.setCellBroadcastIdRanges(ranges, r -> assertTrue( in testSetCellBroadcastIdRangesSuccess()
135 assertEquals(mPhone.getCellBroadcastIdRanges(), mergeRangesAsNeeded(ranges)); in testSetCellBroadcastIdRangesSuccess()
139 ranges.add(new CellBroadcastIdRange(channelValues[i][0], channelValues[i][1], in testSetCellBroadcastIdRangesSuccess()
148 mPhone.setCellBroadcastIdRanges(ranges, r -> assertTrue( in testSetCellBroadcastIdRangesSuccess()
173 assertEquals(mPhone.getCellBroadcastIdRanges(), mergeRangesAsNeeded(ranges)); in testSetCellBroadcastIdRangesSuccess()
176 mPhone.setCellBroadcastIdRanges(ranges, r -> assertTrue( in testSetCellBroadcastIdRangesSuccess()
185 assertEquals(mPhone.getCellBroadcastIdRanges(), mergeRangesAsNeeded(ranges)); in testSetCellBroadcastIdRangesSuccess()
232 mPhone.setCellBroadcastIdRanges(ranges, r -> assertTrue( in testSetCellBroadcastIdRangesSuccess()
[all …]
/frameworks/base/core/java/android/text/
DHighlights.java144 public @NonNull Builder addRanges(@NonNull Paint paint, @NonNull int... ranges) { in addRanges() argument
145 if (ranges.length % 2 == 1) { in addRanges()
149 for (int j = 0; j < ranges.length / 2; ++j) { in addRanges()
150 int start = ranges[j * 2]; in addRanges()
151 int end = ranges[j * 2 + 1]; in addRanges()
155 ranges)); in addRanges()
159 mHighlights.add(new Pair<>(paint, ranges)); in addRanges()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DCellBroadcastConfigTracker.java90 Request(@NonNull List<CellBroadcastIdRange> ranges, @NonNull Consumer<Integer> callback) { in Request() argument
91 ranges.forEach(r -> { in Request()
447 List<CellBroadcastIdRange> ranges = new ArrayList<>(); in getCellBroadcastIdRanges() local
448 ranges.addAll(mCbRanges3gpp); in getCellBroadcastIdRanges()
449 ranges.addAll(mCbRanges3gpp2); in getCellBroadcastIdRanges()
450 return ranges; in getCellBroadcastIdRanges()
457 @NonNull List<CellBroadcastIdRange> ranges, @NonNull Consumer<Integer> callback) { in setCellBroadcastIdRanges()
459 logd("setCellBroadcastIdRanges with ranges:" + ranges); in setCellBroadcastIdRanges()
461 ranges = mergeRangesAsNeeded(ranges); in setCellBroadcastIdRanges()
462 sendMessage(EVENT_REQUEST, new Request(ranges, callback)); in setCellBroadcastIdRanges()
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_ConsumerIrService.cpp58 hidl_vec<ConsumerIrFreqRange> ranges; in halGetCarrierFrequencies() local
62 ranges = vec; in halGetCarrierFrequencies()
70 len = ranges.size(); in halGetCarrierFrequencies()
79 arr[i*2] = static_cast<jint>(ranges[i].min); in halGetCarrierFrequencies()
80 arr[i*2+1] = static_cast<jint>(ranges[i].max); in halGetCarrierFrequencies()
/frameworks/minikin/libs/minikin/
DSparseBitSet.cpp25 uint32_t SparseBitSet::calcNumPages(const uint32_t* ranges, size_t nRanges) { in calcNumPages() argument
30 uint32_t start = ranges[i * 2]; in calcNumPages()
31 uint32_t end = ranges[i * 2 + 1]; in calcNumPages()
49 void SparseBitSet::initFromRanges(const uint32_t* ranges, size_t nRanges) { in initFromRanges() argument
53 const uint32_t maxVal = ranges[nRanges * 2 - 1]; in initFromRanges()
58 uint32_t nPages = calcNumPages(ranges, nRanges); in initFromRanges()
70 uint32_t start = ranges[i * 2]; in initFromRanges()
71 uint32_t end = ranges[i * 2 + 1]; in initFromRanges()
DCmapCoverage.cpp411 std::vector<uint32_t> ranges; in getCoverageFormat14() local
412 if (!getVSCoverage(&ranges, data, length, defaultUVSOffset, nonDefaultUVSOffset, in getCoverageFormat14()
419 (*out)[vsIndex] = SparseBitSet(ranges.data(), ranges.size() >> 1); in getCoverageFormat14()
/frameworks/minikin/include/minikin/
DSparseBitSet.h43 SparseBitSet(const uint32_t* ranges, size_t nRanges) : SparseBitSet() { in SparseBitSet() argument
44 initFromRanges(ranges, nRanges); in SparseBitSet()
74 void initFromRanges(const uint32_t* ranges, size_t nRanges);
89 static uint32_t calcNumPages(const uint32_t* ranges, size_t nRanges);
/frameworks/rs/script_api/include/
Drs_time.rsh49 …int tm_sec; // Seconds after the minute. This ranges from 0 to 59, but possibly up to 60 for leap …
50 int tm_min; // Minutes after the hour. This ranges from 0 to 59.
51 int tm_hour; // Hours past midnight. This ranges from 0 to 23.
52 int tm_mday; // Day of the month. This ranges from 1 to 31.
53 int tm_mon; // Months since January. This ranges from 0 to 11.
55 int tm_wday; // Days since Sunday. This ranges from 0 to 6.
56 int tm_yday; // Days since January 1. This ranges from 0 to 365.
/frameworks/base/core/jni/
Dandroid_hardware_OverlayProperties.cpp67 std::find(i.ranges.begin(), i.ranges.end(), dataspace & HAL_DATASPACE_RANGE_MASK) != in android_hardware_OverlayProperties_isCombinationSupported()
68 i.ranges.end()) { in android_hardware_OverlayProperties_isCombinationSupported()
92 combination.ranges = {HAL_DATASPACE_RANGE_FULL}; in android_hardware_OverlayProperties_createDefault()
Dandroid_view_InputDevice.cpp98 const std::vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges(); in android_view_InputDevice_create() local
99 for (const InputDeviceInfo::MotionRange& range: ranges) { in android_view_InputDevice_create()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/util/
DPageRangeUtils.java302 ArrayList<PageRange> ranges = new ArrayList<>(); in parsePageRanges() local
309 ranges.clear(); in parsePageRanges()
313 ranges.add(retRange.second); in parsePageRanges()
317 return PageRangeUtils.normalize(ranges.toArray(new PageRange[ranges.size()])); in parsePageRanges()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/renderer/
DPdfManipulationService.java238 public void removePages(PageRange[] ranges) { in removePages() argument
245 ranges = PageRangeUtils.normalize(ranges); in removePages()
249 final int rangeCount = ranges.length; in removePages()
251 PageRange range = ranges[i]; in removePages()
/frameworks/native/libs/gui/aidl/android/gui/
DOverlayProperties.aidl25 int[] ranges;
/frameworks/base/services/core/java/com/android/server/broadcastradio/aidl/
DConversionUtils.java263 int len = config.ranges.length; in amfmConfigToBands()
270 Utils.FrequencyBand bandType = Utils.getBand(config.ranges[i].lowerBound); in amfmConfigToBands()
272 Slogf.e(TAG, "Unknown frequency band at %d kHz", config.ranges[i].lowerBound); in amfmConfigToBands()
277 config.ranges[i].lowerBound, config.ranges[i].upperBound, in amfmConfigToBands()
278 config.ranges[i].spacing, in amfmConfigToBands()
286 config.ranges[i].lowerBound, config.ranges[i].upperBound, in amfmConfigToBands()
287 config.ranges[i].spacing, in amfmConfigToBands()
/frameworks/proto_logging/stats/enums/display/
Ddisplay_enums.proto24 // Define ranges among 38 brightness buckets:
31 // The display brightness ranges from low to high.
/frameworks/minikin/tests/unittest/
DCmapCoverageTest.cpp66 static std::vector<uint8_t> buildCmapFormat4Table(const std::vector<uint16_t>& ranges) { in buildCmapFormat4Table() argument
67 uint16_t segmentCount = ranges.size() / 2 + 1 /* +1 for end marker */; in buildCmapFormat4Table()
93 for (size_t i = 0; i < ranges.size() / 2; ++i) { in buildCmapFormat4Table()
94 const uint16_t begin = ranges[i * 2]; in buildCmapFormat4Table()
95 const uint16_t end = ranges[i * 2 + 1]; in buildCmapFormat4Table()
118 static std::vector<uint8_t> buildCmapFormat12Table(const std::vector<uint32_t>& ranges) { in buildCmapFormat12Table() argument
119 uint32_t numGroups = ranges.size() / 2; in buildCmapFormat12Table()
134 const uint32_t start = ranges[2 * i]; in buildCmapFormat12Table()
135 const uint32_t end = ranges[2 * i + 1]; in buildCmapFormat12Table()
256 const std::vector<uint16_t>& ranges) { in buildSingleFormat4Cmap() argument
[all …]
/frameworks/native/services/surfaceflinger/Scheduler/include/scheduler/
DFps.h206 inline std::string to_string(FpsRanges ranges) { in to_string() argument
207 const auto& [physical, render] = ranges; in to_string()
/frameworks/base/media/java/android/media/
DUtils.java62 public static <T extends Comparable<? super T>> void sortDistinctRanges(Range<T>[] ranges) { in sortDistinctRanges() argument
63 Arrays.sort(ranges, new Comparator<Range<T>>() { in sortDistinctRanges()
116 int binarySearchDistinctRanges(Range<T>[] ranges, T value) { in binarySearchDistinctRanges() argument
117 return Arrays.binarySearch(ranges, Range.create(value, value), in binarySearchDistinctRanges()
/frameworks/base/services/incremental/
DServiceWrappers.cpp199 const auto ranges = incfs::getFilledRanges(res); in countFilledBlocks() local
200 res = ranges.first; in countFilledBlocks()
204 const auto totalBlocksCount = ranges.second.internalRawRanges().endIndex; in countFilledBlocks()
206 for (const auto& dataRange : ranges.second.dataRanges()) { in countFilledBlocks()
209 for (const auto& hashRange : ranges.second.hashRanges()) { in countFilledBlocks()
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java1863 final Set<Range<Integer>> ranges = new ArraySet<>(); in createUserAndRestrictedProfilesRanges() local
1866 addUserToRanges(ranges, userId, allowedApplications, disallowedApplications); in createUserAndRestrictedProfilesRanges()
1879 addUserToRanges(ranges, user.id, allowedApplications, disallowedApplications); in createUserAndRestrictedProfilesRanges()
1883 return ranges; in createUserAndRestrictedProfilesRanges()
1900 void addUserToRanges(@NonNull Set<Range<Integer>> ranges, @UserIdInt int userId, in addUserToRanges() argument
1910 ranges.add(new Range<Integer>(start, stop)); in addUserToRanges()
1915 if (start != -1) ranges.add(new Range<Integer>(start, stop)); in addUserToRanges()
1924 ranges.add(new Range<Integer>(start, uid - 1)); in addUserToRanges()
1929 ranges.add(new Range<Integer>(start, userRange.getUpper())); in addUserToRanges()
1933 ranges.add(createUidRangeForUser(userId)); in addUserToRanges()
[all …]
/frameworks/base/services/tests/VpnTests/java/com/android/server/connectivity/
DVpnTest.java444 private Set<Range<Integer>> rangeSet(Range<Integer> ... ranges) { in rangeSet() argument
446 for (Range<Integer> r : ranges) range.add(r); in rangeSet()
478 final Set<Range<Integer>> ranges = in testRestrictedProfilesAreAddedToVpn() local
482 ranges); in testRestrictedProfilesAreAddedToVpn() local
490 final Set<Range<Integer>> ranges = vpn.createUserAndRestrictedProfilesRanges( in testManagedProfilesAreNotAddedToVpn() local
493 assertEquals(rangeSet(PRIMARY_USER_RANGE), ranges); in testManagedProfilesAreNotAddedToVpn() local
501 final Set<Range<Integer>> ranges = new ArraySet<>(); in testAddUserToVpnOnlyAddsOneUser() local
502 vpn.addUserToRanges(ranges, PRIMARY_USER.id, null, null); in testAddUserToVpnOnlyAddsOneUser()
504 assertEquals(rangeSet(PRIMARY_USER_RANGE), ranges); in testAddUserToVpnOnlyAddsOneUser() local
736 final List<Range<Integer>> ranges = makeVpnUidRange(SYSTEM_USER_ID, excludedUids); in testLockdownSystemUser() local
[all …]
/frameworks/av/services/camera/virtualcamera/util/
DMetadataUtil.cc260 std::vector<int32_t> ranges; in setControlAeAvailableFpsRanges() local
261 ranges.reserve(2 * fpsRanges.size()); in setControlAeAvailableFpsRanges()
263 ranges.push_back(fpsRange.minFps); in setControlAeAvailableFpsRanges()
264 ranges.push_back(fpsRange.maxFps); in setControlAeAvailableFpsRanges()
266 mEntryMap[ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES] = std::move(ranges); in setControlAeAvailableFpsRanges()
/frameworks/native/services/inputflinger/reader/
DInputDevice.cpp145 const std::vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges(); in dump() local
146 if (!ranges.empty()) { in dump()
148 for (size_t i = 0; i < ranges.size(); i++) { in dump()
149 const InputDeviceInfo::MotionRange& range = ranges[i]; in dump()
/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/
DConvertTest.java171 amFmRegionConfig.ranges = new ArrayList<>(Arrays.asList(createAmFmBandRange( in propertiesFromHalProperties_withInvalidBand()
291 amFmRegionConfig.ranges = new ArrayList<>(Arrays.asList( in createAmFmRegionConfig()

12