/aosp14/frameworks/base/core/java/android/view/ |
H A D | AccessibilityIterators.java | 64 if (start < 0 || end < 0 || start == end) { in getRange() 111 start = 0; in following() 114 start = mImpl.following(start); in following() 199 start = 0; in following() 201 while (!isLetterOrDigit(start) && !isStartBoundary(start)) { in following() 202 start = mImpl.following(start); in following() 234 if (start == BreakIterator.DONE || !isStartBoundary(start)) { in preceding() 282 while (start < textLength && mText.charAt(start) == '\n' in following() 284 start++; in following() 316 while (start > 0 && !isStartBoundary(start)) { in preceding() [all …]
|
/aosp14/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/app/ |
H A D | UiResultsFragment.java | 73 data[(start++)] = "Iteration"; 74 data[(start++)] = "" + i; 75 data[(start++)] = "Total Frames"; 95 data[(start++)] = "Longest frame:"; 107 data[(start++)] = "Score:"; 115 int start = 0; 118 data[(start++)] = "Total Frames"; 128 data[(start++)] = "Longest frame:"; 130 data[(start++)] = "Shortest frame:"; 132 data[(start++)] = "Score:"; [all …]
|
/aosp14/frameworks/base/core/java/android/text/ |
H A D | SpannableStringBuilder.java | 483 if (start > mGapStart) start -= mGapLength; in removeSpan() 694 + " (" + start + " follows " + charAt(start - 1) + ")"); in setSpan() 1209 System.arraycopy(mText, start, dest, destoff, end - start); in getChars() 1213 System.arraycopy(mText, start, dest, destoff, mGapStart - start); in getChars() 1317 if (end < start) { in checkRange() 1425 c.drawText(mText, start, end - start, x, y, p); in drawText() 1427 c.drawText(mText, start + mGapLength, end - start, x, y, p); in drawText() 1472 ret = p.measureText(mText, start, end - start); in measureText() 1474 ret = p.measureText(mText, start + mGapLength, end - start); in measureText() 1496 ret = p.getTextWidths(mText, start, end - start, widths); in getTextWidths() [all …]
|
H A D | SpannableStringInternal.java | 34 if (start == 0 && end == source.length()) in SpannableStringInternal() 82 if (st < start) in copySpansFromSpanned() 83 st = start; in copySpansFromSpanned() 87 setSpan(spans[i], st - start, en - start, fl, false/*enforceParagraph*/); in copySpansFromSpanned() 140 if (spanStart < start) spanStart = start; in copySpansFromInternal() 196 int nstart = start; in setSpan() 199 checkRange("setSpan", start, end); in setSpan() 208 + " (" + start + " follows " + charAt(start - 1) + ")"); in setSpan() 483 if (end < start) { in checkRange() 491 if (start > len || end > len) { in checkRange() [all …]
|
H A D | InputFilter.java | 50 public CharSequence filter(CharSequence source, int start, int end, in filter() argument 80 final int length = end - start; in filter() 113 mStart = start; in CharSequenceWrapper() 115 mLength = end - start; in CharSequenceWrapper() 129 public CharSequence subSequence(int start, int end) { in subSequence() argument 130 if (start < 0 || end < 0 || end > mLength || start > end) { in subSequence() 140 public <T> T[] getSpans(int start, int end, Class<T> type) { in getSpans() argument 180 } else if (keep >= end - start) { in filter() 183 keep += start; in filter() 186 if (keep == start) { in filter() [all …]
|
H A D | MeasuredParagraph.java | 195 final int length = end - start; in getDirections() 196 return AndroidBidi.directions(mParaDir, mLevels.getRawArray(), start, mCopiedBuffer, start, in getDirections() 405 @IntRange(from = 0) int start, in buildForStaticLayout() 469 mTextStart = start; in resetAndAnalyzeBidi() 470 mTextLength = end - start; in resetAndAnalyzeBidi() 530 mWidths.set(start, width); in applyReplacementRun() 531 if (end > start + 1) { in applyReplacementRun() 550 mCopiedBuffer, start, end - start, start, end - start, false /* isRtl */, in applyStyleRun() 557 byte level = mLevels.get(start); in applyStyleRun() 560 for (int levelStart = start, levelEnd = start + 1;; ++levelEnd) { in applyStyleRun() [all …]
|
H A D | AlteredCharSequence.java | 68 public <T> T[] getSpans(int start, int end, Class<T> kind) { in getSpans() argument 69 return mSpanned.getSpans(start, end, kind); in getSpans() 84 public int nextSpanTransition(int start, int end, Class kind) { in nextSpanTransition() argument 85 return mSpanned.nextSpanTransition(start, end, kind); in nextSpanTransition() 102 public CharSequence subSequence(int start, int end) { in subSequence() argument 104 mChars, mStart - start, mEnd - start); in subSequence() 107 public void getChars(int start, int end, char[] dest, int off) { in getChars() argument 108 TextUtils.getChars(mSource, start, end, dest, off); in getChars() 110 start = Math.max(mStart, start); in getChars() 113 if (start > end) in getChars() [all …]
|
H A D | PrecomputedText.java | 518 mStart = start; in PrecomputedText() 596 if (mStart != start || mEnd != end) { in checkResultUsable() 629 Preconditions.checkArgument(0 <= start && start <= mText.length(), "invalid start offset"); in getWidth() 633 if (start == end) { in getWidth() 639 if (start < paraStart || paraEnd < end) { in getWidth() 659 Preconditions.checkArgument(0 <= start && start <= mText.length(), "invalid start offset"); in getBounds() 663 if (start == end) { in getBounds() 690 Preconditions.checkArgument(0 <= start && start <= mText.length(), "invalid start offset"); in getFontMetricsInt() 694 if (start == end) { in getFontMetricsInt() 753 mText.setSpan(what, start, end, flags); in setSpan() [all …]
|
/aosp14/frameworks/base/libs/hwui/ |
H A D | PathParser.cpp | 56 int currentIndex = start; in extract() 126 if (pathStr[start] == 'z' || pathStr[start] == 'Z') { in getFloats() 130 int endPosition = start; in getFloats() 223 size_t start = 0; in getPathDataFromAsciiString() local 225 while (isspace(pathStr[start]) && start < strLen) { in getPathDataFromAsciiString() 226 start++; in getPathDataFromAsciiString() 228 if (start == strLen) { in getPathDataFromAsciiString() 233 size_t end = start + 1; in getPathDataFromAsciiString() 249 start = end; in getPathDataFromAsciiString() 253 if ((end - start) == 1 && start < strLen) { in getPathDataFromAsciiString() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/ |
H A D | Transformation.kt | 97 val start: Float, 101 start: Float? = null, 103 ) : this(start ?: BoundUnspecified, end ?: BoundUnspecified) 106 require(!start.isSpecified() || (start in 0f..1f)) 108 require(!start.isSpecified() || !end.isSpecified() || start <= end) 112 fun reverse() = TransformationRange(start = reverseBound(end), end = reverseBound(start)) 117 start.isSpecified() && end.isSpecified() -> 118 ((transitionProgress - start) / (end - start)).coerceIn(0f, 1f) 119 !start.isSpecified() && !end.isSpecified() -> transitionProgress 121 else -> ((transitionProgress - start) / (1f - start)).coerceAtLeast(0f)
|
/aosp14/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/ui/util/ |
H A D | MathHelpers.kt | 25 fun lerp(start: Float, stop: Float, fraction: Float): Float { 26 return (1 - fraction) * start + fraction * stop 30 fun lerp(start: Int, stop: Int, fraction: Float): Int { 31 return start + ((stop - start) * fraction.toDouble()).roundToInt() 35 fun lerp(start: Long, stop: Long, fraction: Float): Long { 36 return start + ((stop - start) * fraction.toDouble()).roundToLong() 40 fun lerp(start: IntSize, stop: IntSize, fraction: Float): IntSize { 42 lerp(start.width, stop.width, fraction), 43 lerp(start.height, stop.height, fraction)
|
/aosp14/frameworks/base/tools/aapt2/util/ |
H A D | Util.cpp | 58 start = current + 1; in SplitAndTransform() 93 while (start != end && isspace(*start)) { in TrimLeadingWhitespace() 94 start++; in TrimLeadingWhitespace() 96 return StringPiece(start, end - start); in TrimLeadingWhitespace() 110 return StringPiece(start, end - start); in TrimTrailingWhitespace() 121 while (start != end && isspace(*start)) { in TrimWhitespace() 122 start++; in TrimWhitespace() 129 return StringPiece(start, end - start); in TrimWhitespace() 385 start += 1; in operator ++() 389 token_ = StringPiece(start, current - start); in operator ++() [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/os/ |
H A D | LoggingPrintStream.java | 91 int start = 0; in flush() local 95 while (start < length in flush() 98 start = nextBreak + 1; in flush() 103 if (start < length) { in flush() 109 builder.delete(0, start); in flush() 132 int end = start + count; in write() 133 while (start < end) { in write() 138 start += numBytes; in write() 303 int start = 0; in println() local 307 while (start < length in println() [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/view/textclassifier/ |
H A D | TextClassifierUtilsTest.java | 36 int start; in testGetSubString() local 41 start = text.indexOf("任侠団体"); in testGetSubString() 44 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 48 start = 0; in testGetSubString() 51 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 55 start = text.indexOf("all"); in testGetSubString() 56 end = start + 1; in testGetSubString() 58 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 62 start = text.indexOf("themselves"); in testGetSubString() 63 end = start + "themselves".length(); in testGetSubString() [all …]
|
/aosp14/frameworks/base/graphics/java/android/graphics/ |
H A D | Paint.java | 2168 if (start < 0 || start >= text.length()) { in getFontMetricsInt() 2230 if (start < 0 || start >= text.length) { in getFontMetricsInt() 2388 if ((start | end | (end - start) | (text.length() - end)) < 0) { in measureText() 2397 start, end, start, end, mBidiFlags, null, 0)); in measureText() 2432 if ((start | end | (end - start) | (text.length() - end)) < 0) { in measureText() 2520 if ((start | end | (end - start) | (text.length() - end)) < 0) { in breakText() 2639 if ((start | end | (end - start) | (text.length() - end)) < 0) { in getTextWidths() 3100 | start - contextStart | offset - start | end - offset in getRunAdvance() 3130 | start - contextStart | offset - start | end - offset in getRunAdvance() 3302 | start - contextStart | end - start | contextEnd - end in getOffsetForAdvance() [all …]
|
/aosp14/frameworks/base/core/java/android/text/method/ |
H A D | InsertModeTransformationMethod.java | 90 mStart = start; in InsertModeTransformationMethod() 164 if (start > mEnd) return; in onTextChanged() 169 if (start < mStart) { in onTextChanged() 170 if (start + before <= mStart) { in onTextChanged() 176 mStart = start; in onTextChanged() 180 if (start + before <= mEnd) { in onTextChanged() 183 } else if (start < mEnd) { in onTextChanged() 186 mEnd = start + count; in onTextChanged() 276 if (end < start || start < 0 || end > length()) { in subSequence() 279 if (start == end) { in subSequence() [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/util/ |
H A D | QuickSelect.java | 192 public static <T> T select(@NonNull List<T> list, int start, int length, int k, in select() argument 194 if (list == null || start < 0 || length <= 0 || list.size() < start + length in select() 198 return list.get(selectImpl(list, start, start + length - 1, k + start, comparator)); in select() 211 public static int select(@NonNull int[] array, int start, int length, int k) { in select() argument 212 if (array == null || start < 0 || length <= 0 || array.length < start + length in select() 216 return array[selectImpl(array, start, start + length - 1, k + start)]; in select() 230 if (array == null || start < 0 || length <= 0 || array.length < start + length in select() 234 return array[selectImpl(array, start, start + length - 1, k + start)]; in select() 248 public static <T> T select(@NonNull T[] array, int start, int length, int k, in select() argument 250 if (array == null || start < 0 || length <= 0 || array.length < start + length in select() [all …]
|
H A D | CharSequences.java | 42 public CharSequence subSequence(int start, int end) { in forAsciiBytes() argument 43 return forAsciiBytes(bytes, start, end); in forAsciiBytes() 64 final int start, final int end) { 65 validate(start, end, bytes.length); 68 return (char) bytes[index + start]; 72 return end - start; 76 newStart -= start; 77 newEnd -= start; 83 return new String(bytes, start, length()); 88 static void validate(int start, int end, int length) { [all …]
|
/aosp14/frameworks/base/graphics/java/android/graphics/text/ |
H A D | MeasuredText.java | 94 Preconditions.checkArgument(0 <= start && start <= mChars.length, in getWidth() 98 Preconditions.checkArgument(start <= end, in getWidth() 99 "start(%d) is larger than end(%d)", start, end); in getWidth() 100 return nGetWidth(mNativePtr, start, end); in getWidth() 121 Preconditions.checkArgument(0 <= start && start <= mChars.length, in getBounds() 125 Preconditions.checkArgument(start <= end, in getBounds() 126 "start(%d) is larger than end(%d)", start, end); in getBounds() 128 nGetBounds(mNativePtr, mChars, start, end, rect); in getBounds() 140 Preconditions.checkArgument(0 <= start && start <= mChars.length, in getFontMetricsInt() 144 Preconditions.checkArgument(start <= end, in getFontMetricsInt() [all …]
|
/aosp14/frameworks/base/core/java/android/widget/ |
H A D | SpellChecker.java | 221 final int start = 0; in onPerformSpellCheck() local 246 start = 0; in spellCheck() 332 if (start >= 0 && end > start && (forceCheckWhenEditingWord || isNotEditing)) { in spellCheck() 409 final int start; in onGetSuggestionsInternal() local 413 end = start + length; in onGetSuggestionsInternal() 549 final int start; in createMisspelledSuggestionSpan() local 553 end = start + length; in createMisspelledSuggestionSpan() 555 start = spellCheckSpanStart; in createMisspelledSuggestionSpan() 664 if (parseEnd > start) { in parse() 889 } else if (spanEnd == start && start < editable.length()) { [all …]
|
H A D | MultiAutoCompleteTextView.java | 97 int start = mTokenizer.findTokenStart(text, end); in performFiltering() local 99 performFiltering(text, start, end, keyCode); in performFiltering() 126 int start = mTokenizer.findTokenStart(text, end); in enoughToFilter() local 128 if (end - start >= getThreshold()) { in enoughToFilter() 150 int start = mTokenizer.findTokenStart(e, i); in performValidation() local 151 int end = mTokenizer.findTokenEnd(e, start); in performValidation() 153 CharSequence sub = e.subSequence(start, end); in performValidation() 155 e.replace(start, i, ""); in performValidation() 157 e.replace(start, i, in performValidation() 161 i = start; in performValidation() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/ |
H A D | FontInterpolator.kt | 100 return start 105 val startAxes = start.axes ?: EMPTY_AXES 109 return start 114 tmpInterpKey.set(start, end, progress) 155 tmpVarFontKey.set(start, newAxes) 178 start: Array<FontVariationAxis>, 183 start.sortBy { axis -> axis.tag } 189 while (i < start.size || j < end.size) { 190 val tagA = if (i < start.size) start[i].tag else null 235 fun canInterpolate(start: Font, end: Font) = [all …]
|
/aosp14/frameworks/base/core/java/android/util/ |
H A D | RecurrenceRule.java | 56 public final ZonedDateTime start; field in RecurrenceRule 61 this.start = start; in RecurrenceRule() 76 final ZonedDateTime start = ZonedDateTime.of( in buildRecurringMonthly() local 83 start = convertZonedDateTime(source.readString()); in RecurrenceRule() 95 dest.writeString(convertZonedDateTime(start)); in writeToParcel() 123 .append("start=").append(start) in toString() 131 return Objects.hash(start, end, period); in hashCode() 138 return Objects.equals(start, other.start) in equals() 163 return start != null in isMonthly() 182 hasNext = (start != null) && (end != null); in NonrecurringIterator() [all …]
|
/aosp14/system/core/toolbox/ |
H A D | start.cpp | 30 static void ControlService(bool start, const std::string& service) { in ControlService() argument 31 if (!android::base::SetProperty(start ? "ctl.start" : "ctl.stop", service)) { in ControlService() 32 std::cerr << "Unable to " << (start ? "start" : "stop") << " service '" << service in ControlService() 38 static void ControlDefaultServices(bool start) { in ControlDefaultServices() argument 52 if (start) { in ControlDefaultServices() 63 static int StartStop(int argc, char** argv, bool start) { in StartStop() argument 70 ControlDefaultServices(start); in StartStop() 74 std::cout << "usage: " << (start ? "start" : "stop") in StartStop() 77 << (start ? "Starts" : "Stops") in StartStop() 83 ControlService(start, argv[i]); in StartStop()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/ |
H A D | MetadataAnimationHandlerTest.kt | 65 verify(exitAnimator).start() 72 verify(exitAnimator, times(1)).start() 73 verify(enterAnimator, never()).start() 80 verify(exitAnimator, times(1)).start() 81 verify(enterAnimator, times(1)).start() 88 verify(exitAnimator, times(1)).start() 89 verify(enterAnimator, times(1)).start() 127 verify(exitAnimator, times(1)).start() 128 verify(enterAnimator, never()).start() 139 verify(exitAnimator, times(1)).start() [all …]
|