129 lines
3.3 KiB
Smali
129 lines
3.3 KiB
Smali
.class abstract Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;
|
|
.super Ljava/lang/Object;
|
|
.source "TextDirectionHeuristicsCompat.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/core/text/TextDirectionHeuristicCompat;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/core/text/TextDirectionHeuristicsCompat;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x408
|
|
name = "TextDirectionHeuristicImpl"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final mAlgorithm:Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionAlgorithm;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionAlgorithm;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;->mAlgorithm:Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionAlgorithm;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private doCheck(Ljava/lang/CharSequence;II)Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;->mAlgorithm:Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionAlgorithm;
|
|
|
|
invoke-interface {v0, p1, p2, p3}, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionAlgorithm;->checkRtl(Ljava/lang/CharSequence;II)I
|
|
|
|
move-result p1
|
|
|
|
packed-switch p1, :pswitch_data_0
|
|
|
|
invoke-virtual {p0}, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;->defaultIsRtl()Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:pswitch_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:pswitch_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected abstract defaultIsRtl()Z
|
|
.end method
|
|
|
|
.method public isRtl(Ljava/lang/CharSequence;II)Z
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-ltz p2, :cond_1
|
|
|
|
if-ltz p3, :cond_1
|
|
|
|
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
sub-int/2addr v0, p3
|
|
|
|
if-lt v0, p2, :cond_1
|
|
|
|
iget-object v0, p0, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;->mAlgorithm:Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionAlgorithm;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;->defaultIsRtl()Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2, p3}, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;->doCheck(Ljava/lang/CharSequence;II)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public isRtl([CII)Z
|
|
.locals 0
|
|
|
|
invoke-static {p1}, Ljava/nio/CharBuffer;->wrap([C)Ljava/nio/CharBuffer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Landroidx/core/text/TextDirectionHeuristicsCompat$TextDirectionHeuristicImpl;->isRtl(Ljava/lang/CharSequence;II)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|