granularity level: instruction
.class public final Landroidx/core/widget/TextViewCompat;
.super Ljava/lang/Object;
.source "TextViewCompat.java"
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/core/widget/TextViewCompat$OreoCallback;,
Landroidx/core/widget/TextViewCompat$AutoSizeTextType;
}
.end annotation
.field public static final AUTO_SIZE_TEXT_TYPE_NONE:I = 0x0
.field public static final AUTO_SIZE_TEXT_TYPE_UNIFORM:I = 0x1
.field private static final LINES:I = 0x1
.field private static final LOG_TAG:Ljava/lang/String; = "TextViewCompat"
.field private static sMaxModeField:Ljava/lang/reflect/Field;
.field private static sMaxModeFieldFetched:Z
.field private static sMaximumField:Ljava/lang/reflect/Field;
.field private static sMaximumFieldFetched:Z
.field private static sMinModeField:Ljava/lang/reflect/Field;
.field private static sMinModeFieldFetched:Z
.field private static sMinimumField:Ljava/lang/reflect/Field;
.field private static sMinimumFieldFetched:Z
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getAutoSizeMaxTextSize(Landroid/widget/TextView;)I
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getAutoSizeMaxTextSize()I
move-result p0
return p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0}, Landroidx/core/widget/AutoSizeableTextView;->getAutoSizeMaxTextSize()I
move-result p0
return p0
:cond_1
const/4 p0, -0x1
return p0
.end method
.method public static getAutoSizeMinTextSize(Landroid/widget/TextView;)I
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getAutoSizeMinTextSize()I
move-result p0
return p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0}, Landroidx/core/widget/AutoSizeableTextView;->getAutoSizeMinTextSize()I
move-result p0
return p0
:cond_1
const/4 p0, -0x1
return p0
.end method
.method public static getAutoSizeStepGranularity(Landroid/widget/TextView;)I
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getAutoSizeStepGranularity()I
move-result p0
return p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0}, Landroidx/core/widget/AutoSizeableTextView;->getAutoSizeStepGranularity()I
move-result p0
return p0
:cond_1
const/4 p0, -0x1
return p0
.end method
.method public static getAutoSizeTextAvailableSizes(Landroid/widget/TextView;)[I
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getAutoSizeTextAvailableSizes()[I
move-result-object p0
return-object p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0}, Landroidx/core/widget/AutoSizeableTextView;->getAutoSizeTextAvailableSizes()[I
move-result-object p0
return-object p0
:cond_1
const/4 p0, 0x0
new-array p0, p0, [I
return-object p0
.end method
.method public static getAutoSizeTextType(Landroid/widget/TextView;)I
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getAutoSizeTextType()I
move-result p0
return p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0}, Landroidx/core/widget/AutoSizeableTextView;->getAutoSizeTextType()I
move-result p0
return p0
:cond_1
const/4 p0, 0x0
return p0
.end method
.method public static getCompoundDrawableTintList(Landroid/widget/TextView;)Landroid/content/res/ColorStateList;
.locals 2
invoke-static {p0}, Landroidx/core/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getCompoundDrawableTintList()Landroid/content/res/ColorStateList;
move-result-object p0
return-object p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/TintableCompoundDrawablesView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/TintableCompoundDrawablesView;
invoke-interface {p0}, Landroidx/core/widget/TintableCompoundDrawablesView;->getSupportCompoundDrawablesTintList()Landroid/content/res/ColorStateList;
move-result-object p0
return-object p0
:cond_1
const/4 p0, 0x0
return-object p0
.end method
.method public static getCompoundDrawableTintMode(Landroid/widget/TextView;)Landroid/graphics/PorterDuff$Mode;
.locals 2
invoke-static {p0}, Landroidx/core/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getCompoundDrawableTintMode()Landroid/graphics/PorterDuff$Mode;
move-result-object p0
return-object p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/TintableCompoundDrawablesView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/TintableCompoundDrawablesView;
invoke-interface {p0}, Landroidx/core/widget/TintableCompoundDrawablesView;->getSupportCompoundDrawablesTintMode()Landroid/graphics/PorterDuff$Mode;
move-result-object p0
return-object p0
:cond_1
const/4 p0, 0x0
return-object p0
.end method
.method public static getCompoundDrawablesRelative(Landroid/widget/TextView;)[Landroid/graphics/drawable/Drawable;
.locals 4
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getCompoundDrawablesRelative()[Landroid/graphics/drawable/Drawable;
move-result-object p0
return-object p0
:cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x11
if-lt v0, v1, :cond_3
invoke-virtual {p0}, Landroid/widget/TextView;->getLayoutDirection()I
move-result v0
const/4 v1, 0x1
const/4 v2, 0x0
if-ne v0, v1, :cond_1
goto :goto_0
:cond_1
const/4 v1, 0x0
:goto_0
invoke-virtual {p0}, Landroid/widget/TextView;->getCompoundDrawables()[Landroid/graphics/drawable/Drawable;
move-result-object p0
if-eqz v1, :cond_2
const/4 v0, 0x2
aget-object v1, p0, v0
aget-object v3, p0, v2
aput-object v1, p0, v2
aput-object v3, p0, v0
:cond_2
return-object p0
:cond_3
invoke-virtual {p0}, Landroid/widget/TextView;->getCompoundDrawables()[Landroid/graphics/drawable/Drawable;
move-result-object p0
return-object p0
.end method
.method public static getFirstBaselineToTopHeight(Landroid/widget/TextView;)I
.locals 1
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingTop()I
move-result v0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object p0
invoke-virtual {p0}, Landroid/text/TextPaint;->getFontMetricsInt()Landroid/graphics/Paint$FontMetricsInt;
move-result-object p0
iget p0, p0, Landroid/graphics/Paint$FontMetricsInt;->top:I
sub-int/2addr v0, p0
return v0
.end method
.method public static getLastBaselineToBottomHeight(Landroid/widget/TextView;)I
.locals 1
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingBottom()I
move-result v0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object p0
invoke-virtual {p0}, Landroid/text/TextPaint;->getFontMetricsInt()Landroid/graphics/Paint$FontMetricsInt;
move-result-object p0
iget p0, p0, Landroid/graphics/Paint$FontMetricsInt;->bottom:I
add-int/2addr v0, p0
return v0
.end method
.method public static getMaxLines(Landroid/widget/TextView;)I
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x10
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getMaxLines()I
move-result p0
return p0
:cond_0
sget-boolean v0, Landroidx/core/widget/TextViewCompat;->sMaxModeFieldFetched:Z
const/4 v1, 0x1
if-nez v0, :cond_1
const-string v0, "mMaxMode"
invoke-static {v0}, Landroidx/core/widget/TextViewCompat;->retrieveField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
sput-object v0, Landroidx/core/widget/TextViewCompat;->sMaxModeField:Ljava/lang/reflect/Field;
sput-boolean v1, Landroidx/core/widget/TextViewCompat;->sMaxModeFieldFetched:Z
:cond_1
sget-object v0, Landroidx/core/widget/TextViewCompat;->sMaxModeField:Ljava/lang/reflect/Field;
if-eqz v0, :cond_3
invoke-static {v0, p0}, Landroidx/core/widget/TextViewCompat;->retrieveIntFromField(Ljava/lang/reflect/Field;Landroid/widget/TextView;)I
move-result v0
if-ne v0, v1, :cond_3
sget-boolean v0, Landroidx/core/widget/TextViewCompat;->sMaximumFieldFetched:Z
if-nez v0, :cond_2
const-string v0, "mMaximum"
invoke-static {v0}, Landroidx/core/widget/TextViewCompat;->retrieveField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
sput-object v0, Landroidx/core/widget/TextViewCompat;->sMaximumField:Ljava/lang/reflect/Field;
sput-boolean v1, Landroidx/core/widget/TextViewCompat;->sMaximumFieldFetched:Z
:cond_2
sget-object v0, Landroidx/core/widget/TextViewCompat;->sMaximumField:Ljava/lang/reflect/Field;
if-eqz v0, :cond_3
invoke-static {v0, p0}, Landroidx/core/widget/TextViewCompat;->retrieveIntFromField(Ljava/lang/reflect/Field;Landroid/widget/TextView;)I
move-result p0
return p0
:cond_3
const/4 p0, -0x1
return p0
.end method
.method public static getMinLines(Landroid/widget/TextView;)I
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x10
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getMinLines()I
move-result p0
return p0
:cond_0
sget-boolean v0, Landroidx/core/widget/TextViewCompat;->sMinModeFieldFetched:Z
const/4 v1, 0x1
if-nez v0, :cond_1
const-string v0, "mMinMode"
invoke-static {v0}, Landroidx/core/widget/TextViewCompat;->retrieveField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
sput-object v0, Landroidx/core/widget/TextViewCompat;->sMinModeField:Ljava/lang/reflect/Field;
sput-boolean v1, Landroidx/core/widget/TextViewCompat;->sMinModeFieldFetched:Z
:cond_1
sget-object v0, Landroidx/core/widget/TextViewCompat;->sMinModeField:Ljava/lang/reflect/Field;
if-eqz v0, :cond_3
invoke-static {v0, p0}, Landroidx/core/widget/TextViewCompat;->retrieveIntFromField(Ljava/lang/reflect/Field;Landroid/widget/TextView;)I
move-result v0
if-ne v0, v1, :cond_3
sget-boolean v0, Landroidx/core/widget/TextViewCompat;->sMinimumFieldFetched:Z
if-nez v0, :cond_2
const-string v0, "mMinimum"
invoke-static {v0}, Landroidx/core/widget/TextViewCompat;->retrieveField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
sput-object v0, Landroidx/core/widget/TextViewCompat;->sMinimumField:Ljava/lang/reflect/Field;
sput-boolean v1, Landroidx/core/widget/TextViewCompat;->sMinimumFieldFetched:Z
:cond_2
sget-object v0, Landroidx/core/widget/TextViewCompat;->sMinimumField:Ljava/lang/reflect/Field;
if-eqz v0, :cond_3
invoke-static {v0, p0}, Landroidx/core/widget/TextViewCompat;->retrieveIntFromField(Ljava/lang/reflect/Field;Landroid/widget/TextView;)I
move-result p0
return p0
:cond_3
const/4 p0, -0x1
return p0
.end method
.method private static getTextDirection(Landroid/text/TextDirectionHeuristic;)I
.locals 2
sget-object v0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_RTL:Landroid/text/TextDirectionHeuristic;
const/4 v1, 0x1
if-ne p0, v0, :cond_0
return v1
:cond_0
sget-object v0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_LTR:Landroid/text/TextDirectionHeuristic;
if-ne p0, v0, :cond_1
return v1
:cond_1
sget-object v0, Landroid/text/TextDirectionHeuristics;->ANYRTL_LTR:Landroid/text/TextDirectionHeuristic;
if-ne p0, v0, :cond_2
const/4 p0, 0x2
return p0
:cond_2
sget-object v0, Landroid/text/TextDirectionHeuristics;->LTR:Landroid/text/TextDirectionHeuristic;
if-ne p0, v0, :cond_3
const/4 p0, 0x3
return p0
:cond_3
sget-object v0, Landroid/text/TextDirectionHeuristics;->RTL:Landroid/text/TextDirectionHeuristic;
if-ne p0, v0, :cond_4
const/4 p0, 0x4
return p0
:cond_4
sget-object v0, Landroid/text/TextDirectionHeuristics;->LOCALE:Landroid/text/TextDirectionHeuristic;
if-ne p0, v0, :cond_5
const/4 p0, 0x5
return p0
:cond_5
sget-object v0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_LTR:Landroid/text/TextDirectionHeuristic;
if-ne p0, v0, :cond_6
const/4 p0, 0x6
return p0
:cond_6
sget-object v0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_RTL:Landroid/text/TextDirectionHeuristic;
if-ne p0, v0, :cond_7
const/4 p0, 0x7
return p0
:cond_7
return v1
.end method
.method private static getTextDirectionHeuristic(Landroid/widget/TextView;)Landroid/text/TextDirectionHeuristic;
.locals 4
invoke-virtual {p0}, Landroid/widget/TextView;->getTransformationMethod()Landroid/text/method/TransformationMethod;
move-result-object v0
instance-of v0, v0, Landroid/text/method/PasswordTransformationMethod;
if-eqz v0, :cond_0
sget-object p0, Landroid/text/TextDirectionHeuristics;->LTR:Landroid/text/TextDirectionHeuristic;
return-object p0
:cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1c
const/4 v2, 0x0
const/4 v3, 0x1
if-lt v0, v1, :cond_3
invoke-virtual {p0}, Landroid/widget/TextView;->getInputType()I
move-result v0
and-int/lit8 v0, v0, 0xf
const/4 v1, 0x3
if-ne v0, v1, :cond_3
invoke-virtual {p0}, Landroid/widget/TextView;->getTextLocale()Ljava/util/Locale;
move-result-object p0
invoke-static {p0}, Landroid/icu/text/DecimalFormatSymbols;->getInstance(Ljava/util/Locale;)Landroid/icu/text/DecimalFormatSymbols;
move-result-object p0
invoke-virtual {p0}, Landroid/icu/text/DecimalFormatSymbols;->getDigitStrings()[Ljava/lang/String;
move-result-object p0
aget-object p0, p0, v2
invoke-virtual {p0, v2}, Ljava/lang/String;->codePointAt(I)I
move-result p0
invoke-static {p0}, Ljava/lang/Character;->getDirectionality(I)B
move-result p0
if-eq p0, v3, :cond_2
const/4 v0, 0x2
if-ne p0, v0, :cond_1
goto :goto_0
:cond_1
sget-object p0, Landroid/text/TextDirectionHeuristics;->LTR:Landroid/text/TextDirectionHeuristic;
return-object p0
:goto_0
:cond_2
sget-object p0, Landroid/text/TextDirectionHeuristics;->RTL:Landroid/text/TextDirectionHeuristic;
return-object p0
:cond_3
invoke-virtual {p0}, Landroid/widget/TextView;->getLayoutDirection()I
move-result v0
if-ne v0, v3, :cond_4
const/4 v2, 0x1
:cond_4
invoke-virtual {p0}, Landroid/widget/TextView;->getTextDirection()I
move-result p0
packed-switch p0, :pswitch_data_0
if-eqz v2, :cond_5
sget-object p0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_RTL:Landroid/text/TextDirectionHeuristic;
goto :goto_1
:pswitch_0
sget-object p0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_RTL:Landroid/text/TextDirectionHeuristic;
return-object p0
:pswitch_1
sget-object p0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_LTR:Landroid/text/TextDirectionHeuristic;
return-object p0
:pswitch_2
sget-object p0, Landroid/text/TextDirectionHeuristics;->LOCALE:Landroid/text/TextDirectionHeuristic;
return-object p0
:pswitch_3
sget-object p0, Landroid/text/TextDirectionHeuristics;->RTL:Landroid/text/TextDirectionHeuristic;
return-object p0
:pswitch_4
sget-object p0, Landroid/text/TextDirectionHeuristics;->LTR:Landroid/text/TextDirectionHeuristic;
return-object p0
:pswitch_5
sget-object p0, Landroid/text/TextDirectionHeuristics;->ANYRTL_LTR:Landroid/text/TextDirectionHeuristic;
return-object p0
:cond_5
sget-object p0, Landroid/text/TextDirectionHeuristics;->FIRSTSTRONG_LTR:Landroid/text/TextDirectionHeuristic;
:goto_1
return-object p0
:pswitch_data_0
.packed-switch 0x2
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method
.method public static getTextMetricsParams(Landroid/widget/TextView;)Landroidx/core/text/PrecomputedTextCompat$Params;
.locals 3
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1c
if-lt v0, v1, :cond_0
new-instance v0, Landroidx/core/text/PrecomputedTextCompat$Params;
invoke-virtual {p0}, Landroid/widget/TextView;->getTextMetricsParams()Landroid/text/PrecomputedText$Params;
move-result-object p0
invoke-direct {v0, p0}, Landroidx/core/text/PrecomputedTextCompat$Params;-><init>(Landroid/text/PrecomputedText$Params;)V
return-object v0
:cond_0
new-instance v0, Landroidx/core/text/PrecomputedTextCompat$Params$Builder;
new-instance v1, Landroid/text/TextPaint;
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object v2
invoke-direct {v1, v2}, Landroid/text/TextPaint;-><init>(Landroid/graphics/Paint;)V
invoke-direct {v0, v1}, Landroidx/core/text/PrecomputedTextCompat$Params$Builder;-><init>(Landroid/text/TextPaint;)V
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x17
if-lt v1, v2, :cond_1
invoke-virtual {p0}, Landroid/widget/TextView;->getBreakStrategy()I
move-result v1
invoke-virtual {v0, v1}, Landroidx/core/text/PrecomputedTextCompat$Params$Builder;->setBreakStrategy(I)Landroidx/core/text/PrecomputedTextCompat$Params$Builder;
invoke-virtual {p0}, Landroid/widget/TextView;->getHyphenationFrequency()I
move-result v1
invoke-virtual {v0, v1}, Landroidx/core/text/PrecomputedTextCompat$Params$Builder;->setHyphenationFrequency(I)Landroidx/core/text/PrecomputedTextCompat$Params$Builder;
:cond_1
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x12
if-lt v1, v2, :cond_2
invoke-static {p0}, Landroidx/core/widget/TextViewCompat;->getTextDirectionHeuristic(Landroid/widget/TextView;)Landroid/text/TextDirectionHeuristic;
move-result-object p0
invoke-virtual {v0, p0}, Landroidx/core/text/PrecomputedTextCompat$Params$Builder;->setTextDirection(Landroid/text/TextDirectionHeuristic;)Landroidx/core/text/PrecomputedTextCompat$Params$Builder;
:cond_2
invoke-virtual {v0}, Landroidx/core/text/PrecomputedTextCompat$Params$Builder;->build()Landroidx/core/text/PrecomputedTextCompat$Params;
move-result-object p0
return-object p0
.end method
.method private static retrieveField(Ljava/lang/String;)Ljava/lang/reflect/Field;
.locals 3
const/4 v0, 0x0
:try_start_0
const-class v1, Landroid/widget/TextView;
invoke-virtual {v1, p0}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v0
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->setAccessible(Z)V
:try_end_0
.catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Could not retrieve "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " field."
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string v1, "TextViewCompat"
invoke-static {v1, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:goto_0
return-object v0
.end method
.method private static retrieveIntFromField(Ljava/lang/reflect/Field;Landroid/widget/TextView;)I
.locals 1
:try_start_0
invoke-virtual {p0, p1}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I
move-result p0
:try_end_0
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
return p0
:catch_0
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "Could not retrieve value of "
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;
move-result-object p0
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " field."
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string p1, "TextViewCompat"
invoke-static {p1, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const/4 p0, -0x1
return p0
.end method
.method public static setAutoSizeTextTypeUniformWithConfiguration(Landroid/widget/TextView;IIII)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/IllegalArgumentException;
}
.end annotation
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->setAutoSizeTextTypeUniformWithConfiguration(IIII)V
goto :goto_0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0, p1, p2, p3, p4}, Landroidx/core/widget/AutoSizeableTextView;->setAutoSizeTextTypeUniformWithConfiguration(IIII)V
:cond_1
:goto_0
return-void
.end method
.method public static setAutoSizeTextTypeUniformWithPresetSizes(Landroid/widget/TextView;[II)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/IllegalArgumentException;
}
.end annotation
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1, p2}, Landroid/widget/TextView;->setAutoSizeTextTypeUniformWithPresetSizes([II)V
goto :goto_0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0, p1, p2}, Landroidx/core/widget/AutoSizeableTextView;->setAutoSizeTextTypeUniformWithPresetSizes([II)V
:cond_1
:goto_0
return-void
.end method
.method public static setAutoSizeTextTypeWithDefaults(Landroid/widget/TextView;I)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setAutoSizeTextTypeWithDefaults(I)V
goto :goto_0
:cond_0
instance-of v0, p0, Landroidx/core/widget/AutoSizeableTextView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/AutoSizeableTextView;
invoke-interface {p0, p1}, Landroidx/core/widget/AutoSizeableTextView;->setAutoSizeTextTypeWithDefaults(I)V
:cond_1
:goto_0
return-void
.end method
.method public static setCompoundDrawableTintList(Landroid/widget/TextView;Landroid/content/res/ColorStateList;)V
.locals 2
invoke-static {p0}, Landroidx/core/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setCompoundDrawableTintList(Landroid/content/res/ColorStateList;)V
goto :goto_0
:cond_0
instance-of v0, p0, Landroidx/core/widget/TintableCompoundDrawablesView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/TintableCompoundDrawablesView;
invoke-interface {p0, p1}, Landroidx/core/widget/TintableCompoundDrawablesView;->setSupportCompoundDrawablesTintList(Landroid/content/res/ColorStateList;)V
:cond_1
:goto_0
return-void
.end method
.method public static setCompoundDrawableTintMode(Landroid/widget/TextView;Landroid/graphics/PorterDuff$Mode;)V
.locals 2
invoke-static {p0}, Landroidx/core/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setCompoundDrawableTintMode(Landroid/graphics/PorterDuff$Mode;)V
goto :goto_0
:cond_0
instance-of v0, p0, Landroidx/core/widget/TintableCompoundDrawablesView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/TintableCompoundDrawablesView;
invoke-interface {p0, p1}, Landroidx/core/widget/TintableCompoundDrawablesView;->setSupportCompoundDrawablesTintMode(Landroid/graphics/PorterDuff$Mode;)V
:cond_1
:goto_0
return-void
.end method
.method public static setCompoundDrawablesRelative(Landroid/widget/TextView;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->setCompoundDrawablesRelative(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
goto :goto_3
:cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x11
if-lt v0, v1, :cond_4
invoke-virtual {p0}, Landroid/widget/TextView;->getLayoutDirection()I
move-result v0
const/4 v1, 0x1
if-ne v0, v1, :cond_1
goto :goto_0
:cond_1
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_2
move-object v0, p3
goto :goto_1
:cond_2
move-object v0, p1
:goto_1
if-eqz v1, :cond_3
goto :goto_2
:cond_3
move-object p1, p3
:goto_2
invoke-virtual {p0, v0, p2, p1, p4}, Landroid/widget/TextView;->setCompoundDrawables(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
goto :goto_3
:cond_4
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->setCompoundDrawables(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
:goto_3
return-void
.end method
.method public static setCompoundDrawablesRelativeWithIntrinsicBounds(Landroid/widget/TextView;IIII)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->setCompoundDrawablesRelativeWithIntrinsicBounds(IIII)V
goto :goto_3
:cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x11
if-lt v0, v1, :cond_4
invoke-virtual {p0}, Landroid/widget/TextView;->getLayoutDirection()I
move-result v0
const/4 v1, 0x1
if-ne v0, v1, :cond_1
goto :goto_0
:cond_1
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_2
move v0, p3
goto :goto_1
:cond_2
move v0, p1
:goto_1
if-eqz v1, :cond_3
goto :goto_2
:cond_3
move p1, p3
:goto_2
invoke-virtual {p0, v0, p2, p1, p4}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(IIII)V
goto :goto_3
:cond_4
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(IIII)V
:goto_3
return-void
.end method
.method public static setCompoundDrawablesRelativeWithIntrinsicBounds(Landroid/widget/TextView;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->setCompoundDrawablesRelativeWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
goto :goto_3
:cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x11
if-lt v0, v1, :cond_4
invoke-virtual {p0}, Landroid/widget/TextView;->getLayoutDirection()I
move-result v0
const/4 v1, 0x1
if-ne v0, v1, :cond_1
goto :goto_0
:cond_1
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_2
move-object v0, p3
goto :goto_1
:cond_2
move-object v0, p1
:goto_1
if-eqz v1, :cond_3
goto :goto_2
:cond_3
move-object p1, p3
:goto_2
invoke-virtual {p0, v0, p2, p1, p4}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
goto :goto_3
:cond_4
invoke-virtual {p0, p1, p2, p3, p4}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
:goto_3
return-void
.end method
.method public static setCustomSelectionActionModeCallback(Landroid/widget/TextView;Landroid/view/ActionMode$Callback;)V
.locals 0
invoke-static {p0, p1}, Landroidx/core/widget/TextViewCompat;->wrapCustomSelectionActionModeCallback(Landroid/widget/TextView;Landroid/view/ActionMode$Callback;)Landroid/view/ActionMode$Callback;
move-result-object p1
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setCustomSelectionActionModeCallback(Landroid/view/ActionMode$Callback;)V
return-void
.end method
.method public static setFirstBaselineToTopHeight(Landroid/widget/TextView;I)V
.locals 3
invoke-static {p1}, Landroidx/core/util/Preconditions;->checkArgumentNonnegative(I)I
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1c
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setFirstBaselineToTopHeight(I)V
return-void
:cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object v0
invoke-virtual {v0}, Landroid/text/TextPaint;->getFontMetricsInt()Landroid/graphics/Paint$FontMetricsInt;
move-result-object v0
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x10
if-lt v1, v2, :cond_2
invoke-virtual {p0}, Landroid/widget/TextView;->getIncludeFontPadding()Z
move-result v1
if-eqz v1, :cond_1
goto :goto_0
:cond_1
iget v0, v0, Landroid/graphics/Paint$FontMetricsInt;->ascent:I
goto :goto_1
:goto_0
:cond_2
iget v0, v0, Landroid/graphics/Paint$FontMetricsInt;->top:I
:goto_1
invoke-static {v0}, Ljava/lang/Math;->abs(I)I
move-result v1
if-le p1, v1, :cond_3
add-int/2addr p1, v0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingLeft()I
move-result v0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingRight()I
move-result v1
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingBottom()I
move-result v2
invoke-virtual {p0, v0, p1, v1, v2}, Landroid/widget/TextView;->setPadding(IIII)V
:cond_3
return-void
.end method
.method public static setLastBaselineToBottomHeight(Landroid/widget/TextView;I)V
.locals 3
invoke-static {p1}, Landroidx/core/util/Preconditions;->checkArgumentNonnegative(I)I
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object v0
invoke-virtual {v0}, Landroid/text/TextPaint;->getFontMetricsInt()Landroid/graphics/Paint$FontMetricsInt;
move-result-object v0
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x10
if-lt v1, v2, :cond_1
invoke-virtual {p0}, Landroid/widget/TextView;->getIncludeFontPadding()Z
move-result v1
if-eqz v1, :cond_0
goto :goto_0
:cond_0
iget v0, v0, Landroid/graphics/Paint$FontMetricsInt;->descent:I
goto :goto_1
:cond_1
:goto_0
iget v0, v0, Landroid/graphics/Paint$FontMetricsInt;->bottom:I
:goto_1
invoke-static {v0}, Ljava/lang/Math;->abs(I)I
move-result v1
if-le p1, v1, :cond_2
sub-int/2addr p1, v0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingLeft()I
move-result v0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingTop()I
move-result v1
invoke-virtual {p0}, Landroid/widget/TextView;->getPaddingRight()I
move-result v2
invoke-virtual {p0, v0, v1, v2, p1}, Landroid/widget/TextView;->setPadding(IIII)V
:cond_2
return-void
.end method
.method public static setLineHeight(Landroid/widget/TextView;I)V
.locals 2
invoke-static {p1}, Landroidx/core/util/Preconditions;->checkArgumentNonnegative(I)I
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->getFontMetricsInt(Landroid/graphics/Paint$FontMetricsInt;)I
move-result v0
if-eq p1, v0, :cond_0
sub-int/2addr p1, v0
int-to-float p1, p1
const/high16 v0, 0x3f800000 # 1.0f
invoke-virtual {p0, p1, v0}, Landroid/widget/TextView;->setLineSpacing(FF)V
:cond_0
return-void
.end method
.method public static setPrecomputedText(Landroid/widget/TextView;Landroidx/core/text/PrecomputedTextCompat;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1d
if-lt v0, v1, :cond_0
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat;->getPrecomputedText()Landroid/text/PrecomputedText;
move-result-object p1
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
goto :goto_0
:cond_0
invoke-static {p0}, Landroidx/core/widget/TextViewCompat;->getTextMetricsParams(Landroid/widget/TextView;)Landroidx/core/text/PrecomputedTextCompat$Params;
move-result-object v0
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat;->getParams()Landroidx/core/text/PrecomputedTextCompat$Params;
move-result-object v1
invoke-virtual {v0, v1}, Landroidx/core/text/PrecomputedTextCompat$Params;->equalsWithoutTextDirection(Landroidx/core/text/PrecomputedTextCompat$Params;)Z
move-result v0
if-eqz v0, :cond_1
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
:goto_0
return-void
:cond_1
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Given text can not be applied to TextView."
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static setTextAppearance(Landroid/widget/TextView;I)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setTextAppearance(I)V
goto :goto_0
:cond_0
invoke-virtual {p0}, Landroid/widget/TextView;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {p0, v0, p1}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V
:goto_0
return-void
.end method
.method public static setTextMetricsParams(Landroid/widget/TextView;Landroidx/core/text/PrecomputedTextCompat$Params;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x12
if-lt v0, v1, :cond_0
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat$Params;->getTextDirection()Landroid/text/TextDirectionHeuristic;
move-result-object v0
invoke-static {v0}, Landroidx/core/widget/TextViewCompat;->getTextDirection(Landroid/text/TextDirectionHeuristic;)I
move-result v0
invoke-virtual {p0, v0}, Landroid/widget/TextView;->setTextDirection(I)V
:cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x17
if-ge v0, v1, :cond_2
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat$Params;->getTextPaint()Landroid/text/TextPaint;
move-result-object v0
invoke-virtual {v0}, Landroid/text/TextPaint;->getTextScaleX()F
move-result v0
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object v1
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat$Params;->getTextPaint()Landroid/text/TextPaint;
move-result-object p1
invoke-virtual {v1, p1}, Landroid/text/TextPaint;->set(Landroid/text/TextPaint;)V
invoke-virtual {p0}, Landroid/widget/TextView;->getTextScaleX()F
move-result p1
cmpl-float p1, v0, p1
if-nez p1, :cond_1
const/high16 p1, 0x40000000 # 2.0f
div-float p1, v0, p1
const/high16 v1, 0x3f800000 # 1.0f
add-float/2addr p1, v1
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setTextScaleX(F)V
:cond_1
invoke-virtual {p0, v0}, Landroid/widget/TextView;->setTextScaleX(F)V
goto :goto_0
:cond_2
invoke-virtual {p0}, Landroid/widget/TextView;->getPaint()Landroid/text/TextPaint;
move-result-object v0
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat$Params;->getTextPaint()Landroid/text/TextPaint;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->set(Landroid/text/TextPaint;)V
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat$Params;->getBreakStrategy()I
move-result v0
invoke-virtual {p0, v0}, Landroid/widget/TextView;->setBreakStrategy(I)V
invoke-virtual {p1}, Landroidx/core/text/PrecomputedTextCompat$Params;->getHyphenationFrequency()I
move-result p1
invoke-virtual {p0, p1}, Landroid/widget/TextView;->setHyphenationFrequency(I)V
:goto_0
return-void
.end method
.method public static wrapCustomSelectionActionModeCallback(Landroid/widget/TextView;Landroid/view/ActionMode$Callback;)Landroid/view/ActionMode$Callback;
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-lt v0, v1, :cond_1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1b
if-gt v0, v1, :cond_1
instance-of v0, p1, Landroidx/core/widget/TextViewCompat$OreoCallback;
if-eqz v0, :cond_0
goto :goto_0
:cond_0
new-instance v0, Landroidx/core/widget/TextViewCompat$OreoCallback;
invoke-direct {v0, p1, p0}, Landroidx/core/widget/TextViewCompat$OreoCallback;-><init>(Landroid/view/ActionMode$Callback;Landroid/widget/TextView;)V
return-object v0
:cond_1
:goto_0
return-object p1
.end method