/packages/apps/Email/tests/src/com/android/emailcommon/utility/ |
D | TextUtilitiesTests.java | 205 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); in brokentestHighlightSingleTermText() local 206 assertEquals(1, spans.length); in brokentestHighlightSingleTermText() 207 BackgroundColorSpan span = spans[0]; in brokentestHighlightSingleTermText() 216 spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); in brokentestHighlightSingleTermText() 217 assertEquals(2, spans.length); in brokentestHighlightSingleTermText() 218 span = spans[0]; in brokentestHighlightSingleTermText() 221 span = spans[1]; in brokentestHighlightSingleTermText() 232 BackgroundColorSpan[] spans = ssb.getSpans(0, ssb.length(), BackgroundColorSpan.class); in brokentestHighlightTwoTermText() local 233 assertEquals(2, spans.length); in brokentestHighlightTwoTermText() 234 BackgroundColorSpan span = spans[0]; in brokentestHighlightTwoTermText() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | TextRange.java | 75 final SuggestionSpan[] spans = text.getSpans(mWordAtCursorStartIndex - 1, in getSuggestionSpansAtWord() local 79 for (; readIndex < spans.length; ++readIndex) { in getSuggestionSpansAtWord() 80 final SuggestionSpan span = spans[readIndex]; in getSuggestionSpansAtWord() 88 for (int i = readIndex + 1; i < spans.length; ++i) { in getSuggestionSpansAtWord() 89 if (span.equals(spans[i])) { in getSuggestionSpansAtWord() 92 spanStart = Math.min(spanStart, text.getSpanStart(spans[i])); in getSuggestionSpansAtWord() 93 spanEnd = Math.max(spanEnd, text.getSpanEnd(spans[i])); in getSuggestionSpansAtWord() 95 spans[i] = null; in getSuggestionSpansAtWord() 102 spans[writeIndex++] = spans[readIndex]; in getSuggestionSpansAtWord() 105 return writeIndex == readIndex ? spans : Arrays.copyOfRange(spans, 0, writeIndex); in getSuggestionSpansAtWord()
|
D | SpannableStringUtils.java | 51 Object[] spans = source.getSpans(start, end, SuggestionSpan.class); in copyNonParagraphSuggestionSpansFrom() local 53 for (int i = 0; i < spans.length; i++) { in copyNonParagraphSuggestionSpansFrom() 54 int fl = source.getSpanFlags(spans[i]); in copyNonParagraphSuggestionSpansFrom() 62 int st = source.getSpanStart(spans[i]); in copyNonParagraphSuggestionSpansFrom() 63 int en = source.getSpanEnd(spans[i]); in copyNonParagraphSuggestionSpansFrom() 70 dest.setSpan(spans[i], st - start + destoff, en - start + destoff, in copyNonParagraphSuggestionSpansFrom() 131 final URLSpan[] spans = spanned.getSpans(startIndex - 1, endIndex + 1, URLSpan.class); in hasUrlSpans() local 132 return null != spans && spans.length > 0; in hasUrlSpans()
|
D | CursorAnchorInfoUtils.java | 150 final Object[] spans = spannable.getSpans(0, text.length(), Object.class); in extractFromTextViewInternal() local 151 for (Object span : spans) { in extractFromTextViewInternal()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
D | AccessibilityContextMenuMaker.java | 92 ClickableSpan[] spans = getSpans(spanned); in populateMenuContent() local 94 if (spanned == null || spans.length == 0) { in populateMenuContent() 98 for (ClickableSpan span : spans) { in populateMenuContent() 126 ClickableSpan[] spans = spanned.getSpans(0, spanned.length(), ClickableSpan.class); in getSpans() local 127 return spans.length == 0 ? new ClickableSpan[0] : spans; in getSpans()
|
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
D | ConversationItemView.java | 1052 CharacterStyle[] spans = toHeader.getSpans(0, toHeader.length(), in elideParticipants() local 1056 if (spans.length > 0) { in elideParticipants() 1057 spans[0].updateDrawState(sPaint); in elideParticipants() 1066 CharacterStyle[] spans = messageInfoString.getSpans(0, messageInfoString.length(), in elideParticipants() local 1070 if (spans.length > 0) { in elideParticipants() 1071 spans[0].updateDrawState(sPaint); in elideParticipants() 1088 CharacterStyle[] spans = sender.getSpans(0, sender.length(), CharacterStyle.class); in elideParticipants() local 1090 if (spans.length > 0) { in elideParticipants() 1091 spans[0].updateDrawState(sPaint); in elideParticipants() 1096 sender = copyStyles(spans, sElidedPaddingToken + sender + sElidedPaddingToken); in elideParticipants() [all …]
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
D | LevenshteinFormatterTest.java | 151 private void verifyFormatSuggestion(String query, String suggestion, SpanFormat... spans) { in verifyFormatSuggestion() argument 153 for (SpanFormat span : spans) { in verifyFormatSuggestion() 353 MockStyleSpan[] spans = spanned.getSpans(mStart, mEnd, MockStyleSpan.class); in verify() local 354 assertEquals("Wrong number of spans in '" + spannedText + "'", 1, spans.length); in verify() 356 mStyle, spans[0].getId()); in verify()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
D | SpannableStringUtilsTests.java | 67 Object[] spans = result.getSpans(0, result.length(), SuggestionSpan.class); in testConcatWithSuggestionSpansOnly() local 68 for (int i = 0; i < spans.length; i++) { in testConcatWithSuggestionSpansOnly() 69 final int flags = result.getSpanFlags(spans[i]); in testConcatWithSuggestionSpansOnly() 72 assertTrue("Should be a SuggestionSpan", spans[i] instanceof SuggestionSpan); in testConcatWithSuggestionSpansOnly()
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
D | EllipsizedMultilineTextView.java | 102 final Object[] spans = s.getSpans(0, s.length(), Object.class); in setText() local 104 for (int i = 0; i < spans.length; i++) { in setText() 105 final Object span = spans[i]; in setText()
|
/packages/apps/UnifiedEmail/src/com/android/mail/widget/ |
D | WidgetService.java | 482 CharacterStyle[] spans = sender.getSpans(0, sender.length(), CharacterStyle.class); 485 sender = copyStyles(spans, mElidedPaddingToken + sender + mElidedPaddingToken); 490 sender = copyStyles(spans, mSendersSplitToken + sender); 500 private static SpannableString copyStyles(CharacterStyle[] spans, CharSequence newText) { in copyStyles() argument 502 if (spans != null && spans.length > 0) { in copyStyles() 503 s.setSpan(spans[0], 0, s.length(), 0); in copyStyles()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | InputTestsBase.java | 96 final CharacterStyle[] spans = in SpanGetter() local 98 if (0 == spans.length) { in SpanGetter() 102 } else if (1 == spans.length) { in SpanGetter() 103 mSpan = spans[0]; in SpanGetter() 107 throw new RuntimeException("Expected one span, found " + spans.length); in SpanGetter()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/compat/ |
D | LocaleSpanCompatUtilsTests.java | 65 final Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in assertSpanEquals() local 66 assertEquals(expectedSpan, spans[index]); in assertSpanEquals() 70 final Object[] spans = spanned.getSpans(0, spanned.length(), Object.class); in assertSpanCount() local 71 assertEquals(expectedCount, spans.length); in assertSpanCount()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | SuggestionFormatter.java | 52 private void setSpans(Spannable text, int start, int end, Object[] spans) { in setSpans() argument 53 for (Object span : spans) { in setSpans()
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | GridSizeMigrationTask.java | 726 Point spans = null; 728 spans = pInfo.getMinSpans(); 730 if (spans != null) { 731 entry.minSpanX = spans.x > 0 ? spans.x : entry.spanX; 732 entry.minSpanY = spans.y > 0 ? spans.y : entry.spanY;
|
/packages/apps/TV/src/com/android/tv/dvr/ui/ |
D | DvrUiHelper.java | 702 Object[] spans = builder.getSpans(0, builder.length(), Object.class); in getStyledTitleWithEpisodeNumber() local 703 if (spans.length > 0) { in getStyledTitleWithEpisodeNumber() 707 builder.getSpanStart(spans[0]), in getStyledTitleWithEpisodeNumber() 708 builder.getSpanEnd(spans[0]), in getStyledTitleWithEpisodeNumber() 711 builder.removeSpan(spans[0]); in getStyledTitleWithEpisodeNumber()
|
/packages/apps/Settings/src/com/android/settings/utils/ |
D | AnnotationSpan.java | 58 Annotation[] spans = msg.getSpans(0, msg.length(), Annotation.class); in linkify() local 60 for (Annotation annotation : spans) { in linkify()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/utils/ |
D | AnnotationSpan.java | 58 Annotation[] spans = msg.getSpans(0, msg.length(), Annotation.class); in linkify() local 60 for (Annotation annotation : spans) { in linkify()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterysaver/ |
D | BatterySaverSettings.java | 159 Annotation[] spans = msg.getSpans(0, msg.length(), Annotation.class); in linkify() local 160 for (Annotation annotation : spans) { in linkify()
|
/packages/apps/Contacts/src/com/android/contacts/editor/ |
D | TextFieldsEditorView.java | 369 final TtsSpan[] spans = spannable.getSpans(0, s.length(), TtsSpan.class); in setValues() 370 for (int i = 0; i < spans.length; i++) { in setValues() 371 spannable.removeSpan(spans[i]); in setValues()
|
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
D | NotificationUtils.java | 1395 CharacterStyle[] spans = sender.getSpans(0, sender.length(), CharacterStyle.class); in ellipsizeStyledSenders() local 1398 sender = copyStyles(spans, sElidedPaddingToken + sender + sElidedPaddingToken); in ellipsizeStyledSenders() 1403 sender = copyStyles(spans, sSendersSplitToken + sender); in ellipsizeStyledSenders() 1412 private static SpannableString copyStyles(CharacterStyle[] spans, CharSequence newText) { in copyStyles() argument 1414 if (spans != null && spans.length > 0) { in copyStyles() 1415 s.setSpan(spans[0], 0, s.length(), 0); in copyStyles()
|
/packages/apps/Dialer/java/com/android/voicemail/impl/protocol/ |
D | Vvm3Subscriber.java | 352 URLSpan[] spans = doc.getSpans(0, doc.length(), URLSpan.class); in findSubscribeLink() local 355 for (URLSpan span : spans) { in findSubscribeLink()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | RichInputConnection.java | 315 final CharacterStyle[] spans = mTempObjectForCommitText.getSpans( in commitText() local 317 for (final CharacterStyle span : spans) { in commitText()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | MessageNotificationState.java | 1136 final URLSpan[] spans = text.getSpans(0, text.length(), URLSpan.class); in stripUrls() local 1137 for (final URLSpan span : spans) { in stripUrls()
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversation/ |
D | ConversationMessageView.java | 519 final URLSpan[] spans = ((Spanned) messageTextWithSpans).getSpans(0, in updateMessageAttachments() local 521 for (URLSpan span : spans) { in updateMessageAttachments()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/inputlogic/ |
D | InputLogic.java | 1673 final Object[] spans = committedWordWithSuggestionSpans.getSpans(0, in revertCommit() local 1680 for (final Object span : spans) { in revertCommit()
|