.class public Lh7/f;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Landroid/content/res/ColorStateList;

.field public final b:Landroid/content/res/ColorStateList;

.field public final c:Ljava/lang/String;

.field public final d:I

.field public final e:I

.field public final f:F

.field public final g:F

.field public final h:F

.field public final i:Z

.field public final j:F

.field public k:F

.field public final l:I

.field public m:Z

.field public n:Landroid/graphics/Typeface;


# direct methods
.method public constructor <init>(Landroid/content/Context;I)V
    .registers 8

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lh7/f;->m:Z

    sget-object v1, Lo6/a;->A:[I

    invoke-virtual {p1, p2, v1}, Landroid/content/Context;->obtainStyledAttributes(I[I)Landroid/content/res/TypedArray;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, v0, v2}, Landroid/content/res/TypedArray;->getDimension(IF)F

    move-result v3

    iput v3, p0, Lh7/f;->k:F

    const/4 v3, 0x3

    invoke-static {p1, v1, v3}, Lh7/c;->a(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;

    move-result-object v3

    iput-object v3, p0, Lh7/f;->a:Landroid/content/res/ColorStateList;

    const/4 v3, 0x4

    invoke-static {p1, v1, v3}, Lh7/c;->a(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;

    const/4 v3, 0x5

    invoke-static {p1, v1, v3}, Lh7/c;->a(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;

    const/4 v3, 0x2

    invoke-virtual {v1, v3, v0}, Landroid/content/res/TypedArray;->getInt(II)I

    move-result v3

    iput v3, p0, Lh7/f;->d:I

    const/4 v3, 0x1

    invoke-virtual {v1, v3, v3}, Landroid/content/res/TypedArray;->getInt(II)I

    move-result v3

    iput v3, p0, Lh7/f;->e:I

    const/16 v3, 0xc

    .line 1
    invoke-virtual {v1, v3}, Landroid/content/res/TypedArray;->hasValue(I)Z

    move-result v4

    if-eqz v4, :cond_39

    goto :goto_3b

    :cond_39
    const/16 v3, 0xa

    .line 2
    :goto_3b
    invoke-virtual {v1, v3, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I

    move-result v4

    iput v4, p0, Lh7/f;->l:I

    invoke-virtual {v1, v3}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lh7/f;->c:Ljava/lang/String;

    const/16 v3, 0xe

    invoke-virtual {v1, v3, v0}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z

    const/4 v3, 0x6

    invoke-static {p1, v1, v3}, Lh7/c;->a(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;

    move-result-object v3

    iput-object v3, p0, Lh7/f;->b:Landroid/content/res/ColorStateList;

    const/4 v3, 0x7

    invoke-virtual {v1, v3, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F

    move-result v3

    iput v3, p0, Lh7/f;->f:F

    const/16 v3, 0x8

    invoke-virtual {v1, v3, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F

    move-result v3

    iput v3, p0, Lh7/f;->g:F

    const/16 v3, 0x9

    invoke-virtual {v1, v3, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F

    move-result v3

    iput v3, p0, Lh7/f;->h:F

    invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V

    sget-object v1, Lo6/a;->s:[I

    invoke-virtual {p1, p2, v1}, Landroid/content/Context;->obtainStyledAttributes(I[I)Landroid/content/res/TypedArray;

    move-result-object p1

    invoke-virtual {p1, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z

    move-result p2

    iput-boolean p2, p0, Lh7/f;->i:Z

    invoke-virtual {p1, v0, v2}, Landroid/content/res/TypedArray;->getFloat(IF)F

    move-result p2

    iput p2, p0, Lh7/f;->j:F

    invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V

    return-void
.end method


# virtual methods
.method public final a()V
    .registers 3

    iget-object v0, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    if-nez v0, :cond_10

    iget-object v0, p0, Lh7/f;->c:Ljava/lang/String;

    if-eqz v0, :cond_10

    iget v1, p0, Lh7/f;->d:I

    invoke-static {v0, v1}, Landroid/graphics/Typeface;->create(Ljava/lang/String;I)Landroid/graphics/Typeface;

    move-result-object v0

    iput-object v0, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    :cond_10
    iget-object v0, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    if-nez v0, :cond_36

    iget v0, p0, Lh7/f;->e:I

    const/4 v1, 0x1

    if-eq v0, v1, :cond_28

    const/4 v1, 0x2

    if-eq v0, v1, :cond_25

    const/4 v1, 0x3

    if-eq v0, v1, :cond_22

    sget-object v0, Landroid/graphics/Typeface;->DEFAULT:Landroid/graphics/Typeface;

    goto :goto_2a

    :cond_22
    sget-object v0, Landroid/graphics/Typeface;->MONOSPACE:Landroid/graphics/Typeface;

    goto :goto_2a

    :cond_25
    sget-object v0, Landroid/graphics/Typeface;->SERIF:Landroid/graphics/Typeface;

    goto :goto_2a

    :cond_28
    sget-object v0, Landroid/graphics/Typeface;->SANS_SERIF:Landroid/graphics/Typeface;

    :goto_2a
    iput-object v0, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    iget-object v0, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    iget v1, p0, Lh7/f;->d:I

    invoke-static {v0, v1}, Landroid/graphics/Typeface;->create(Landroid/graphics/Typeface;I)Landroid/graphics/Typeface;

    move-result-object v0

    iput-object v0, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    :cond_36
    return-void
.end method

.method public b(Landroid/content/Context;)Landroid/graphics/Typeface;
    .registers 4

    iget-boolean v0, p0, Lh7/f;->m:Z

    if-eqz v0, :cond_7

    iget-object p1, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    return-object p1

    :cond_7
    invoke-virtual {p1}, Landroid/content/Context;->isRestricted()Z

    move-result v0

    if-nez v0, :cond_35

    :try_start_d
    iget v0, p0, Lh7/f;->l:I

    invoke-static {p1, v0}, Ld0/e;->a(Landroid/content/Context;I)Landroid/graphics/Typeface;

    move-result-object p1

    iput-object p1, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    if-eqz p1, :cond_35

    iget v0, p0, Lh7/f;->d:I

    invoke-static {p1, v0}, Landroid/graphics/Typeface;->create(Landroid/graphics/Typeface;I)Landroid/graphics/Typeface;

    move-result-object p1

    iput-object p1, p0, Lh7/f;->n:Landroid/graphics/Typeface;
    :try_end_1f
    .catch Ljava/lang/UnsupportedOperationException; {:try_start_d .. :try_end_1f} :catch_35
    .catch Landroid/content/res/Resources$NotFoundException; {:try_start_d .. :try_end_1f} :catch_35
    .catch Ljava/lang/Exception; {:try_start_d .. :try_end_1f} :catch_20

    goto :goto_35

    :catch_20
    move-exception p1

    const-string v0, "Error loading font "

    invoke-static {v0}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lh7/f;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "TextAppearance"

    invoke-static {v1, v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :catch_35
    :cond_35
    :goto_35
    invoke-virtual {p0}, Lh7/f;->a()V

    const/4 p1, 0x1

    iput-boolean p1, p0, Lh7/f;->m:Z

    iget-object p1, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    return-object p1
.end method

.method public c(Landroid/content/Context;Lz5/le0;)V
    .registers 12

    invoke-virtual {p0, p1}, Lh7/f;->d(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_a

    invoke-virtual {p0, p1}, Lh7/f;->b(Landroid/content/Context;)Landroid/graphics/Typeface;

    goto :goto_d

    :cond_a
    invoke-virtual {p0}, Lh7/f;->a()V

    :goto_d
    iget v2, p0, Lh7/f;->l:I

    const/4 v0, 0x1

    if-nez v2, :cond_14

    iput-boolean v0, p0, Lh7/f;->m:Z

    :cond_14
    iget-boolean v1, p0, Lh7/f;->m:Z

    if-eqz v1, :cond_1e

    iget-object p1, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    invoke-virtual {p2, p1, v0}, Lz5/le0;->b(Landroid/graphics/Typeface;Z)V

    return-void

    :cond_1e
    :try_start_1e
    new-instance v5, Lh7/d;

    invoke-direct {v5, p0, p2}, Lh7/d;-><init>(Lh7/f;Lz5/le0;)V

    const/4 v1, 0x0

    sget-object v3, Ld0/e;->a:Ljava/lang/ThreadLocal;

    .line 1
    invoke-virtual {p1}, Landroid/content/Context;->isRestricted()Z

    move-result v3

    if-eqz v3, :cond_31

    const/4 p1, -0x4

    invoke-virtual {v5, p1, v1}, Ld0/e$c;->a(ILandroid/os/Handler;)V

    goto :goto_60

    :cond_31
    new-instance v3, Landroid/util/TypedValue;

    invoke-direct {v3}, Landroid/util/TypedValue;-><init>()V

    const/4 v4, 0x0

    const/4 v7, 0x0

    const/4 v8, 0x0

    const/4 v6, 0x0

    move-object v1, p1

    invoke-static/range {v1 .. v8}, Ld0/e;->b(Landroid/content/Context;ILandroid/util/TypedValue;ILd0/e$c;Landroid/os/Handler;ZZ)Landroid/graphics/Typeface;
    :try_end_3e
    .catch Landroid/content/res/Resources$NotFoundException; {:try_start_1e .. :try_end_3e} :catch_5b
    .catch Ljava/lang/Exception; {:try_start_1e .. :try_end_3e} :catch_3f

    goto :goto_60

    :catch_3f
    move-exception p1

    const-string v1, "Error loading font "

    .line 2
    invoke-static {v1}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lh7/f;->c:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    const-string v2, "TextAppearance"

    invoke-static {v2, v1, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    iput-boolean v0, p0, Lh7/f;->m:Z

    const/4 p1, -0x3

    invoke-virtual {p2, p1}, Lz5/le0;->a(I)V

    goto :goto_60

    :catch_5b
    iput-boolean v0, p0, Lh7/f;->m:Z

    invoke-virtual {p2, v0}, Lz5/le0;->a(I)V

    :goto_60
    return-void
.end method

.method public final d(Landroid/content/Context;)Z
    .registers 10

    iget v1, p0, Lh7/f;->l:I

    const/4 v0, 0x0

    if-eqz v1, :cond_1e

    sget-object v2, Ld0/e;->a:Ljava/lang/ThreadLocal;

    .line 1
    invoke-virtual {p1}, Landroid/content/Context;->isRestricted()Z

    move-result v2

    if-eqz v2, :cond_e

    goto :goto_1e

    :cond_e
    new-instance v2, Landroid/util/TypedValue;

    invoke-direct {v2}, Landroid/util/TypedValue;-><init>()V

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/4 v7, 0x1

    move-object v0, p1

    invoke-static/range {v0 .. v7}, Ld0/e;->b(Landroid/content/Context;ILandroid/util/TypedValue;ILd0/e$c;Landroid/os/Handler;ZZ)Landroid/graphics/Typeface;

    move-result-object p1

    move-object v0, p1

    :cond_1e
    :goto_1e
    if-eqz v0, :cond_22

    const/4 p1, 0x1

    goto :goto_23

    :cond_22
    const/4 p1, 0x0

    :goto_23
    return p1
.end method

.method public e(Landroid/content/Context;Landroid/text/TextPaint;Lz5/le0;)V
    .registers 8

    invoke-virtual {p0, p1, p2, p3}, Lh7/f;->f(Landroid/content/Context;Landroid/text/TextPaint;Lz5/le0;)V

    iget-object p1, p0, Lh7/f;->a:Landroid/content/res/ColorStateList;

    if-eqz p1, :cond_12

    iget-object p3, p2, Landroid/text/TextPaint;->drawableState:[I

    invoke-virtual {p1}, Landroid/content/res/ColorStateList;->getDefaultColor()I

    move-result v0

    invoke-virtual {p1, p3, v0}, Landroid/content/res/ColorStateList;->getColorForState([II)I

    move-result p1

    goto :goto_14

    :cond_12
    const/high16 p1, -0x1000000

    :goto_14
    invoke-virtual {p2, p1}, Landroid/text/TextPaint;->setColor(I)V

    iget p1, p0, Lh7/f;->h:F

    iget p3, p0, Lh7/f;->f:F

    iget v0, p0, Lh7/f;->g:F

    iget-object v1, p0, Lh7/f;->b:Landroid/content/res/ColorStateList;

    if-eqz v1, :cond_2c

    iget-object v2, p2, Landroid/text/TextPaint;->drawableState:[I

    invoke-virtual {v1}, Landroid/content/res/ColorStateList;->getDefaultColor()I

    move-result v3

    invoke-virtual {v1, v2, v3}, Landroid/content/res/ColorStateList;->getColorForState([II)I

    move-result v1

    goto :goto_2d

    :cond_2c
    const/4 v1, 0x0

    :goto_2d
    invoke-virtual {p2, p1, p3, v0, v1}, Landroid/text/TextPaint;->setShadowLayer(FFFI)V

    return-void
.end method

.method public f(Landroid/content/Context;Landroid/text/TextPaint;Lz5/le0;)V
    .registers 5

    invoke-virtual {p0, p1}, Lh7/f;->d(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_e

    invoke-virtual {p0, p1}, Lh7/f;->b(Landroid/content/Context;)Landroid/graphics/Typeface;

    move-result-object p1

    invoke-virtual {p0, p2, p1}, Lh7/f;->g(Landroid/text/TextPaint;Landroid/graphics/Typeface;)V

    goto :goto_1e

    .line 1
    :cond_e
    invoke-virtual {p0}, Lh7/f;->a()V

    iget-object v0, p0, Lh7/f;->n:Landroid/graphics/Typeface;

    .line 2
    invoke-virtual {p0, p2, v0}, Lh7/f;->g(Landroid/text/TextPaint;Landroid/graphics/Typeface;)V

    new-instance v0, Lh7/e;

    invoke-direct {v0, p0, p2, p3}, Lh7/e;-><init>(Lh7/f;Landroid/text/TextPaint;Lz5/le0;)V

    invoke-virtual {p0, p1, v0}, Lh7/f;->c(Landroid/content/Context;Lz5/le0;)V

    :goto_1e
    return-void
.end method

.method public g(Landroid/text/TextPaint;Landroid/graphics/Typeface;)V
    .registers 4

    invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    iget v0, p0, Lh7/f;->d:I

    invoke-virtual {p2}, Landroid/graphics/Typeface;->getStyle()I

    move-result p2

    not-int p2, p2

    and-int/2addr p2, v0

    and-int/lit8 v0, p2, 0x1

    if-eqz v0, :cond_11

    const/4 v0, 0x1

    goto :goto_12

    :cond_11
    const/4 v0, 0x0

    :goto_12
    invoke-virtual {p1, v0}, Landroid/text/TextPaint;->setFakeBoldText(Z)V

    and-int/lit8 p2, p2, 0x2

    if-eqz p2, :cond_1c

    const/high16 p2, -0x41800000    # -0.25f

    goto :goto_1d

    :cond_1c
    const/4 p2, 0x0

    :goto_1d
    invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setTextSkewX(F)V

    iget p2, p0, Lh7/f;->k:F

    invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setTextSize(F)V

    iget-boolean p2, p0, Lh7/f;->i:Z

    if-eqz p2, :cond_2e

    iget p2, p0, Lh7/f;->j:F

    invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setLetterSpacing(F)V

    :cond_2e
    return-void
.end method
