Home
last modified time | relevance | path

Searched refs:range (Results 1 – 25 of 390) sorted by relevance

12345678910>>...16

/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DIntRangeManager.java116 void insert(ClientRange range) { in insert() argument
121 if (range.mStartId <= nextRange.mStartId) { in insert()
123 if (!range.equals(nextRange)) { in insert()
125 if (range.mStartId == nextRange.mStartId in insert()
126 && range.mEndId > nextRange.mEndId) { in insert()
135 mClients.add(i, range); in insert()
141 mClients.add(insert, range); in insert()
144 mClients.add(range); // append to end of list in insert()
223 IntRange range = mRanges.get(startIndex); in enableRange() local
224 if ((startId) >= range.mStartId && (endId) <= range.mEndId) { in enableRange()
[all …]
/frameworks/base/core/java/android/util/
DRange.java132 public boolean contains(Range<T> range) { in contains() argument
133 checkNotNull(range, "value must not be null"); in contains()
135 boolean gteLower = range.mLower.compareTo(mLower) >= 0; in contains()
136 boolean lteUpper = range.mUpper.compareTo(mUpper) <= 0; in contains()
205 public Range<T> intersect(Range<T> range) { in intersect() argument
206 checkNotNull(range, "range must not be null"); in intersect()
208 int cmpLower = range.mLower.compareTo(mLower); in intersect()
209 int cmpUpper = range.mUpper.compareTo(mUpper); in intersect()
216 return range; in intersect()
219 cmpLower <= 0 ? mLower : range.mLower, in intersect()
[all …]
/frameworks/minikin/libs/minikin/
DMeasuredText.cpp35 void setNextRange(const Range& range, bool dir) { in setNextRange() argument
36 mRange = range; in setNextRange()
63 for (const auto[context, piece] : LayoutSplitter(textBuf, info.range, info.isRtl)) { in getMetrics()
100 for (const auto [context, piece] : LayoutSplitter(textBuf, info.range, info.isRtl)) { in measureText()
114 void setNextContext(const Range& range, HyphenEdit edit, bool dir) { in setNextContext() argument
115 mRange = range; in setNextContext()
137 float StyleRun::measureHyphenPiece(const U16StringPiece& textBuf, const Range& range, in measureHyphenPiece() argument
142 for (const BidiText::RunInfo info : BidiText(textBuf, range, bidiFlag)) { in measureHyphenPiece()
143 for (const auto[context, piece] : LayoutSplitter(textBuf, info.range, info.isRtl)) { in measureHyphenPiece()
145 piece.getStart() == range.getStart() ? startHyphen : StartHyphenEdit::NO_EDIT; in measureHyphenPiece()
[all …]
DLayout.cpp48 void Layout::doLayout(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in doLayout() argument
51 const uint32_t count = range.getLength(); in doLayout()
54 for (const BidiText::RunInfo& runInfo : BidiText(textBuf, range, bidiFlags)) { in doLayout()
55 doLayoutRunCached(textBuf, runInfo.range, runInfo.isRtl, paint, range.getStart(), in doLayout()
60 float Layout::measureText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in measureText() argument
64 for (const BidiText::RunInfo& runInfo : BidiText(textBuf, range, bidiFlags)) { in measureText()
65 const size_t offset = range.toRangeOffset(runInfo.range.getStart()); in measureText()
67 advance += doLayoutRunCached(textBuf, runInfo.range, runInfo.isRtl, paint, 0, startHyphen, in measureText()
73 float Layout::doLayoutRunCached(const U16StringPiece& textBuf, const Range& range, bool isRtl, in doLayoutRunCached() argument
77 if (!range.isValid()) { in doLayoutRunCached()
[all …]
DLayoutSplitter.h57 LayoutSplitter(const U16StringPiece& textBuf, const Range& range, bool isRtl) in LayoutSplitter() argument
58 : mTextBuf(textBuf), mRange(range), mIsRtl(isRtl) {} in LayoutSplitter()
72 const Range& range = mParent->mRange; variable
77 mPieceRange.setStart(std::max(mContextRange.getStart(), range.getStart()));
84 mPieceRange.setEnd(std::min(mContextRange.getEnd(), range.getEnd()));
94 const Range& range = mParent->mRange; in iterator() local
98 mPieceRange.setStart(std::max(mContextRange.getStart(), range.getStart())); in iterator()
102 getPrevWordBreakForCache(textBuf, pos == range.getEnd() ? pos : pos + 1)); in iterator()
105 mPieceRange.setEnd(std::min(mContextRange.getEnd(), range.getEnd())); in iterator()
DGreedyLineBreaker.cpp92 bool tryLineBreakWithHyphenation(const Range& range, WordBreaker* breaker);
100 bool doLineBreakWithGraphemeBounds(const Range& range);
163 bool GreedyLineBreaker::tryLineBreakWithHyphenation(const Range& range, WordBreaker* breaker) { in tryLineBreakWithHyphenation() argument
170 if (run->getRange().contains(range)) { in tryLineBreakWithHyphenation()
180 if (!range.contains(targetRange)) { in tryLineBreakWithHyphenation()
186 Range contextRange = range; in tryLineBreakWithHyphenation()
257 bool GreedyLineBreaker::doLineBreakWithGraphemeBounds(const Range& range) { in doLineBreakWithGraphemeBounds() argument
258 float width = mMeasuredText.widths[range.getStart()]; in doLineBreakWithGraphemeBounds()
261 for (uint32_t i = range.getStart() + 1; i < range.getEnd(); ++i) { in doLineBreakWithGraphemeBounds()
281 breakLineAt(range.getEnd(), mLineWidth, 0, 0, EndHyphenEdit::NO_EDIT, StartHyphenEdit::NO_EDIT); in doLineBreakWithGraphemeBounds()
[all …]
/frameworks/minikin/tests/unittest/
DBidiUtilsTest.cpp39 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
48 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
57 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
66 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
75 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
84 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
98 EXPECT_EQ(Range(0, rtlLength), (*it).range); in TEST()
107 EXPECT_EQ(Range(0, rtlLength), (*it).range); in TEST()
116 EXPECT_EQ(Range(0, rtlLength), (*it).range); in TEST()
125 EXPECT_EQ(Range(0, rtlLength), (*it).range); in TEST()
[all …]
DLayoutTest.cpp70 Range range(0, text.size()); in TEST_F() local
71 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
89 Range range(0, text.size()); in TEST_F() local
90 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
108 Range range(0, text.size()); in TEST_F() local
109 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
127 Range range(0, text.size()); in TEST_F() local
128 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
158 Range range(0, text.size()); in TEST_F() local
159 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
[all …]
DSparseBitSetTest.cpp33 std::vector<uint32_t> range{distribution(mt)}; in TEST() local
35 range.push_back((range.back() - 1) + distribution(mt)); in TEST()
38 SparseBitSet bitset(range.data(), range.size() / 2); in TEST()
41 for (size_t i = 0; i < range.size() / 2; ++i) { in TEST()
42 uint32_t start = range[i * 2]; in TEST()
43 uint32_t end = range[i * 2 + 1]; in TEST()
58 std::vector<uint32_t> range({10, 20}); in TEST() local
59 SparseBitSet originalBitset(range.data(), range.size() / 2); in TEST()
DLayoutSplitterTest.cpp31 Range range; in parseTestString() local
36 range.setStart(outText.size()); in parseTestString()
39 range.setEnd(outText.size()); in parseTestString()
45 return std::make_pair(outText, range); in parseTestString()
145 auto[text, range] = parseTestString(testCase.testStr); in TEST()
147 for (auto[acContext, acPiece] : LayoutSplitter(text, range, false /* isRtl */)) { in TEST()
207 auto[text, range] = parseTestString(testCase.testStr); in TEST()
209 for (auto[acContext, acPiece] : LayoutSplitter(text, range, true /* isRtl */)) { in TEST()
259 auto[text, range] = parseTestString(testCase.testStr); in TEST()
261 for (auto[acContext, acPiece] : LayoutSplitter(text, range, false /* isRtl */)) { in TEST()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/libcore/
DImtConflictPerfTestGen.py85 for i in range(max_conflict_depth):
87 for j in range(i+1):
92 for i in range(max_conflict_depth):
100 for j in range(max_conflict_depth):
106 for i in range(max_conflict_depth):
110 for i in range(max_conflict_depth):
111 interfaces = ", ".join(["I{}".format(j) for j in range(i+1)])
115 for i in range(max_conflict_depth):
117 for j in range(imt_size):
/frameworks/minikin/include/minikin/
DLayoutPieces.h32 Key(const Range& range, HyphenEdit hyphenEdit, bool dir, uint32_t paintId) in Key()
33 : range(range), hyphenEdit(hyphenEdit), dir(dir), paintId(paintId) {} in Key()
35 Range range; member
42 .update(range.getStart()) in hash()
43 .update(range.getEnd()) in hash()
51 return range == o.range && hyphenEdit == o.hyphenEdit && dir == o.dir &&
75 void insert(const Range& range, HyphenEdit edit, const LayoutPiece& layout, bool dir, in insert()
83 std::forward_as_tuple(range, edit, dir, paintId), in insert()
88 void getOrCreate(const U16StringPiece& textBuf, const Range& range, const Range& context, in getOrCreate()
92 auto it = offsetMap.find(Key(range, edit, dir, paintId)); in getOrCreate()
[all …]
DMeasuredText.h36 Run(const Range& range) : mRange(range) {} in Run() argument
58 virtual std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range,
60 virtual MinikinExtent getExtent(const U16StringPiece& text, const Range& range,
63 virtual void appendLayout(const U16StringPiece& text, const Range& range,
95 StyleRun(const Range& range, MinikinPaint&& paint, int lineBreakStyle, int lineBreakWordStyle, in StyleRun() argument
97 : Run(range), in StyleRun()
116 std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range,
119 MinikinExtent getExtent(const U16StringPiece& text, const Range& range,
122 void appendLayout(const U16StringPiece& text, const Range& range, const Range& contextRange,
129 float measureHyphenPiece(const U16StringPiece& text, const Range& range,
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_PersistentDataBlockService.cpp50 uint64_t range[2]; in wipe_block_device() local
54 range[0] = 0; in wipe_block_device()
55 range[1] = len; in wipe_block_device()
57 if (range[1] == 0) in wipe_block_device()
60 ret = ioctl(fd, BLKSECDISCARD, &range); in wipe_block_device()
63 range[0] = 0; in wipe_block_device()
64 range[1] = len; in wipe_block_device()
65 ret = ioctl(fd, BLKDISCARD, &range); in wipe_block_device()
/frameworks/base/core/jni/
Dandroid_view_InputDevice.cpp77 for (const InputDeviceInfo::MotionRange& range: ranges) { in android_view_InputDevice_create() local
78 env->CallVoidMethod(inputDeviceObj.get(), gInputDeviceClassInfo.addMotionRange, range.axis, in android_view_InputDevice_create()
79 range.source, range.min, range.max, range.flat, range.fuzz, range.resolution); in android_view_InputDevice_create()
/frameworks/base/media/java/android/media/
DUtils.java87 for (Range<T> range: another) { in intersectSortedDistinctRanges()
89 one[ix].getUpper().compareTo(range.getLower()) < 0) { in intersectSortedDistinctRanges()
93 one[ix].getUpper().compareTo(range.getUpper()) < 0) { in intersectSortedDistinctRanges()
94 result.add(range.intersect(one[ix])); in intersectSortedDistinctRanges()
100 if (one[ix].getLower().compareTo(range.getUpper()) <= 0) { in intersectSortedDistinctRanges()
101 result.add(range.intersect(one[ix])); in intersectSortedDistinctRanges()
156 static Range<Integer>factorRange(Range<Integer> range, int factor) {
158 return range;
160 return Range.create(divUp(range.getLower(), factor), range.getUpper() / factor);
167 static Range<Long>factorRange(Range<Long> range, long factor) {
[all …]
/frameworks/av/media/libstagefright/foundation/
DColorUtils.cpp154 int32_t ColorUtils::wrapColorAspectsIntoColorRange(ColorAspects::Range range) { in wrapColorAspectsIntoColorRange() argument
156 if (sRanges.map(range, &res)) { in wrapColorAspectsIntoColorRange()
158 } else if (!isValid(range)) { in wrapColorAspectsIntoColorRange()
161 CHECK(!isDefined(range)); in wrapColorAspectsIntoColorRange()
163 return kColorRangeVendorStart + range; in wrapColorAspectsIntoColorRange()
169 int32_t range, ColorAspects::Range *aspect) { in unwrapColorAspectsFromColorRange() argument
170 if (sRanges.map((ColorRange)range, aspect)) { in unwrapColorAspectsFromColorRange()
176 if (range >= start && range < start + numRanges) { in unwrapColorAspectsFromColorRange()
177 *aspect = (ColorAspects::Range)(range - start); in unwrapColorAspectsFromColorRange()
232 int32_t range, int32_t standard, int32_t transfer, ColorAspects &aspects) { in convertPlatformColorAspectsToCodecAspects() argument
[all …]
/frameworks/base/core/java/android/view/
DInputDevice.java803 final MotionRange range = mMotionRanges.get(i); in getMotionRange() local
804 if (range.mAxis == axis) { in getMotionRange()
805 return range; in getMotionRange()
828 final MotionRange range = mMotionRanges.get(i); in getMotionRange() local
829 if (range.mAxis == axis && range.mSource == source) { in getMotionRange()
830 return range; in getMotionRange()
1166 MotionRange range = mMotionRanges.get(i); in writeToParcel() local
1167 out.writeInt(range.mAxis); in writeToParcel()
1168 out.writeInt(range.mSource); in writeToParcel()
1169 out.writeFloat(range.mMin); in writeToParcel()
[all …]
/frameworks/base/tests/Input/src/com/android/test/input/
DInputDeviceTest.java36 private void assertMotionRangeEquals(InputDevice.MotionRange range, in assertMotionRangeEquals() argument
38 assertEquals(range.getAxis(), outRange.getAxis()); in assertMotionRangeEquals()
39 assertEquals(range.getSource(), outRange.getSource()); in assertMotionRangeEquals()
40 assertEquals(range.getMin(), outRange.getMin(), DELTA); in assertMotionRangeEquals()
41 assertEquals(range.getMax(), outRange.getMax(), DELTA); in assertMotionRangeEquals()
42 assertEquals(range.getFlat(), outRange.getFlat(), DELTA); in assertMotionRangeEquals()
43 assertEquals(range.getFuzz(), outRange.getFuzz(), DELTA); in assertMotionRangeEquals()
44 assertEquals(range.getResolution(), outRange.getResolution(), DELTA); in assertMotionRangeEquals()
/frameworks/base/core/java/android/hardware/
DDataSpace.java601 @DataSpaceRange int range) { in pack() argument
608 if ((range & RANGE_MASK) != range) { in pack()
609 throw new IllegalArgumentException("Invalid range " + range); in pack()
611 return standard | transfer | range; in pack()
646 @DataSpaceRange int range = dataSpace & RANGE_MASK; in getRange() local
647 return range; in getRange()
/frameworks/base/tools/codegen/src/com/android/codegen/
DFileInfo.kt94 mainClassBounds.fileInfo.sourceLines.subList(0, mainClassBounds.range.start))) in <lambda>()
143 … val range: ClosedRange<Int> = ast.range.get()!!.let { rng -> rng.begin.line-1..rng.end.line-1 }, in <lambda>() constant in com.android.codegen.FileInfo.ClassBounds
148 nested.filter { it.isDataclass }.sortedBy { it.range.start } in <lambda>()
155 val sourceNoPrefix = fileInfo.sourceLines.drop(range.start) in <lambda>()
170range.start + start - fileInfo.generatedWarningNumPrecedingEmptyLines, in <lambda>()
171 range.start + endInclusive) in <lambda>()
178 appendln("class $name $range") in <lambda>()
214 fromIndex = classBounds.range.start, in <lambda>()
225 fromIndex = nestedDataClass.range.endInclusive + 1, in <lambda>()
265 return nextNestedClass?.range?.start in <lambda>()
[all …]
/frameworks/av/media/codec2/components/tests/
DC2SoftCodecTest.cpp84 ASSERT_EQ(validValueInfos[0].values.range.max.ref<uint32_t>(), 1920) in TEST_F()
86 ASSERT_EQ(validValueInfos[1].values.range.max.ref<uint32_t>(), 1920) in TEST_F()
88 ASSERT_EQ(validValueInfos[0].values.range.min.ref<uint32_t>(), 2) in TEST_F()
90 ASSERT_EQ(validValueInfos[1].values.range.min.ref<uint32_t>(), 2) in TEST_F()
92 ASSERT_EQ(validValueInfos[0].values.range.step.ref<uint32_t>(), 2) in TEST_F()
94 ASSERT_EQ(validValueInfos[1].values.range.step.ref<uint32_t>(), 2) in TEST_F()
/frameworks/base/core/java/android/service/controls/templates/
DToggleRangeTemplate.java58 @NonNull RangeTemplate range) { in ToggleRangeTemplate() argument
61 Preconditions.checkNotNull(range); in ToggleRangeTemplate()
63 mRangeTemplate = range; in ToggleRangeTemplate()
77 @NonNull RangeTemplate range) { in ToggleRangeTemplate() argument
80 range); in ToggleRangeTemplate()
/frameworks/av/media/libstagefright/tests/fuzzers/
DSkipCutBufferFuzzer.cpp36 size_t range = fdp.ConsumeIntegralInRange<size_t>(0, buf_size); in LLVMFuzzerTestOneInput() local
37 size_t length = fdp.ConsumeIntegralInRange<size_t>(0, buf_size - range); in LLVMFuzzerTestOneInput()
44 s_buffer->setRange(range, length); in LLVMFuzzerTestOneInput()
50 m_buffer->set_range(range, length); in LLVMFuzzerTestOneInput()
58 a_buffer->setRange(range, length); in LLVMFuzzerTestOneInput()
/frameworks/base/core/java/com/android/internal/widget/
DScrollBarUtils.java25 public static int getThumbLength(int size, int thickness, int extent, int range) { in getThumbLength() argument
28 int length = Math.round((float) size * extent / range); in getThumbLength()
35 public static int getThumbOffset(int size, int thumbLength, int extent, int range, int offset) { in getThumbOffset() argument
37 int thumbOffset = Math.round((float) (size - thumbLength) * offset / (range - extent)); in getThumbOffset()

12345678910>>...16