Home
last modified time | relevance | path

Searched refs:TextLinks (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/support/textclassifier/src/androidTest/java/androidx/textclassifier/
DTextLinksTest.java55 private static class CustomTextLinkSpan extends TextLinks.TextLinkSpan {
56 CustomTextLinkSpan(@Nullable TextLinks.TextLink textLink) { in CustomTextLinkSpan()
61 private static class CustomSpanFactory implements TextLinks.SpanFactory {
63 public TextLinks.TextLinkSpan createSpan(TextLinks.TextLink textLink) { in createSpan()
97 final TextLinks reference = new TextLinks.Builder(fullText) in testParcel()
106 final TextLinks result = TextLinks.CREATOR.createFromParcel(parcel); in testParcel()
107 final List<TextLinks.TextLink> resultList = new ArrayList<>(result.getLinks()); in testParcel()
134 TextLinks.Options reference = new TextLinks.Options() in testParcelOptions()
137 .setApplyStrategy(TextLinks.APPLY_STRATEGY_REPLACE) in testParcelOptions()
144 TextLinks.Options result = TextLinks.Options.CREATOR.createFromParcel(parcel); in testParcelOptions()
[all …]
/frameworks/base/core/java/android/view/textclassifier/
DTextLinksParams.java25 import android.view.textclassifier.TextLinks.TextLink;
26 import android.view.textclassifier.TextLinks.TextLinkSpan;
46 @TextLinks.ApplyStrategy
52 @TextLinks.ApplyStrategy int applyStrategy, in TextLinksParams()
104 @TextLinks.Status
105 public int apply(@NonNull Spannable text, @NonNull TextLinks textLinks) { in apply()
111 return TextLinks.STATUS_DIFFERENT_TEXT; in apply()
114 return TextLinks.STATUS_NO_LINKS_FOUND; in apply()
124 if (mApplyStrategy == TextLinks.APPLY_STRATEGY_REPLACE) { in apply()
140 return TextLinks.STATUS_NO_LINKS_APPLIED; in apply()
[all …]
DTextClassifier.java327 default TextLinks generateLinks(@NonNull TextLinks.Request request) { in generateLinks()
330 return new TextLinks.Builder(request.getText().toString()).build(); in generateLinks()
335 default TextLinks generateLinks( in generateLinks()
336 @NonNull CharSequence text, @Nullable TextLinks.Options options) { in generateLinks()
338 return generateLinks(new TextLinks.Request.Builder(text).build()); in generateLinks()
342 return generateLinks(new TextLinks.Request.Builder(text) in generateLinks()
559 public static TextLinks generateLegacyLinks(@NonNull TextLinks.Request request) { in generateLegacyLinks()
561 final TextLinks.Builder links = new TextLinks.Builder(string); in generateLegacyLinks()
579 TextLinks.Builder links, String string, @EntityType String entityType) { in addLinks()
DTextLinks.java55 public final class TextLinks implements Parcelable { class
98 private TextLinks(String fullText, ArrayList<TextLink> links) { in TextLinks() method in TextLinks
165 public static final Parcelable.Creator<TextLinks> CREATOR =
166 new Parcelable.Creator<TextLinks>() {
168 public TextLinks createFromParcel(Parcel in) {
169 return new TextLinks(in);
173 public TextLinks[] newArray(int size) {
174 return new TextLinks[size];
178 private TextLinks(Parcel in) { in TextLinks() method in TextLinks
632 public TextLinks build() { in build()
[all …]
DTextLinks.aidl19 parcelable TextLinks;
20 parcelable TextLinks.Request;
DSystemTextClassifier.java110 public TextLinks generateLinks(@NonNull TextLinks.Request request) { in generateLinks()
122 final TextLinks links = callback.mReceiver.get(); in generateLinks()
214 final ResponseReceiver<TextLinks> mReceiver = new ResponseReceiver<>();
217 public void onSuccess(TextLinks links) { in onSuccess()
DGenerateLinksLogger.java68 public void logGenerateLinks(CharSequence text, TextLinks links, String callingPackageName, in logGenerateLinks()
80 for (TextLinks.TextLink link : links.getLinks()) { in logGenerateLinks()
156 void countLink(TextLinks.TextLink link) { in countLink()
DTextClassificationSession.java68 public TextLinks generateLinks(TextLinks.Request request) { in generateLinks()
DTextClassifierImpl.java211 public TextLinks generateLinks(@NonNull TextLinks.Request request) { in generateLinks()
221 final TextLinks.Builder builder = new TextLinks.Builder(textString); in generateLinks()
252 final TextLinks links = builder.build(); in generateLinks()
/frameworks/support/textclassifier/api_legacy/
Dcurrent.txt57 public final class TextLinks implements android.os.Parcelable {
58 …method public int apply(android.text.Spannable, int, androidx.textclassifier.TextLinks.SpanFactory…
60 method public java.util.Collection<androidx.textclassifier.TextLinks.TextLink> getLinks();
64 …field public static final android.os.Parcelable.Creator<androidx.textclassifier.TextLinks> CREATOR;
71 public static final class TextLinks.Builder {
72 ctor public TextLinks.Builder(java.lang.String);
73 …method public androidx.textclassifier.TextLinks.Builder addLink(int, int, java.util.Map<java.lang.…
74 method public androidx.textclassifier.TextLinks build();
75 method public androidx.textclassifier.TextLinks.Builder clearTextLinks();
78 public static final class TextLinks.Options implements android.os.Parcelable {
[all …]
D28.0.0-alpha1.txt57 public final class TextLinks implements android.os.Parcelable {
58 …method public int apply(android.text.Spannable, int, androidx.view.textclassifier.TextLinks.SpanFa…
60 method public java.util.Collection<androidx.view.textclassifier.TextLinks.TextLink> getLinks();
64 …field public static final android.os.Parcelable.Creator<androidx.view.textclassifier.TextLinks> CR…
71 public static final class TextLinks.Builder {
72 ctor public TextLinks.Builder(java.lang.String);
73 …method public androidx.view.textclassifier.TextLinks.Builder addLink(int, int, java.util.Map<java.…
74 method public androidx.view.textclassifier.TextLinks build();
75 method public androidx.view.textclassifier.TextLinks.Builder clearTextLinks();
78 public static final class TextLinks.Options implements android.os.Parcelable {
[all …]
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextLinksTest.java59 final TextLinks reference = new TextLinks.Builder(fullText) in testParcel()
68 final TextLinks result = TextLinks.CREATOR.createFromParcel(parcel); in testParcel()
69 final List<TextLinks.TextLink> resultList = new ArrayList<>(result.getLinks()); in testParcel()
94 final TextLinks.Request reference = new TextLinks.Request.Builder("text") in testParcelOptions()
103 final TextLinks.Request result = TextLinks.Request.CREATOR.createFromParcel(parcel); in testParcelOptions()
DTextClassificationManagerTest.java239 TextLinks.Request request = new TextLinks.Request.Builder(text).build(); in testGenerateLinks_phone()
251 TextLinks.Request request = new TextLinks.Request.Builder(text) in testGenerateLinks_exclude()
264 TextLinks.Request request = new TextLinks.Request.Builder(text) in testGenerateLinks_explicit_address()
280 TextLinks.Request request = new TextLinks.Request.Builder(text) in testGenerateLinks_exclude_override()
293 TextLinks.Request request = new TextLinks.Request.Builder(new String(manySpaces)).build(); in testGenerateLinks_maxLength()
294 TextLinks links = mClassifier.generateLinks(request); in testGenerateLinks_maxLength()
305 TextLinks.Request request = new TextLinks.Request.Builder(new String(manySpaces)).build(); in testGenerateLinks_tooLong()
401 private static Matcher<TextLinks> isTextLinksContaining(
403 return new BaseMatcher<TextLinks>() {
414 if (o instanceof TextLinks) {
[all …]
/frameworks/support/textclassifier/src/main/java/androidx/textclassifier/
DTextLinks.java46 public final class TextLinks implements Parcelable { class
83 private TextLinks(String fullText, ArrayList<TextLink> links) { in TextLinks() method in TextLinks
161 public static final Parcelable.Creator<TextLinks> CREATOR =
162 new Parcelable.Creator<TextLinks>() {
164 public TextLinks createFromParcel(Parcel in) {
165 return new TextLinks(in);
169 public TextLinks[] newArray(int size) {
170 return new TextLinks[size];
174 private TextLinks(Parcel in) { in TextLinks() method in TextLinks
520 public TextLinks build() { in build()
[all …]
/frameworks/base/core/java/android/service/textclassifier/
DTextClassifierService.java42 import android.view.textclassifier.TextLinks;
162 TextLinks.Request request, ITextLinksCallback callback)
167 request.getText(), TextLinks.Options.from(sessionId, request),
169 new Callback<TextLinks>() {
171 public void onSuccess(TextLinks result) {
306 @NonNull TextLinks.Request request, in onGenerateLinks()
308 @NonNull Callback<TextLinks> callback); in onGenerateLinks()
314 @Nullable TextLinks.Options options, in onGenerateLinks()
316 @NonNull Callback<TextLinks> callback) { in onGenerateLinks()
318 final TextLinks.Request request = options.getRequest() != null in onGenerateLinks()
[all …]
DITextLinksCallback.aidl19 import android.view.textclassifier.TextLinks;
26 void onSuccess(in TextLinks links); in onSuccess()
DITextClassifierService.aidl26 import android.view.textclassifier.TextLinks;
48 in TextLinks.Request request, in onGenerateLinks()
/frameworks/base/core/java/android/text/util/
DLinkify.java34 import android.view.textclassifier.TextLinks;
35 import android.view.textclassifier.TextLinks.TextLinkSpan;
693 final TextLinks.Request request = new TextLinks.Request.Builder(truncatedText) in addLinksAsync()
697 final Supplier<TextLinks> supplier = () -> classifier.generateLinks(request); in addLinksAsync()
698 final Consumer<TextLinks> consumer = links -> { in addLinksAsync()
701 callback.accept(TextLinks.STATUS_NO_LINKS_FOUND); in addLinksAsync()
713 final @TextLinks.Status int result = params.apply(text, links); in addLinksAsync()
714 if (result == TextLinks.STATUS_LINKS_APPLIED) { in addLinksAsync()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/logging/
DGenerateLinksLoggerTest.java31 import android.view.textclassifier.TextLinks;
66 TextLinks links = new TextLinks.Builder(testText) in testLogGenerateLinks()
/frameworks/base/core/tests/coretests/src/android/widget/
DTextViewActivityTest.java84 import android.view.textclassifier.TextLinks;
321 TextLinks.TextLink textLink = addLinkifiedTextToTextView(R.id.textview); in testToolbarAppearsAfterLinkClicked()
331 final TextLinks.TextLink textLink = addLinkifiedTextToTextView(R.id.nonselectable_textview); in testToolbarAppearsAfterLinkClickedNonselectable()
357 final TextLinks.TextLink textLink = addLinkifiedTextToTextView(R.id.nonselectable_textview); in testSelectionRemovedWhenNonselectableTextLosesFocus()
376 TextLinks.TextLink textLink = addLinkifiedTextToTextView(R.id.nonselectable_textview); in testSelectionRemovedFromNonselectableTextWhenWindowLosesFocus()
395 private TextLinks.TextLink addLinkifiedTextToTextView(int id) throws Throwable { in addLinkifiedTextToTextView()
402 TextLinks.Request request = new TextLinks.Request.Builder(content).build(); in addLinkifiedTextToTextView()
403 TextLinks links = textClassifier.generateLinks(request); in addLinkifiedTextToTextView()
405 .setApplyStrategy(TextLinks.APPLY_STRATEGY_REPLACE) in addLinkifiedTextToTextView()
/frameworks/base/services/core/java/com/android/server/textclassifier/
DTextClassificationManagerService.java42 import android.view.textclassifier.TextLinks;
170 TextLinks.Request request, ITextLinksCallback callback) in onGenerateLinks()
/frameworks/base/core/java/android/text/method/
DLinkMovementMethod.java28 import android.view.textclassifier.TextLinks.TextLinkSpan;
/frameworks/base/core/tests/coretests/src/android/text/util/
DLinkifyTest.java38 import android.view.textclassifier.TextLinks.TextLinkSpan;
/frameworks/base/config/
Dhiddenapi-public-dex.txt40335 …textclassifier/TextClassificationSessionId;Landroid/view/textclassifier/TextLinks$Request;Landroid…
50113 …er;->generateLinks(Landroid/view/textclassifier/TextLinks$Request;)Landroid/view/textclassifier/Te…
50140 Landroid/view/textclassifier/TextLinks$Builder;
50141 Landroid/view/textclassifier/TextLinks$Builder;-><init>(Ljava/lang/String;)V
50142 Landroid/view/textclassifier/TextLinks$Builder;->addLink(IILjava/util/Map;)Landroid/view/textclassi…
50143 Landroid/view/textclassifier/TextLinks$Builder;->build()Landroid/view/textclassifier/TextLinks;
50144 Landroid/view/textclassifier/TextLinks$Builder;->clearTextLinks()Landroid/view/textclassifier/TextL…
50145 Landroid/view/textclassifier/TextLinks$Request$Builder;
50146 Landroid/view/textclassifier/TextLinks$Request$Builder;-><init>(Ljava/lang/CharSequence;)V
50147 Landroid/view/textclassifier/TextLinks$Request$Builder;->build()Landroid/view/textclassifier/TextLi…
[all …]
Dboot-image-profile.txt7093 HPLandroid/view/textclassifier/TextLinks$TextLink$1;-><init>()V
7094 HPLandroid/view/textclassifier/TextLinks$TextLink;-><init>(IILjava/util/Map;Landroid/text/style/URL…
7095 HPLandroid/view/textclassifier/TextLinks$TextLink;->writeToParcel(Landroid/os/Parcel;I)V
29809 …textclassifier/TextClassificationSessionId;Landroid/view/textclassifier/TextLinks$Request;Landroid…
29812 …/textclassifier/ITextLinksCallback$Stub$Proxy;->onSuccess(Landroid/view/textclassifier/TextLinks;)V
29814 …oid/service/textclassifier/ITextLinksCallback;->onSuccess(Landroid/view/textclassifier/TextLinks;)V
29815 …vice/textclassifier/TextClassifierService$1$3;->onSuccess(Landroid/view/textclassifier/TextLinks;)V
29817 …textclassifier/TextClassificationSessionId;Landroid/view/textclassifier/TextLinks$Request;Landroid…
29825 …textclassifier/TextClassificationSessionId;Landroid/view/textclassifier/TextLinks$Request;Landroid…
29826 …;->onGenerateLinks(Ljava/lang/CharSequence;Landroid/view/textclassifier/TextLinks$Options;Landroid…
[all …]

12