100 lines
2.3 KiB
Smali
100 lines
2.3 KiB
Smali
.class public final Landroidx/core/text/TextUtilsCompat;
|
|
.super Ljava/lang/Object;
|
|
.source "TextUtilsCompat.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final ARAB_SCRIPT_SUBTAG:Ljava/lang/String; = "Arab"
|
|
|
|
.field public static final HEBR_SCRIPT_SUBTAG:Ljava/lang/String; = "Hebr"
|
|
|
|
.field public static final ROOT:Ljava/util/Locale;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/util/Locale;
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-direct {v0, v1, v1}, Ljava/util/Locale;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sput-object v0, Landroidx/core/text/TextUtilsCompat;->ROOT:Ljava/util/Locale;
|
|
|
|
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 getLayoutDirectionFromFirstChar(Ljava/util/Locale;)I
|
|
.locals 3
|
|
.param p0 # Ljava/util/Locale;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0, p0}, Ljava/util/Locale;->getDisplayName(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Character;->getDirectionality(C)B
|
|
|
|
move-result p0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eq p0, v1, :cond_0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq p0, v2, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public static getLayoutDirectionFromLocale(Ljava/util/Locale;)I
|
|
.locals 0
|
|
.param p0 # Ljava/util/Locale;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-static {p0}, Landroid/text/TextUtils;->getLayoutDirectionFromLocale(Ljava/util/Locale;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static htmlEncode(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 0
|
|
.param p0 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
invoke-static {p0}, Landroid/text/TextUtils;->htmlEncode(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|