1301 lines
33 KiB
Smali
1301 lines
33 KiB
Smali
.class public final Landroidx/core/text/util/LinkifyCompat;
|
|
.super Ljava/lang/Object;
|
|
.source "LinkifyCompat.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/core/text/util/LinkifyCompat$LinkSpec;,
|
|
Landroidx/core/text/util/LinkifyCompat$LinkifyMask;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final COMPARATOR:Ljava/util/Comparator;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Comparator<",
|
|
"Landroidx/core/text/util/LinkifyCompat$LinkSpec;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final EMPTY_STRING:[Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
sput-object v0, Landroidx/core/text/util/LinkifyCompat;->EMPTY_STRING:[Ljava/lang/String;
|
|
|
|
new-instance v0, Landroidx/core/text/util/LinkifyCompat$1;
|
|
|
|
invoke-direct {v0}, Landroidx/core/text/util/LinkifyCompat$1;-><init>()V
|
|
|
|
sput-object v0, Landroidx/core/text/util/LinkifyCompat;->COMPARATOR:Ljava/util/Comparator;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static addLinkMovementMethod(Landroid/widget/TextView;)V
|
|
.locals 1
|
|
.param p0 # Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Landroid/widget/TextView;->getMovementMethod()Landroid/text/method/MovementMethod;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v0, v0, Landroid/text/method/LinkMovementMethod;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/TextView;->getLinksClickable()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {}, Landroid/text/method/LinkMovementMethod;->getInstance()Landroid/text/method/MovementMethod;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Landroid/widget/TextView;->setMovementMethod(Landroid/text/method/MovementMethod;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;)V
|
|
.locals 7
|
|
.param p0 # Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/regex/Pattern;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0, p1, p2}, Landroid/text/util/Linkify;->addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
invoke-static/range {v1 .. v6}, Landroidx/core/text/util/LinkifyCompat;->addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
.locals 7
|
|
.param p0 # Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/regex/Pattern;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/text/util/Linkify$MatchFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # Landroid/text/util/Linkify$TransformFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0, p1, p2, p3, p4}, Landroid/text/util/Linkify;->addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v4, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v5, p3
|
|
|
|
move-object v6, p4
|
|
|
|
invoke-static/range {v1 .. v6}, Landroidx/core/text/util/LinkifyCompat;->addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
.locals 7
|
|
.param p0 # Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/regex/Pattern;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # [Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # Landroid/text/util/Linkify$MatchFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p5 # Landroid/text/util/Linkify$TransformFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static/range {p0 .. p5}, Landroid/text/util/Linkify;->addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/text/SpannableString;->valueOf(Ljava/lang/CharSequence;)Landroid/text/SpannableString;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v1, v0
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v4, p3
|
|
|
|
move-object v5, p4
|
|
|
|
move-object v6, p5
|
|
|
|
invoke-static/range {v1 .. v6}, Landroidx/core/text/util/LinkifyCompat;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p0, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-static {p0}, Landroidx/core/text/util/LinkifyCompat;->addLinkMovementMethod(Landroid/widget/TextView;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/text/Spannable;I)Z
|
|
.locals 10
|
|
.param p0 # Landroid/text/Spannable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0, p1}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;I)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
invoke-interface {p0}, Landroid/text/Spannable;->length()I
|
|
|
|
move-result v1
|
|
|
|
const-class v2, Landroid/text/style/URLSpan;
|
|
|
|
invoke-interface {p0, v0, v1, v2}, Landroid/text/Spannable;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, [Landroid/text/style/URLSpan;
|
|
|
|
array-length v2, v1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
sub-int/2addr v2, v3
|
|
|
|
:goto_0
|
|
if-ltz v2, :cond_2
|
|
|
|
aget-object v4, v1, v2
|
|
|
|
invoke-interface {p0, v4}, Landroid/text/Spannable;->removeSpan(Ljava/lang/Object;)V
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
and-int/lit8 v1, p1, 0x4
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
const/4 v1, 0x4
|
|
|
|
invoke-static {p0, v1}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;I)Z
|
|
|
|
:cond_3
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
and-int/lit8 v2, p1, 0x1
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
sget-object v6, Landroidx/core/util/PatternsCompat;->AUTOLINK_WEB_URL:Ljava/util/regex/Pattern;
|
|
|
|
const-string v2, "http://"
|
|
|
|
const-string v4, "https://"
|
|
|
|
const-string v5, "rtsp://"
|
|
|
|
filled-new-array {v2, v4, v5}, [Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
sget-object v8, Landroid/text/util/Linkify;->sUrlMatchFilter:Landroid/text/util/Linkify$MatchFilter;
|
|
|
|
const/4 v9, 0x0
|
|
|
|
move-object v4, v1
|
|
|
|
move-object v5, p0
|
|
|
|
invoke-static/range {v4 .. v9}, Landroidx/core/text/util/LinkifyCompat;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
|
|
:cond_4
|
|
and-int/lit8 v2, p1, 0x2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
sget-object v6, Landroidx/core/util/PatternsCompat;->AUTOLINK_EMAIL_ADDRESS:Ljava/util/regex/Pattern;
|
|
|
|
const-string v2, "mailto:"
|
|
|
|
filled-new-array {v2}, [Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
move-object v4, v1
|
|
|
|
move-object v5, p0
|
|
|
|
invoke-static/range {v4 .. v9}, Landroidx/core/text/util/LinkifyCompat;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
|
|
:cond_5
|
|
and-int/lit8 p1, p1, 0x8
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
invoke-static {v1, p0}, Landroidx/core/text/util/LinkifyCompat;->gatherMapLinks(Ljava/util/ArrayList;Landroid/text/Spannable;)V
|
|
|
|
:cond_6
|
|
invoke-static {v1, p0}, Landroidx/core/text/util/LinkifyCompat;->pruneOverlaps(Ljava/util/ArrayList;Landroid/text/Spannable;)V
|
|
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_7
|
|
|
|
return v0
|
|
|
|
:cond_7
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_8
|
|
:goto_1
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/core/text/util/LinkifyCompat$LinkSpec;
|
|
|
|
iget-object v1, v0, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->frameworkAddedSpan:Landroid/text/style/URLSpan;
|
|
|
|
if-nez v1, :cond_8
|
|
|
|
iget-object v1, v0, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->url:Ljava/lang/String;
|
|
|
|
iget v2, v0, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->start:I
|
|
|
|
iget v0, v0, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->end:I
|
|
|
|
invoke-static {v1, v2, v0, p0}, Landroidx/core/text/util/LinkifyCompat;->applyLink(Ljava/lang/String;IILandroid/text/Spannable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_9
|
|
return v3
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;)Z
|
|
.locals 6
|
|
.param p0 # Landroid/text/Spannable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/regex/Pattern;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0, p1, p2}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-static/range {v0 .. v5}, Landroidx/core/text/util/LinkifyCompat;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
|
|
.locals 6
|
|
.param p0 # Landroid/text/Spannable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/regex/Pattern;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/text/util/Linkify$MatchFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # Landroid/text/util/Linkify$TransformFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0, p1, p2, p3, p4}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 v3, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v4, p3
|
|
|
|
move-object v5, p4
|
|
|
|
invoke-static/range {v0 .. v5}, Landroidx/core/text/util/LinkifyCompat;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
|
|
.locals 6
|
|
.param p0 # Landroid/text/Spannable;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/util/regex/Pattern;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # [Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # Landroid/text/util/Linkify$MatchFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p5 # Landroid/text/util/Linkify$TransformFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static/range {p0 .. p5}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const-string v0, ""
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
move-object p2, v0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
array-length v2, p3
|
|
|
|
if-ge v2, v1, :cond_3
|
|
|
|
:cond_2
|
|
sget-object p3, Landroidx/core/text/util/LinkifyCompat;->EMPTY_STRING:[Ljava/lang/String;
|
|
|
|
:cond_3
|
|
array-length v2, p3
|
|
|
|
add-int/2addr v2, v1
|
|
|
|
new-array v2, v2, [Ljava/lang/String;
|
|
|
|
sget-object v3, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
|
|
|
|
invoke-virtual {p2, v3}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object p2, v2, v3
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
array-length v4, p3
|
|
|
|
if-ge p2, v4, :cond_5
|
|
|
|
aget-object v4, p3, p2
|
|
|
|
add-int/lit8 p2, p2, 0x1
|
|
|
|
if-nez v4, :cond_4
|
|
|
|
move-object v4, v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
sget-object v5, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
:goto_1
|
|
aput-object v4, v2, p2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
invoke-virtual {p1, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_6
|
|
:goto_2
|
|
invoke-virtual {p1}, Ljava/util/regex/Matcher;->find()Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_8
|
|
|
|
invoke-virtual {p1}, Ljava/util/regex/Matcher;->start()I
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p1}, Ljava/util/regex/Matcher;->end()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz p4, :cond_7
|
|
|
|
invoke-interface {p4, p0, p3, v0}, Landroid/text/util/Linkify$MatchFilter;->acceptMatch(Ljava/lang/CharSequence;II)Z
|
|
|
|
move-result v4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_7
|
|
const/4 v4, 0x1
|
|
|
|
:goto_3
|
|
if-eqz v4, :cond_6
|
|
|
|
invoke-virtual {p1, v3}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2, v2, p1, p5}, Landroidx/core/text/util/LinkifyCompat;->makeUrl(Ljava/lang/String;[Ljava/lang/String;Ljava/util/regex/Matcher;Landroid/text/util/Linkify$TransformFilter;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2, p3, v0, p0}, Landroidx/core/text/util/LinkifyCompat;->applyLink(Ljava/lang/String;IILandroid/text/Spannable;)V
|
|
|
|
const/4 p2, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_8
|
|
return p2
|
|
.end method
|
|
|
|
.method public static addLinks(Landroid/widget/TextView;I)Z
|
|
.locals 4
|
|
.param p0 # Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-static {}, Landroidx/core/text/util/LinkifyCompat;->shouldAddLinksFallbackToFramework()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0, p1}, Landroid/text/util/Linkify;->addLinks(Landroid/widget/TextView;I)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v2, v1, Landroid/text/Spannable;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
check-cast v1, Landroid/text/Spannable;
|
|
|
|
invoke-static {v1, p1}, Landroidx/core/text/util/LinkifyCompat;->addLinks(Landroid/text/Spannable;I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-static {p0}, Landroidx/core/text/util/LinkifyCompat;->addLinkMovementMethod(Landroid/widget/TextView;)V
|
|
|
|
return v3
|
|
|
|
:cond_2
|
|
return v0
|
|
|
|
:cond_3
|
|
invoke-static {v1}, Landroid/text/SpannableString;->valueOf(Ljava/lang/CharSequence;)Landroid/text/SpannableString;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1, p1}, Landroidx/core/text/util/LinkifyCompat;->addLinks(Landroid/text/Spannable;I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-static {p0}, Landroidx/core/text/util/LinkifyCompat;->addLinkMovementMethod(Landroid/widget/TextView;)V
|
|
|
|
invoke-virtual {p0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return v3
|
|
|
|
:cond_4
|
|
return v0
|
|
.end method
|
|
|
|
.method public static applyLink(Ljava/lang/String;IILandroid/text/Spannable;)V
|
|
.locals 1
|
|
|
|
new-instance v0, Landroid/text/style/URLSpan;
|
|
|
|
invoke-direct {v0, p0}, Landroid/text/style/URLSpan;-><init>(Ljava/lang/String;)V
|
|
|
|
const/16 p0, 0x21
|
|
|
|
invoke-interface {p3, v0, p1, p2, p0}, Landroid/text/Spannable;->setSpan(Ljava/lang/Object;III)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static findAddress(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1c
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
invoke-static {p0}, Landroid/webkit/WebView;->findAddress(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
invoke-static {p0}, Landroidx/core/text/util/FindAddress;->findAddress(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/ArrayList<",
|
|
"Landroidx/core/text/util/LinkifyCompat$LinkSpec;",
|
|
">;",
|
|
"Landroid/text/Spannable;",
|
|
"Ljava/util/regex/Pattern;",
|
|
"[",
|
|
"Ljava/lang/String;",
|
|
"Landroid/text/util/Linkify$MatchFilter;",
|
|
"Landroid/text/util/Linkify$TransformFilter;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p2, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-virtual {p2}, Ljava/util/regex/Matcher;->find()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {p2}, Ljava/util/regex/Matcher;->start()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p2}, Ljava/util/regex/Matcher;->end()I
|
|
|
|
move-result v1
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
invoke-interface {p4, p1, v0, v1}, Landroid/text/util/Linkify$MatchFilter;->acceptMatch(Ljava/lang/CharSequence;II)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
:cond_1
|
|
new-instance v2, Landroidx/core/text/util/LinkifyCompat$LinkSpec;
|
|
|
|
invoke-direct {v2}, Landroidx/core/text/util/LinkifyCompat$LinkSpec;-><init>()V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {p2, v3}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v3, p3, p2, p5}, Landroidx/core/text/util/LinkifyCompat;->makeUrl(Ljava/lang/String;[Ljava/lang/String;Ljava/util/regex/Matcher;Landroid/text/util/Linkify$TransformFilter;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
iput-object v3, v2, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->url:Ljava/lang/String;
|
|
|
|
iput v0, v2, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->start:I
|
|
|
|
iput v1, v2, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->end:I
|
|
|
|
invoke-virtual {p0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public static gatherMapLinks(Ljava/util/ArrayList;Landroid/text/Spannable;)V
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/ArrayList<",
|
|
"Landroidx/core/text/util/LinkifyCompat$LinkSpec;",
|
|
">;",
|
|
"Landroid/text/Spannable;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:catch_0
|
|
:goto_0
|
|
:try_start_0
|
|
invoke-static {p1}, Landroidx/core/text/util/LinkifyCompat;->findAddress(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
|
|
|
|
move-result v2
|
|
|
|
if-gez v2, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
new-instance v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;
|
|
|
|
invoke-direct {v3}, Landroidx/core/text/util/LinkifyCompat$LinkSpec;-><init>()V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v4
|
|
|
|
add-int/2addr v4, v2
|
|
|
|
add-int/2addr v2, v0
|
|
|
|
iput v2, v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->start:I
|
|
|
|
add-int/2addr v0, v4
|
|
|
|
iput v0, v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->end:I
|
|
|
|
invoke-virtual {p1, v4}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/UnsupportedOperationException; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
:try_start_1
|
|
const-string v2, "UTF-8"
|
|
|
|
invoke-static {v1, v2}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
:try_end_1
|
|
.catch Ljava/io/UnsupportedEncodingException; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catch Ljava/lang/UnsupportedOperationException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
:try_start_2
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "geo:0,0?q="
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->url:Ljava/lang/String;
|
|
|
|
invoke-virtual {p0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
:try_end_2
|
|
.catch Ljava/lang/UnsupportedOperationException; {:try_start_2 .. :try_end_2} :catch_1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
:cond_1
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public static makeUrl(Ljava/lang/String;[Ljava/lang/String;Ljava/util/regex/Matcher;Landroid/text/util/Linkify$TransformFilter;)Ljava/lang/String;
|
|
.locals 7
|
|
.param p0 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # [Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/text/util/Linkify$TransformFilter;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
invoke-interface {p3, p2, p0}, Landroid/text/util/Linkify$TransformFilter;->transformUrl(Ljava/util/regex/Matcher;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:cond_0
|
|
const/4 p2, 0x0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:goto_0
|
|
array-length v0, p1
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-ge p3, v0, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v3, p1, p3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
aget-object v0, p1, p3
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v5
|
|
|
|
move-object v0, p0
|
|
|
|
invoke-virtual/range {v0 .. v5}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v3, p1, p3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
aget-object v0, p1, p3
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v5
|
|
|
|
move-object v0, p0
|
|
|
|
invoke-virtual/range {v0 .. v5}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
aget-object v1, p1, p3
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
aget-object p3, p1, p3
|
|
|
|
invoke-virtual {p3}, Ljava/lang/String;->length()I
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p0, p3}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
add-int/lit8 p3, p3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v6, 0x0
|
|
|
|
:cond_3
|
|
:goto_1
|
|
if-nez v6, :cond_4
|
|
|
|
array-length p3, p1
|
|
|
|
if-lez p3, :cond_4
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
aget-object p1, p1, p2
|
|
|
|
invoke-static {p3, p1, p0}, Lf/e/c/a/a;->w(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:cond_4
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static pruneOverlaps(Ljava/util/ArrayList;Landroid/text/Spannable;)V
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/ArrayList<",
|
|
"Landroidx/core/text/util/LinkifyCompat$LinkSpec;",
|
|
">;",
|
|
"Landroid/text/Spannable;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p1}, Landroid/text/Spannable;->length()I
|
|
|
|
move-result v0
|
|
|
|
const-class v1, Landroid/text/style/URLSpan;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-interface {p1, v2, v0, v1}, Landroid/text/Spannable;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [Landroid/text/style/URLSpan;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
array-length v3, v0
|
|
|
|
if-ge v1, v3, :cond_0
|
|
|
|
new-instance v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;
|
|
|
|
invoke-direct {v3}, Landroidx/core/text/util/LinkifyCompat$LinkSpec;-><init>()V
|
|
|
|
aget-object v4, v0, v1
|
|
|
|
iput-object v4, v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->frameworkAddedSpan:Landroid/text/style/URLSpan;
|
|
|
|
aget-object v4, v0, v1
|
|
|
|
invoke-interface {p1, v4}, Landroid/text/Spannable;->getSpanStart(Ljava/lang/Object;)I
|
|
|
|
move-result v4
|
|
|
|
iput v4, v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->start:I
|
|
|
|
aget-object v4, v0, v1
|
|
|
|
invoke-interface {p1, v4}, Landroid/text/Spannable;->getSpanEnd(Ljava/lang/Object;)I
|
|
|
|
move-result v4
|
|
|
|
iput v4, v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->end:I
|
|
|
|
invoke-virtual {p0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v0, Landroidx/core/text/util/LinkifyCompat;->COMPARATOR:Ljava/util/Comparator;
|
|
|
|
invoke-static {p0, v0}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
|
|
|
|
invoke-virtual {p0}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
:goto_1
|
|
add-int/lit8 v1, v0, -0x1
|
|
|
|
if-ge v2, v1, :cond_6
|
|
|
|
invoke-virtual {p0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroidx/core/text/util/LinkifyCompat$LinkSpec;
|
|
|
|
add-int/lit8 v3, v2, 0x1
|
|
|
|
invoke-virtual {p0, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Landroidx/core/text/util/LinkifyCompat$LinkSpec;
|
|
|
|
iget v5, v1, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->start:I
|
|
|
|
iget v6, v4, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->start:I
|
|
|
|
if-gt v5, v6, :cond_5
|
|
|
|
iget v1, v1, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->end:I
|
|
|
|
if-le v1, v6, :cond_5
|
|
|
|
iget v4, v4, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->end:I
|
|
|
|
const/4 v7, -0x1
|
|
|
|
if-gt v4, v1, :cond_1
|
|
|
|
:goto_2
|
|
move v1, v3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_1
|
|
sub-int v8, v1, v5
|
|
|
|
sub-int v9, v4, v6
|
|
|
|
if-le v8, v9, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
sub-int/2addr v1, v5
|
|
|
|
sub-int/2addr v4, v6
|
|
|
|
if-ge v1, v4, :cond_3
|
|
|
|
move v1, v2
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 v1, -0x1
|
|
|
|
:goto_3
|
|
if-eq v1, v7, :cond_5
|
|
|
|
invoke-virtual {p0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;
|
|
|
|
iget-object v3, v3, Landroidx/core/text/util/LinkifyCompat$LinkSpec;->frameworkAddedSpan:Landroid/text/style/URLSpan;
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-interface {p1, v3}, Landroid/text/Spannable;->removeSpan(Ljava/lang/Object;)V
|
|
|
|
:cond_4
|
|
invoke-virtual {p0, v1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
move v2, v3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
return-void
|
|
.end method
|
|
|
|
.method public static shouldAddLinksFallbackToFramework()Z
|
|
.locals 2
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1c
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|