/aosp12/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/ |
H A D | LocaleSpanCompatUtils.java | 96 final int searchEnd = Math.min(end + 1, spannable.length()); in updateLocaleSpan() 116 final int spanEnd = spannable.getSpanEnd(existingLocaleSpan); in updateLocaleSpan() 128 final int spanFlag = spannable.getSpanFlags(existingLocaleSpan); in updateLocaleSpan() 150 originalLocaleSpanFlag = spannable.getSpanFlags(localeSpan); in updateLocaleSpan() 153 spannable.removeSpan(existingLocaleSpansToBeMerged.get(i)); in updateLocaleSpan() 158 spannable.setSpan(localeSpan, newStart, newEnd, localeSpanFlag); in updateLocaleSpan() 166 final int spanStart = spannable.getSpanStart(localeSpan); in removeLocaleSpanFromRange() 167 final int spanEnd = spannable.getSpanEnd(localeSpan); in removeLocaleSpanFromRange() 180 final int spanFlags = spannable.getSpanFlags(localeSpan); in removeLocaleSpanFromRange() 196 spannable.setSpan(localeSpan, removeEnd, spanEnd, spanFlags); in removeLocaleSpanFromRange() [all …]
|
H A D | SuggestionSpanUtils.java | 65 final Spannable spannable = new SpannableString(text); in getTextWithAutoCorrectionIndicatorUnderline() local 68 spannable.setSpan(suggestionSpan, 0, text.length(), in getTextWithAutoCorrectionIndicatorUnderline() 70 return spannable; in getTextWithAutoCorrectionIndicatorUnderline() 97 final Spannable spannable = new SpannableString(pickedWord); in getTextWithSuggestionSpan() local 98 spannable.setSpan(suggestionSpan, 0, pickedWord.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in getTextWithSuggestionSpan() 99 return spannable; in getTextWithSuggestionSpan()
|
/aosp12/frameworks/base/core/tests/coretests/src/android/text/ |
H A D | SpannableTest.java | 41 Spannable spannable = newSpannableWithText("abcdef"); in testGetSpans() local 43 spannable.setSpan(emptySpan, 1, 1, 0); in testGetSpans() 45 spannable.setSpan(unemptySpan, 1, 2, 0); in testGetSpans() 52 spans = spannable.getSpans(0, 1, Object.class); in testGetSpans() 54 spans = spannable.getSpans(0, 2, Object.class); in testGetSpans() 56 spans = spannable.getSpans(1, 2, Object.class); in testGetSpans() 58 spans = spannable.getSpans(2, 2, Object.class); in testGetSpans() 66 spannable.setSpan(emptySpan, 1, 1, 0); in testRemoveSpanWithIntermediateFlag() 68 spannable.setSpan(unemptySpan, 1, 2, 0); in testRemoveSpanWithIntermediateFlag() 84 spannable.setSpan(watcher, 0, 2, 0); in testRemoveSpanWithIntermediateFlag() [all …]
|
H A D | DynamicLayoutTest.java | 198 final SpannableStringBuilder spannable = new SpannableStringBuilder(text); in testReflow_afterSpannableEdit() local 199 spannable.setSpan(new MockReplacementSpan(), 4, 6, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testReflow_afterSpannableEdit() 200 spannable.setSpan(new MockReplacementSpan(), 10, length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testReflow_afterSpannableEdit() 202 final DynamicLayout layout = new DynamicLayout(spannable, new TextPaint(), WIDTH, in testReflow_afterSpannableEdit() 205 spannable.delete(8, 9); in testReflow_afterSpannableEdit() 206 spannable.replace(7, 8, "ch"); in testReflow_afterSpannableEdit() 208 layout.reflow(spannable, 0, length, length); in testReflow_afterSpannableEdit()
|
/aosp12/frameworks/base/core/tests/coretests/src/android/text/util/ |
H A D | LinkifyTest.java | 111 Spannable spannable = new SpannableString("any https://android.com any android.com any"); in testAddLinks_addsLinksWhenDefaultSchemeIsNull() local 112 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, null, null, null); in testAddLinks_addsLinksWhenDefaultSchemeIsNull() 114 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks_addsLinksWhenDefaultSchemeIsNull() 123 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, "http://", null, null); in testAddLinks_addsLinksWhenSchemesArrayIsNull() 125 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks_addsLinksWhenSchemesArrayIsNull() 134 Spannable spannable = new SpannableString("any android.com any"); in testAddLinks_prependsDefaultSchemeToBeginingOfLink() local 135 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, "http://", in testAddLinks_prependsDefaultSchemeToBeginingOfLink() 138 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks_prependsDefaultSchemeToBeginingOfLink() 145 Spannable spannable = new SpannableString("any https://android.com any"); in testAddLinks_doesNotPrependSchemeIfSchemeExists() local 146 Linkify.addLinks(spannable, Patterns.AUTOLINK_WEB_URL, "http://", in testAddLinks_doesNotPrependSchemeIfSchemeExists() [all …]
|
/aosp12/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/span/ |
H A D | SpanHelper.java | 30 public static void replaceSpan(Spannable spannable, Object oldSpan, Object newSpan) { in replaceSpan() argument 31 final int spanStart = spannable.getSpanStart(oldSpan); in replaceSpan() 32 final int spanEnd = spannable.getSpanEnd(oldSpan); in replaceSpan() 33 spannable.removeSpan(oldSpan); in replaceSpan() 34 spannable.setSpan(newSpan, spanStart, spanEnd, 0); in replaceSpan()
|
/aosp12/frameworks/base/apct-tests/perftests/core/src/android/text/ |
H A D | NonEditableTextGenerator.java | 68 final Spannable spannable = (mTextType == TextType.SPANNABLE_BUILDER) ? in createSpannable() local 73 spannable.setSpan(new BulletSpan(), 0, spannable.length(), SPAN_INCLUSIVE_INCLUSIVE); in createSpannable() 76 spannable.setSpan(new Object(), 0, spannable.length(), SPAN_INCLUSIVE_INCLUSIVE); in createSpannable() 77 spannable.setSpan(new Object(), 0, 1, SPAN_INCLUSIVE_INCLUSIVE); in createSpannable() 79 return spannable; in createSpannable()
|
/aosp12/packages/apps/Contacts/tests/src/com/android/contacts/format/ |
H A D | SpannedTestUtils.java | 58 Spanned spannable = (Spanned) seq; in assertPrefixSpan() local 61 Assert.assertEquals(0, getNumForegroundColorSpansBetween(spannable, 0, start - 1)); in assertPrefixSpan() 63 Assert.assertEquals(1, getNumForegroundColorSpansBetween(spannable, start, end)); in assertPrefixSpan() 64 Assert.assertEquals(0, getNumForegroundColorSpansBetween(spannable, end + 1, in assertPrefixSpan() 65 spannable.length() - 1)); in assertPrefixSpan()
|
/aosp12/frameworks/opt/setupwizard/library/platform/src/com/android/setupwizardlib/view/ |
H A D | RichTextView.java | 66 final SpannableString spannable = new SpannableString(text); in getRichText() local 67 final Annotation[] spans = spannable.getSpans(0, spannable.length(), Annotation.class); in getRichText() 80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText() 83 SpanHelper.replaceSpan(spannable, span, link); in getRichText() 86 return spannable; in getRichText()
|
/aosp12/packages/apps/Settings/src/com/android/settings/deviceinfo/ |
H A D | PhoneNumberUtil.java | 42 Spannable spannable = new SpannableStringBuilder(text); in expandByTts() local 44 spannable.setSpan(span, 0, spannable.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in expandByTts() 45 return spannable; in expandByTts()
|
/aosp12/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/view/ |
H A D | RichTextView.java | 66 final SpannableString spannable = new SpannableString(text); in getRichText() local 67 final Annotation[] spans = spannable.getSpans(0, spannable.length(), Annotation.class); in getRichText() 80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText() 83 SpanHelper.replaceSpan(spannable, span, link); in getRichText() 86 return spannable; in getRichText()
|
/aosp12/frameworks/base/core/java/android/text/util/ |
H A D | Linkify.java | 469 SpannableString spannable = SpannableString.valueOf(text.getText()); in addLinks() local 471 boolean linksAdded = addLinks(spannable, pattern, defaultScheme, schemes, matchFilter, in addLinks() 474 text.setText(spannable); in addLinks() 510 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 513 return addLinks(spannable, pattern, scheme, null, matchFilter, in addLinks() 535 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 560 public static final boolean addLinks(@NonNull Spannable spannable, @NonNull Pattern pattern, in addLinks() argument 564 if (spannable != null && containsUnsupportedCharacters(spannable.toString())) { in addLinks() 583 Matcher m = pattern.matcher(spannable); in addLinks() 591 allowed = matchFilter.acceptMatch(spannable, start, end); in addLinks() [all …]
|
/aosp12/packages/apps/Contacts/src/com/android/contacts/compat/ |
H A D | PhoneNumberUtilsCompat.java | 108 Spannable spannable = Spannable.Factory.getInstance().newSpannable(phoneNumber); in createTtsSpannableInternal() local 109 addTtsSpanInternal(spannable, 0, spannable.length()); in createTtsSpannableInternal() 110 return spannable; in createTtsSpannableInternal()
|
/aosp12/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
H A D | CursorAnchorInfoUtils.java | 149 final Spannable spannable = (Spannable) text; in extractFromTextViewInternal() local 150 final Object[] spans = spannable.getSpans(0, text.length(), Object.class); in extractFromTextViewInternal() 152 final int spanFlag = spannable.getSpanFlags(span); in extractFromTextViewInternal() 155 spannable.getSpanStart(span)); in extractFromTextViewInternal() 156 composingTextEnd = Math.max(composingTextEnd, spannable.getSpanEnd(span)); in extractFromTextViewInternal()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/timezone/ |
H A D | SpannableUtilTest.java | 35 Spannable spannable = SpannableUtil.getResourcesText( in testFormat() local 38 assertThat(spannable.toString()).isEqualTo("UTC (GMT+00:00)"); in testFormat()
|
/aosp12/frameworks/base/core/tests/coretests/src/android/text/method/ |
H A D | EditorState.java | 147 final Spannable spannable = new SpannableString(sb.toString()); in setByString() local 169 spannable.setSpan(mockReplacementSpan, replacementSpanStart, replacementSpanEnd, in setByString() 172 mText = Editable.Factory.getInstance().newEditable(spannable); in setByString()
|
/aosp12/frameworks/base/core/java/android/view/textclassifier/ |
H A D | TextClassifier.java | 758 final Spannable spannable = new SpannableString(string); in addLinks() local 759 if (Linkify.addLinks(spannable, linkMask(entityType))) { in addLinks() 760 final URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in addLinks() 763 spannable.getSpanStart(urlSpan), in addLinks() 764 spannable.getSpanEnd(urlSpan), in addLinks()
|
/aosp12/packages/apps/Dialer/java/com/android/dialer/voicemail/listui/error/ |
H A D | VoicemailTosMessageCreator.java | 536 private SpannableString addLink(SpannableString spannable, String linkText, String linkUrl) { 538 return spannable; 541 int start = spannable.toString().indexOf(linkText); 544 spannable.setSpan(new URLSpan(linkUrl), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); 545 spannable.setSpan( 551 return spannable;
|
/aosp12/packages/services/Telecomm/src/com/android/server/telecom/ui/ |
H A D | IncomingCallNotifier.java | 299 Spannable spannable = new SpannableString(string); in getActionText() local 300 spannable.setSpan( in getActionText() 301 new ForegroundColorSpan(mContext.getColor(colorRes)), 0, spannable.length(), 0); in getActionText() 302 return spannable; in getActionText()
|
/aosp12/packages/apps/Dialer/java/com/android/contacts/common/util/ |
H A D | ContactDisplayUtils.java | 217 final Spannable spannable = new SpannableString(message); in getTelephoneTtsSpannable() local 222 spannable.setSpan( in getTelephoneTtsSpannable() 229 return spannable; in getTelephoneTtsSpannable()
|
/aosp12/packages/apps/Contacts/src/com/android/contacts/util/ |
H A D | ContactDisplayUtils.java | 176 final Spannable spannable = new SpannableString(message); in getTelephoneTtsSpannable() local 181 …spannable.setSpan(ttsSpan, start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); // this is… in getTelephoneTtsSpannable() 184 return spannable; in getTelephoneTtsSpannable()
|
/aosp12/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/incident/ |
H A D | ConfirmationActivity.java | 152 final SpannableString spannable = new SpannableString(text.toString()); in onCreate() local 156 spannable.setSpan(new BulletSpan(bulletIndent, bulletColor, bulletSize), in onCreate() 161 reasonTextView.setText(spannable); in onCreate()
|
/aosp12/frameworks/opt/chips/src/com/android/ex/chips/ |
H A D | RecipientEditTextView.java | 1429 Spannable spannable = getSpannable(); in sanitizeEnd() local 2316 final Spannable spannable = getSpannable(); in getSortedRecipients() local 2445 Spannable spannable = getSpannable(); in createMoreChip() local 2466 spannable.removeSpan(recipients[i]); in createMoreChip() 2540 Spannable spannable = getSpannable(); in selectChip() local 2543 spannable.removeSpan(currentChip); in selectChip() 2698 Spannable spannable = getSpannable(); in removeChip() local 2700 int spanEnd = spannable.getSpanEnd(chip); in removeChip() 2712 spannable.removeSpan(chip); in removeChip() 2798 spannable.removeSpan(chip); in afterTextChanged() [all …]
|
/aosp12/packages/apps/Dialer/java/com/android/incallui/contactgrid/ |
H A D | TopRow.java | 162 Spannable spannable = new SpannableString(label); in getColoredConnectionLabel() local 166 spannable.setSpan( in getColoredConnectionLabel() 171 return spannable; in getColoredConnectionLabel()
|
/aosp12/packages/apps/Dialer/java/com/android/dialer/spannable/ |
H A D | UrlSpanWithoutUnderline.java | 16 package com.android.dialer.spannable;
|