/aosp14/frameworks/base/core/tests/coretests/src/android/text/method/ |
H A D | WordIteratorTest.java | 170 wordIterator.setCharSequence(text, 0, text.length()); in testSetCharSequence() 172 wordIterator.setCharSequence(text, text.length(), text.length()); in testSetCharSequence() 181 wordIterator.setCharSequence(text, text.indexOf('n'), text.length()); in testWindowWidth() 196 wordIterator.setCharSequence(text, 0, text.length()); in testPreceding() 220 wordIterator.setCharSequence(text, text.indexOf('d'), text.indexOf('e')); in testPreceding() 236 wordIterator.setCharSequence(text, 0, text.length()); in testFollowing() 260 wordIterator.setCharSequence(text, text.indexOf('d'), text.indexOf('e')); in testFollowing() 276 wordIterator.setCharSequence(text, 0, text.length()); in testIsBoundary() 304 wordIterator.setCharSequence(text, 0, text.length()); in testNextBoundary() 351 wordIterator.setCharSequence(text, 0, text.length()); in testPrevBoundary() [all …]
|
H A D | InsertModeTransformationMethodTest.java | 17 package android.text.method; 25 import android.text.Spanned; 100 text.insert(3, "xx"); in transformedText_charAt_editing() 104 text.insert(6, "vv"); in transformedText_charAt_editing() 108 text.delete(3, 5); in transformedText_charAt_editing() 112 text.delete(4, 6); in transformedText_charAt_editing() 117 text.delete(2, 4); in transformedText_charAt_editing() 791 text.delete(2, 3); in transformedText_getHighlightStartAndEnd_deletion() 799 text.delete(2, 5); in transformedText_getHighlightStartAndEnd_deletion() 807 text.delete(7, 9); in transformedText_getHighlightStartAndEnd_deletion() [all …]
|
/aosp14/frameworks/base/core/java/android/text/ |
H A D | Selection.java | 17 package android.text; 23 import java.text.BreakIterator; 42 if (text instanceof Spanned) { in getSelectionStart() 115 text.setSpan(watcher, 0, text.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE); in updateMemory() 119 removeMemory(text); in updateMemory() 125 MemoryTextWatcher[] watchers = text.getSpans(0, text.length(), MemoryTextWatcher.class); in removeMemory() 161 setSelection(text, 0, text.length()); in selectAll() 187 removeMemory(text); in removeSelection() 293 setSelection(text, text.length()); in moveDown() 435 to = text.length(); in extendToParagraphEnd() [all …]
|
H A D | Html.java | 17 package android.text; 33 import android.text.style.ImageSpan; 35 import android.text.style.QuoteSpan; 38 import android.text.style.StyleSpan; 42 import android.text.style.URLSpan; 278 withinStyle(out, text, 0, text.length()); in escapeHtml() 288 withinDiv(out, text, 0, text.length(), option); in withinHtml() 1004 text.append('\n'); in handleBr() 1014 endCssStyle(text); in endLi() 1054 T[] objs = text.getSpans(0, text.length(), kind); in getLast() [all …]
|
/aosp14/frameworks/base/tools/streaming_proto/cpp/ |
H A D | main.cpp | 28 text << indent << "const int " in write_enum() 49 text << endl; in write_enum() 67 ios::fmtflags fmt(text.flags()); in write_field() 69 text.flags(fmt); in write_field() 71 text << "LL;" << endl; in write_field() 73 text << endl; in write_field() 119 text << endl; in write_message() 125 stringstream text; in write_header_file() local 136 text << endl; in write_header_file() 142 text << endl; in write_header_file() [all …]
|
/aosp14/frameworks/base/packages/CredentialManager/src/com/android/credentialmanager/common/ui/ |
H A D | Texts.kt | 39 text = text, 53 text = text, 64 text: String, 71 text = text, 87 text = text, 105 text = text, 121 text = text, 134 text = text, 147 text = text, 160 text = text, [all …]
|
/aosp14/frameworks/base/core/java/android/widget/ |
H A D | MultiAutoCompleteTextView.java | 20 import android.text.Editable; 21 import android.text.SpannableString; 22 import android.text.Spanned; 23 import android.text.TextUtils; 24 import android.text.method.QwertyKeyListener; 119 Editable text = getText(); in enoughToFilter() local 248 int len = text.length(); in findTokenEnd() 262 int i = text.length(); in terminateToken() 269 return text; in terminateToken() 273 TextUtils.copySpansFrom((Spanned) text, 0, text.length(), in terminateToken() [all …]
|
/aosp14/frameworks/base/tools/powermodel/test/com/android/powermodel/ |
H A D | CsvParserTest.java | 62 final String text = ""; in testEmpty() local 63 System.out.println("Test: [" + text + "]"); in testEmpty() 74 final String text = "\n"; in testOnlyNewline() local 101 final String text = "\"\",\"\",\"\"\n"; in testEscapedEmpty() local 166 final String text = "a,b,c"; in testNoNewline() local 179 final String text = "a,b,,"; in testNoNewlineWithCommas() local 192 final String text = "a,b,\",\""; in testNoNewlineWithQuote() local 205 final String text = "aasdfadfadfad"; in testNoCommas() local 226 { text, } in testMaxLength() 232 final String text = big + "," + big; in testMaxLengthTwice() local [all …]
|
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/text/ |
H A D | StaticLayoutPerfTest.java | 17 package android.text; 101 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() 116 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 131 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_RandomText_NoStyled_Greedy_Hyphenation() 146 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_RandomText_NoStyled_Balanced_NoHyphenation() 161 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_RandomText_NoStyled_Balanced_Hyphenation() 176 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_RandomText_NoStyled_Balanced_Hyphenation_Fast() 191 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_RandomText_Styled_Greedy_NoHyphenation() 208 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_PrecomputedText_NoStyled_Greedy_NoHyphenation() 226 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_PrecomputedText_NoStyled_Greedy_NoHyphenation_DirDifferent() [all …]
|
/aosp14/frameworks/base/telephony/java/android/telephony/ |
H A D | JapanesePhoneNumberFormatter.java | 20 import android.text.Editable; 159 public static void format(Editable text) { in format() argument 164 int length = text.length(); in format() 176 while (i < text.length()) { in format() 177 if (text.charAt(i) == '-') { in format() 178 text.delete(i, i + 1); in format() 184 length = text.length(); in format() 190 char ch = text.charAt(i); in format() 192 text.replace(0, length, saved); in format() 203 text.insert(dashPos2, "-"); in format() [all …]
|
/aosp14/frameworks/base/core/java/com/google/android/util/ |
H A D | AbstractMessageParser.java | 71 private String text; field in AbstractMessageParser 103 this.text = text; in AbstractMessageParser() 140 if (parseMeText && text.startsWith("/me") && (text.length() > 3) && in parse() 143 text = text.substring(4); in parse() 356 while ((index < text.length()) && isDomainChar(text.charAt(index))) { in parseURL() 391 if ((index + 1 < text.length()) && (text.charAt(index) == ':')) { in parseURL() 550 if (isSmileyBreak(text.charAt(index - 1), text.charAt(index))) { in isSmileyBreak() 702 this.text = text; in Token() 755 text = trimLeadingWhitespace(text); in trimLeadingWhitespace() 760 text = trimTrailingWhitespace(text); in trimTrailingWhitespace() [all …]
|
/aosp14/frameworks/base/tools/aapt/ |
H A D | pseudolocalize.h | 12 virtual String16 text(const String16& text) = 0; 13 virtual String16 placeholder(const String16& text) = 0; 19 String16 text(const String16& text) { return text; } in text() function 20 String16 placeholder(const String16& text) { return text; } in placeholder() argument 27 String16 text(const String16& text); 28 String16 placeholder(const String16& text); 36 String16 text(const String16& text); 37 String16 placeholder(const String16& text); 51 String16 text(const String16& text);
|
/aosp14/frameworks/base/graphics/java/android/graphics/ |
H A D | Paint.java | 33 import android.text.SpannedString; 34 import android.text.TextUtils; 2165 if (text == null) { in getFontMetricsInt() 2227 if (text == null) { in getFontMetricsInt() 2353 if (text == null) { in measureText() 2385 if (text == null) { in measureText() 2414 if (text == null) { in measureText() 2417 return measureText(text, 0, text.length()); in measureText() 2527 if (start == 0 && text instanceof String && end == text.length()) { in breakText() 2716 return getTextWidths(text, 0, text.length(), widths); in getTextWidths() [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/view/textclassifier/ |
H A D | TextClassifierUtilsTest.java | 35 final String text = "Yakuza call themselves 任侠団体"; in testGetSubString() local 41 start = text.indexOf("任侠団体"); in testGetSubString() 42 end = text.length(); in testGetSubString() 44 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 51 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 55 start = text.indexOf("all"); in testGetSubString() 58 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 62 start = text.indexOf("themselves"); in testGetSubString() 69 minimumLength = text.length() + 1; in testGetSubString() 71 .isEqualTo(text); in testGetSubString() [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/widget/ |
H A D | TextViewActivityMouseTest.java | 144 mouseDragOnText(text.indexOf("c"), text.indexOf("h"))); in testContextMenu() 180 mouseDragOnText(text.indexOf("d"), text.indexOf("f") + 1)); in testDragAndDrop() 183 mouseDragOnText(text.indexOf("e"), text.length())); in testDragAndDrop() 196 mouseDragOnText(text.indexOf("d"), text.indexOf("f") + 1)); in testDragAndDrop_longClick() 199 mouseLongClickAndDragOnText(text.indexOf("e"), text.length())); in testDragAndDrop_longClick() 286 mouseLongClickAndDragOnText(text.indexOf("f"), text.indexOf("j"))); in testSelectTextByLongPressAndDrag() 297 mouseLongClickAndDragOnText(text.indexOf("j"), text.indexOf("f"))); in testSelectTextByLongPressAndDrag_reverse() 323 text.substring(text.indexOf("Second"), text.indexOf("Third")))); in testSelectTextByTripleClick() 332 text.substring(text.indexOf("Second"), text.indexOf("Third")))); in testSelectTextByTripleClick() 357 text.substring(text.indexOf("Second"), text.indexOf("Third")))); in testSelectTextByTripleClickAndDrag() [all …]
|
H A D | SuggestionsPopupWindowTest.java | 46 import android.text.Selection; 47 import android.text.Spannable; 48 import android.text.Spanned; 49 import android.text.TextPaint; 98 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testOnTextContextMenuItem() 116 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testSelectionActionMode() 135 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testInsertionActionMode() 161 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testSuggestionItems() 199 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testMisspelled() 227 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testEasyCorrect() [all …]
|
H A D | TextViewActivityTest.java | 164 setText(text); in testPositionCursorAtTextAtIndex_arabic() 184 setText(text); in testPositionCursorAtTextAtIndex_devanagari() 232 setText(text); in testLongPressAndDragToSelect_emoji() 246 setText(text); in testDragAndDrop() 250 longPressAndDragOnText(text.indexOf("e"), text.length())); in testDragAndDrop() 306 setText(text); in testToolbarAppearsAfterSelection() 521 setText(text); in testToolbarAndInsertionHandle() 784 text.substring(text.indexOf('\u062D'), text.indexOf('\u0635') + 1))); in testSelectionHandles_multiLine_rtl() 789 text.substring(text.indexOf('\u062A'), text.indexOf('\u0635') + 1))); in testSelectionHandles_multiLine_rtl() 794 text.substring(text.indexOf('\u062A'), text.indexOf('\u0638') + 1))); in testSelectionHandles_multiLine_rtl() [all …]
|
/aosp14/frameworks/base/tools/streaming_proto/java/ |
H A D | main.cpp | 86 text << endl; in write_enum() 109 text.flags(fmt); in write_field() 111 text << "L;" << endl; in write_field() 113 text << endl; in write_field() 127 text << endl; in write_message() 147 text << indent << "}" << endl; in write_message() 148 text << endl; in write_message() 161 stringstream text; in write_file() local 172 text << endl; in write_file() 183 text << endl; in write_file() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/ |
H A D | ConfigurableTexts.java | 40 public int add(final TextView text) { in add() argument 41 return add(text, -1); in add() 45 if (text == null) return 0; in add() 46 if (mTexts.containsKey(text)) { in add() 47 return mTexts.get(text); in add() 52 final float px = text.getTextSize(); in add() 54 mTexts.put(text, sp); in add() 62 setTextSizeH(text, sp); in add() 65 mTextLabels.put(text, labelResId); in add() 70 mTexts.remove(text); in remove() [all …]
|
/aosp14/frameworks/base/core/java/android/text/format/ |
H A D | RelativeDateTimeFormatter.java | 17 package android.text.format; 19 import static android.text.format.DateUtils.FORMAT_ABBREV_ALL; 20 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH; 21 import static android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE; 22 import static android.text.format.DateUtils.FORMAT_NO_YEAR; 23 import static android.text.format.DateUtils.FORMAT_NUMERIC_DATE; 24 import static android.text.format.DateUtils.FORMAT_SHOW_DATE; 25 import static android.text.format.DateUtils.FORMAT_SHOW_TIME; 26 import static android.text.format.DateUtils.FORMAT_SHOW_YEAR; 30 import android.icu.text.DisplayContext; [all …]
|
/aosp14/frameworks/base/core/java/android/text/util/ |
H A D | Rfc822Tokenizer.java | 17 package android.text.util; 51 int cursor = text.length(); in tokenize() 54 char c = text.charAt(i); in tokenize() 82 c = text.charAt(i); in tokenize() 102 c = text.charAt(i); in tokenize() 129 c = text.charAt(i); in tokenize() 173 tokenize(text, out); in tokenize() 220 i = findTokenEnd(text, i); in findTokenStart() 242 int len = text.length(); in findTokenEnd() 246 char c = text.charAt(i); in findTokenEnd() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/ |
H A D | AnnotatedStringResource.kt | 21 import android.text.Spanned 22 import android.text.style.StyleSpan 23 import android.text.style.URLSpan 31 import androidx.compose.ui.text.AnnotatedString 32 import androidx.compose.ui.text.SpanStyle 34 import androidx.compose.ui.text.font.FontStyle 46 val text = resources.getText(id) regex 52 return if (text is Spanned) { 55 append((text.toString())) 56 text.getSpans(0, text.length, Any::class.java).forEach { [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/util/ |
H A D | XmlSerializerWrapper.java | 104 public XmlSerializer text(String text) throws IOException{ in text() argument 105 return mWrapped.text(text); in text() 109 return mWrapped.text(buf, start, len); in text() 112 public void cdsect(String text) in cdsect() argument 114 mWrapped.cdsect(text); in cdsect() 118 mWrapped.entityRef(text); in entityRef() 122 mWrapped.processingInstruction(text); in processingInstruction() 125 public void comment(String text) throws IOException { in comment() argument 126 mWrapped.comment(text); in comment() 130 mWrapped.docdecl(text); in docdecl() [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/graphics/ |
H A D | PaintTest.java | 55 mText = text; in HintingTestCase() 169 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), false, true); in testGetTextRunAdvances() 170 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), false, false); in testGetTextRunAdvances() 179 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), true, true); in testGetTextRunAdvances() 180 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), true, false); in testGetTextRunAdvances() 232 p.getTextRunAdvances(text, 0, text.length, 0, text.length, false, in testGetTextRunAdvances_invalid() 239 p.getTextRunAdvances(text, 0, text.length, 0, text.length, false, in testGetTextRunAdvances_invalid() 247 p.getTextRunAdvances(text, 0, text.length, -1, text.length, false, null, 0); in testGetTextRunAdvances_invalid() 254 p.getTextRunAdvances(text, 0, text.length, 1, text.length, false, null, 0); in testGetTextRunAdvances_invalid() 261 p.getTextRunAdvances(text, 0, text.length, 0, text.length - 1, false, null, 0); in testGetTextRunAdvances_invalid() [all …]
|
/aosp14/frameworks/base/graphics/java/android/graphics/text/ |
H A D | TextRunShaper.java | 17 package android.graphics.text; 21 import android.text.TextDirectionHeuristic; 22 import android.text.TextPaint; 23 import android.text.TextUtils; 68 Preconditions.checkNotNull(text); in shapeTextRun() 71 nativeShapeTextRun(text, start, count, contextStart, contextCount, isRtl, in shapeTextRun() 98 Preconditions.checkNotNull(text); in shapeTextRun() 100 if (text instanceof String) { in shapeTextRun() 108 TextUtils.getChars(text, contextStart, contextStart + contextCount, buf, 0); in shapeTextRun() 118 char[] text, int start, int count, int contextStart, int contextCount, in nativeShapeTextRun() argument [all …]
|