Searched defs:range (Results 1 - 25 of 55) sorted by relevance

123

/frameworks/base/core/java/com/android/internal/widget/
H A DScrollBarUtils.java21 public static int getThumbLength(int size, int thickness, int extent, int range) { argument
24 int length = Math.round((float) size * extent / range);
31 public static int getThumbOffset(int size, int thumbLength, int extent, int range, int offset) { argument
33 int thumbOffset = Math.round((float) (size - thumbLength) * offset / (range - extent));
/frameworks/base/core/jni/
H A Dandroid_view_InputDevice.cpp73 const InputDeviceInfo::MotionRange& range = ranges.itemAt(i); local
74 env->CallVoidMethod(inputDeviceObj.get(), gInputDeviceClassInfo.addMotionRange, range.axis,
75 range.source, range.min, range.max, range.flat, range.fuzz, range.resolution);
/frameworks/base/services/core/jni/
H A Dcom_android_server_PersistentDataBlockService.cpp50 uint64_t range[2]; local
54 range[0] = 0;
55 range[1] = len;
57 if (range[1] == 0)
60 ret = ioctl(fd, BLKSECDISCARD, &range);
63 range[0] = 0;
64 range[1] = len;
65 ret = ioctl(fd, BLKDISCARD, &range);
/frameworks/base/tests/net/java/android/net/
H A DUidRangeTest.java90 fail("Exception not thrown for negative-length UID range");
100 private static byte[] marshall(UidRange range) { argument
102 range.writeToParcel(p, /* flags */ 0);
/frameworks/base/tests/net/jni/
H A DUidRangeTest.cpp28 const UidRange range = unmarshall(env, inParcel); local
29 return marshall(env, range);
34 const UidRange range = unmarshall(env, inParcel); local
35 return range.getStart();
40 const UidRange range = unmarshall(env, inParcel); local
41 return range.getStop();
58 UidRange range; local
59 range.readFromParcel(&p);
60 return range;
64 * Creates a Java byte[] array and writes the contents of 'range' t
70 marshall(JNIEnv* env, const UidRange& range) argument
[all...]
/frameworks/base/core/java/android/util/
H A DRange.java24 * Immutable class for describing the range of two numeric values.
26 * A range (or "interval") defines the inclusive boundaries around a contiguous span of
31 * All ranges are bounded, and the left side of the range is always {@code >=}
32 * the right side of the range.
36 * stored must also be immutable. If mutable objects are stored here, then the range
41 * Create a new immutable range.
45 * is the range is bounded. {@code lower} must be {@link Comparable#compareTo lesser or equal}
64 * Create a new immutable range, with the argument types inferred.
68 * is the range is bounded. {@code lower} must be {@link Comparable#compareTo lesser or equal}
100 * Checks if the {@code value} is within the bounds of this range
131 contains(Range<T> range) argument
204 intersect(Range<T> range) argument
272 extend(Range<T> range) argument
[all...]
/frameworks/av/media/libstagefright/codecs/m4v_h263/dec/src/
H A Dderinging_luma.cpp34 int thres[4], range[4], max_range_blk, max_thres_blk; local
66 range[blks] = max_blk - min_blk;
68 if (range[blks] >= max_range_blk)
70 max_range_blk = range[blks];
86 if (range[blks]<32 && max_range_blk >= 64)
120 range[blks] = max_blk - min_blk;
122 if (range[blks] >= max_range_blk)
124 max_range_blk = range[blks];
140 if (range[blks]<32 && max_range_blk >= 64)
178 range[blk
[all...]
/frameworks/base/core/java/com/android/internal/print/
H A DDumpUtils.java263 * @param range The range to write
266 @NonNull PageRange range) {
268 proto.write("start", PageRangeProto.START, range.getStart());
269 proto.write("end", PageRangeProto.END, range.getEnd());
265 writePageRange(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PageRange range) argument
/frameworks/minikin/include/minikin/
H A DLayoutPieces.h42 void insert(const U16StringPiece& textBuf, const Range& range, const MinikinPaint& paint, argument
46 std::forward_as_tuple(textBuf, range, paint, dir, startEdit, endEdit),
54 void getOrCreate(const U16StringPiece& textBuf, const Range& range, const MinikinPaint& paint, argument
56 auto it = offsetMap.find(LayoutCacheKey(textBuf, range, paint, dir, startEdit, endEdit));
58 LayoutCache::getInstance().getOrCreate(textBuf, range, paint, dir, startEdit, endEdit,
H A DLayoutCache.h32 LayoutCacheKey(const U16StringPiece& text, const Range& range, const MinikinPaint& paint, argument
36 mStart(range.getStart()),
37 mCount(range.getLength()),
138 void getOrCreate(const U16StringPiece& text, const Range& range, const MinikinPaint& paint, argument
140 LayoutCacheKey key(text, range, paint, dir, startHyphen, endHyphen);
H A DMeasuredText.h35 Run(const Range& range) : mRange(range) {} argument
51 virtual std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range,
78 StyleRun(const Range& range, MinikinPaint&& paint, bool isRtl) argument
79 : Run(range), mPaint(std::move(paint)), mIsRtl(isRtl) {}
92 std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range,
95 return Layout::getBoundsWithPrecomputedPieces(text, range, bidiFlag, mPaint, pieces);
100 float measureHyphenPiece(const U16StringPiece& text, const Range& range,
104 return Layout::measureText(text, range, bidiFlag, mPaint, startHyphen, endHyphen, advances,
115 ReplacementRun(const Range& range, floa argument
[all...]
/frameworks/minikin/libs/minikin/
H A DBidiUtils.h43 Range range; member in struct:minikin::BidiText::RunInfo
47 BidiText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags);
81 const Range mRange; // The range in the original buffer. Used for range check.
H A DMeasuredText.cpp35 const Range& range = run->getRange(); local
36 const uint32_t runOffset = range.getStart();
44 for (uint32_t i = range.getStart(); i < range.getEnd(); ++i) {
58 void MeasuredText::buildLayout(const U16StringPiece& textBuf, const Range& range, argument
62 layout->doLayoutWithPrecomputedPieces(textBuf, range, bidiFlags, paint, startHyphen, endHyphen,
66 MinikinRect MeasuredText::getBounds(const U16StringPiece& textBuf, const Range& range) { argument
71 if (!Range::intersects(range, runRange)) {
75 run->getBounds(textBuf, Range::intersection(runRange, range), layoutPieces);
/frameworks/ml/nn/common/include/
H A DUtils.h127 std::string toString(const std::vector<Type>& range) { argument
129 for (size_t i = 0; i < range.size(); ++i) {
130 os += (i == 0 ? "" : ", ") + toString(range[i]);
/frameworks/native/libs/input/
H A DInputDevice.cpp173 const MotionRange& range = mMotionRanges.itemAt(i); local
174 if (range.axis == axis && range.source == source) {
175 return &range;
187 MotionRange range = { axis, source, min, max, flat, fuzz, resolution }; local
188 mMotionRanges.add(range);
191 void InputDeviceInfo::addMotionRange(const MotionRange& range) { argument
192 mMotionRanges.add(range);
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
H A DIntRangeManager.java26 * radio when the range of enabled message identifiers changes.
36 * of the caller) so that a call to remove a range can be mapped to the
37 * client that enabled that range (or else rejected).
48 * One or more clients forming the continuous range [startId, endId].
62 * @param startId the first id included in the range
63 * @param endId the last id included in the range
64 * @param client the client requesting the enabled range
110 * @param range the new ClientRange to insert
112 void insert(ClientRange range) { argument
117 if (range
[all...]
/frameworks/av/media/libstagefright/codecs/m4v_h263/enc/src/
H A Dfindhalfpel.cpp78 Int range = video->encParams->SearchRange; local
91 /**************** check range ***************************/
95 ilow = xpos - range;
96 jlow = ypos - range;
199 Int range = video->encParams->SearchRange; local
212 /**************** check range ***************************/
217 ilow = xpos + ((comp & 1) << 3) - range;
218 jlow = ypos + ((comp & 2) << 2) - range;
/frameworks/base/core/java/android/widget/
H A DScrollBarDrawable.java102 public void setParameters(int range, int offset, int extent, boolean vertical) { argument
109 if (mRange != range || mOffset != offset || mExtent != extent) {
110 mRange = range;
122 final int range = mRange;
126 if (extent <= 0 || range <= extent) {
144 ScrollBarUtils.getThumbLength(scrollBarLength, thickness, extent, range);
146 ScrollBarUtils.getThumbOffset(scrollBarLength, thumbLength, extent, range,
382 return "ScrollBarDrawable: range=" + mRange + " offset=" + mOffset +
/frameworks/base/media/java/android/media/
H A DUtils.java43 * Sorts distinct (non-intersecting) range array in ascending order.
71 for (Range<T> range: another) {
73 one[ix].getUpper().compareTo(range.getLower()) < 0) {
77 one[ix].getUpper().compareTo(range.getUpper()) < 0) {
78 result.add(range.intersect(one[ix]));
84 if (one[ix].getLower().compareTo(range.getUpper()) <= 0) {
85 result.add(range.intersect(one[ix]));
92 * Returns the index of the range that contains a value in a sorted array of distinct ranges.
95 * @return if the value is in one of the ranges, it returns the index of that range. Otherwise,
96 * the return value is {@code (-1-index)} for the {@code index} of the range tha
140 factorRange(Range<Integer> range, int factor) argument
151 factorRange(Range<Long> range, long factor) argument
167 scaleRange(Range<Rational> range, int num, int den) argument
176 alignRange(Range<Integer> range, int align) argument
[all...]
/frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/
H A DEnvReverbTest.java255 static float linToExp(int lin, int range) { argument
257 return (float)Math.pow((double)10,(double)72*(lin-range)/(20*range));
260 static int expToLin(float exp, int range) { argument
262 return (int)(20*range*Math.log10((double)exp)/72 + range);
/frameworks/minikin/tests/unittest/
H A DLineBreakerTestHelper.h46 ConstantRun(const Range& range, const std::string& lang, float width) argument
47 : Run(range), mPaint(nullptr /* font collection */), mWidth(width) {
61 const Range& /* range */,
68 virtual float measureHyphenPiece(const U16StringPiece&, const Range& range, argument
78 return mWidth * (range.getLength() + extraCharForHyphen);
/frameworks/ml/nn/runtime/
H A DModelBuilder.cpp378 auto range = operandToOperations.equal_range(operandIndex); local
379 for (auto i = range.first; i != range.second; i++) {
/frameworks/native/services/surfaceflinger/
H A DLayerStats.cpp129 const char* LayerStats::destinationLocation(int32_t location, int32_t range, bool isHorizontal) { argument
131 int32_t ratio = location * 8 / range;
143 const char* LayerStats::destinationSize(int32_t size, int32_t range, bool isWidth) { argument
145 int32_t ratio = size * 8 / range;
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/
H A DAsyncListUtil.java37 * {@link AsyncListUtil} queries the currently visible range through {@link ViewCallback},
88 * @param viewCallback Callback for querying visible item range and update notifications.
111 * Updates the currently visible item range.
120 return; // Will update range will the refresh result arrives.
130 * range. To be called when the data item count and/or contents has changed.
144 * this position stays outside of the cached item range (as defined by
184 // Invalid range may arrive soon after the refresh.
227 // There will be no scroll event if the size change does not affect the current range.
332 log("requesting tile range: %d..%d",
496 * tiles that is required to cover the range returne
576 extendRangeInto(@onNull int[] range, @NonNull int[] outRange, int scrollHint) argument
[all...]
/frameworks/base/tools/aapt2/
H A DStringPool.cpp175 auto range = indexed_strings_.equal_range(str); local
176 for (auto iter = range.first; iter != range.second; ++iter) {

Completed in 520 milliseconds

123