145 lines
3.1 KiB
Smali
145 lines
3.1 KiB
Smali
.class Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;
|
|
.super Ljava/lang/Object;
|
|
.source "TextDirectionHeuristicsCompat.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionAlgorithm;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/core/text/TextDirectionHeuristicsCompat;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x8
|
|
name = "AnyStrong"
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field static final INSTANCE_LTR:Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;
|
|
|
|
.field static final INSTANCE_RTL:Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;
|
|
|
|
|
|
# instance fields
|
|
.field private final mLookForRtl:Z
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {v0, v1}, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;-><init>(Z)V
|
|
|
|
sput-object v0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;->INSTANCE_RTL:Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;
|
|
|
|
new-instance v0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;-><init>(Z)V
|
|
|
|
sput-object v0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;->INSTANCE_LTR:Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Z)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-boolean p1, p0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;->mLookForRtl:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public checkRtl(Ljava/lang/CharSequence;II)I
|
|
.locals 4
|
|
|
|
add-int/2addr p3, p2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
const/4 v2, 0x1
|
|
|
|
if-ge p2, p3, :cond_2
|
|
|
|
invoke-interface {p1, p2}, Ljava/lang/CharSequence;->charAt(I)C
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v3}, Ljava/lang/Character;->getDirectionality(C)B
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v3}, Landroidx/core/text/TextDirectionHeuristicsCompat;->isRtlText(I)I
|
|
|
|
move-result v3
|
|
|
|
packed-switch v3, :pswitch_data_0
|
|
|
|
goto :goto_1
|
|
|
|
:pswitch_0
|
|
iget-boolean v1, p0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;->mLookForRtl:Z
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
return v2
|
|
|
|
:cond_0
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:pswitch_1
|
|
iget-boolean v1, p0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;->mLookForRtl:Z
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x1
|
|
|
|
:goto_1
|
|
add-int/lit8 p2, p2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-eqz v1, :cond_4
|
|
|
|
iget-boolean p1, p0, Landroidx/core/text/TextDirectionHeuristicsCompat$AnyStrong;->mLookForRtl:Z
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
return v2
|
|
|
|
:cond_3
|
|
return v0
|
|
|
|
:cond_4
|
|
const/4 p1, 0x2
|
|
|
|
return p1
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|