.class public Le0/d;
.super Ljava/lang/Object;
.source ""


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Le0/d$a;
    }
.end annotation


# static fields
.field public static final a:Le0/j;

.field public static final b:Lr/f;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lr/f<",
            "Ljava/lang/String;",
            "Landroid/graphics/Typeface;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public static constructor <clinit>()V
    .registers 3

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x1d

    if-lt v0, v1, :cond_c

    new-instance v0, Le0/i;

    invoke-direct {v0}, Le0/i;-><init>()V

    goto :goto_3d

    :cond_c
    const/16 v1, 0x1c

    if-lt v0, v1, :cond_16

    new-instance v0, Le0/h;

    invoke-direct {v0}, Le0/h;-><init>()V

    goto :goto_3d

    :cond_16
    const/16 v1, 0x1a

    if-lt v0, v1, :cond_20

    new-instance v0, Le0/g;

    invoke-direct {v0}, Le0/g;-><init>()V

    goto :goto_3d

    .line 1
    :cond_20
    sget-object v0, Le0/f;->d:Ljava/lang/reflect/Method;

    if-nez v0, :cond_2b

    const-string v1, "TypefaceCompatApi24Impl"

    const-string v2, "Unable to collect necessary private methods.Fallback to legacy implementation."

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

    :cond_2b
    if-eqz v0, :cond_2f

    const/4 v0, 0x1

    goto :goto_30

    :cond_2f
    const/4 v0, 0x0

    :goto_30
    if-eqz v0, :cond_38

    .line 2
    new-instance v0, Le0/f;

    invoke-direct {v0}, Le0/f;-><init>()V

    goto :goto_3d

    :cond_38
    new-instance v0, Le0/e;

    invoke-direct {v0}, Le0/e;-><init>()V

    .line 3
    :goto_3d
    sput-object v0, Le0/d;->a:Le0/j;

    .line 4
    new-instance v0, Lr/f;

    const/16 v1, 0x10

    invoke-direct {v0, v1}, Lr/f;-><init>(I)V

    sput-object v0, Le0/d;->b:Lr/f;

    return-void
.end method

.method public static a(Landroid/content/Context;Ld0/d$a;Landroid/content/res/Resources;IILd0/e$c;Landroid/os/Handler;Z)Landroid/graphics/Typeface;
    .registers 14

    instance-of v0, p1, Ld0/d$d;

    const/4 v1, -0x3

    if-eqz v0, :cond_146

    check-cast p1, Ld0/d$d;

    .line 1
    iget-object v0, p1, Ld0/d$d;->d:Ljava/lang/String;

    const/4 v2, 0x0

    const/4 v3, 0x0

    if-eqz v0, :cond_27

    .line 2
    invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z

    move-result v4

    if-eqz v4, :cond_14

    goto :goto_27

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

    move-result-object v0

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

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

    move-result-object v4

    if-eqz v0, :cond_27

    invoke-virtual {v0, v4}, Landroid/graphics/Typeface;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_27

    goto :goto_28

    :cond_27
    :goto_27
    move-object v0, v2

    :goto_28
    if-eqz v0, :cond_30

    if-eqz p5, :cond_2f

    .line 3
    invoke-virtual {p5, v0, p6}, Ld0/e$c;->b(Landroid/graphics/Typeface;Landroid/os/Handler;)V

    :cond_2f
    return-object v0

    :cond_30
    const/4 v0, 0x1

    if-eqz p7, :cond_38

    .line 4
    iget v4, p1, Ld0/d$d;->c:I

    if-nez v4, :cond_3b

    goto :goto_3a

    :cond_38
    if-nez p5, :cond_3b

    :goto_3a
    move v3, v0

    :cond_3b
    const/4 v0, -0x1

    if-eqz p7, :cond_41

    .line 5
    iget p7, p1, Ld0/d$d;->b:I

    goto :goto_42

    :cond_41
    move p7, v0

    .line 6
    :goto_42
    invoke-static {p6}, Ld0/e$c;->c(Landroid/os/Handler;)Landroid/os/Handler;

    move-result-object p6

    new-instance v4, Le0/d$a;

    invoke-direct {v4, p5}, Le0/d$a;-><init>(Ld0/e$c;)V

    .line 7
    iget-object p1, p1, Ld0/d$d;->a:Li0/e;

    .line 8
    new-instance p5, Li0/c;

    invoke-direct {p5, v4, p6}, Li0/c;-><init>(Li0/m;Landroid/os/Handler;)V

    if-eqz v3, :cond_c8

    sget-object v3, Li0/j;->a:Lr/f;

    .line 9
    new-instance v3, Ljava/lang/StringBuilder;

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

    .line 10
    iget-object v5, p1, Li0/e;->e:Ljava/lang/String;

    .line 11
    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v5, "-"

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

    invoke-virtual {v3, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

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

    move-result-object v3

    .line 12
    sget-object v5, Li0/j;->a:Lr/f;

    invoke-virtual {v5, v3}, Lr/f;->b(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Landroid/graphics/Typeface;

    if-eqz v5, :cond_81

    .line 13
    new-instance p0, Li0/a;

    invoke-direct {p0, p5, v4, v5}, Li0/a;-><init>(Li0/c;Li0/m;Landroid/graphics/Typeface;)V

    invoke-virtual {p6, p0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    move-object v2, v5

    goto/16 :goto_159

    :cond_81
    if-ne p7, v0, :cond_8e

    .line 14
    invoke-static {v3, p0, p1, p4}, Li0/j;->a(Ljava/lang/String;Landroid/content/Context;Li0/e;I)Li0/j$a;

    move-result-object p0

    invoke-virtual {p5, p0}, Li0/c;->a(Li0/j$a;)V

    iget-object v2, p0, Li0/j$a;->a:Landroid/graphics/Typeface;

    goto/16 :goto_159

    :cond_8e
    new-instance p6, Li0/f;

    invoke-direct {p6, v3, p0, p1, p4}, Li0/f;-><init>(Ljava/lang/String;Landroid/content/Context;Li0/e;I)V

    :try_start_93
    sget-object p0, Li0/j;->b:Ljava/util/concurrent/ExecutorService;

    .line 15
    invoke-interface {p0, p6}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;

    move-result-object p0
    :try_end_99
    .catch Ljava/lang/InterruptedException; {:try_start_93 .. :try_end_99} :catch_ba

    int-to-long p6, p7

    :try_start_9a
    sget-object p1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {p0, p6, p7, p1}, Ljava/util/concurrent/Future;->get(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;

    move-result-object p0
    :try_end_a0
    .catch Ljava/util/concurrent/ExecutionException; {:try_start_9a .. :try_end_a0} :catch_b3
    .catch Ljava/lang/InterruptedException; {:try_start_9a .. :try_end_a0} :catch_b1
    .catch Ljava/util/concurrent/TimeoutException; {:try_start_9a .. :try_end_a0} :catch_a9

    .line 16
    :try_start_a0
    check-cast p0, Li0/j$a;

    invoke-virtual {p5, p0}, Li0/c;->a(Li0/j$a;)V

    iget-object v2, p0, Li0/j$a;->a:Landroid/graphics/Typeface;

    goto/16 :goto_159

    .line 17
    :catch_a9
    new-instance p0, Ljava/lang/InterruptedException;

    const-string p1, "timeout"

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

    throw p0

    :catch_b1
    move-exception p0

    throw p0

    :catch_b3
    move-exception p0

    new-instance p1, Ljava/lang/RuntimeException;

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

    throw p1
    :try_end_ba
    .catch Ljava/lang/InterruptedException; {:try_start_a0 .. :try_end_ba} :catch_ba

    .line 18
    :catch_ba
    iget-object p0, p5, Li0/c;->a:Li0/m;

    iget-object p1, p5, Li0/c;->b:Landroid/os/Handler;

    new-instance p6, Li0/b;

    invoke-direct {p6, p5, p0, v1}, Li0/b;-><init>(Li0/c;Li0/m;I)V

    invoke-virtual {p1, p6}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto/16 :goto_159

    .line 19
    :cond_c8
    sget-object p7, Li0/j;->a:Lr/f;

    .line 20
    new-instance p7, Ljava/lang/StringBuilder;

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

    .line 21
    iget-object v0, p1, Li0/e;->e:Ljava/lang/String;

    .line 22
    invoke-virtual {p7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "-"

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

    invoke-virtual {p7, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

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

    move-result-object p7

    .line 23
    sget-object v0, Li0/j;->a:Lr/f;

    invoke-virtual {v0, p7}, Lr/f;->b(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/graphics/Typeface;

    if-eqz v0, :cond_f4

    .line 24
    new-instance p0, Li0/a;

    invoke-direct {p0, p5, v4, v0}, Li0/a;-><init>(Li0/c;Li0/m;Landroid/graphics/Typeface;)V

    invoke-virtual {p6, p0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    move-object v2, v0

    goto :goto_159

    .line 25
    :cond_f4
    new-instance p6, Li0/g;

    invoke-direct {p6, p5}, Li0/g;-><init>(Li0/c;)V

    sget-object v0, Li0/j;->c:Ljava/lang/Object;

    monitor-enter v0

    :try_start_fc
    sget-object p5, Li0/j;->d:Lr/h;

    .line 26
    invoke-virtual {p5, p7, v2}, Lr/h;->getOrDefault(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    .line 27
    check-cast v1, Ljava/util/ArrayList;

    if-eqz v1, :cond_10b

    invoke-virtual {v1, p6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    monitor-exit v0

    goto :goto_159

    :cond_10b
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    invoke-virtual {v1, p6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {p5, p7, v1}, Lr/h;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    monitor-exit v0
    :try_end_117
    .catchall {:try_start_fc .. :try_end_117} :catchall_143

    new-instance p5, Li0/h;

    invoke-direct {p5, p7, p0, p1, p4}, Li0/h;-><init>(Ljava/lang/String;Landroid/content/Context;Li0/e;I)V

    sget-object p0, Li0/j;->b:Ljava/util/concurrent/ExecutorService;

    new-instance p1, Li0/i;

    invoke-direct {p1, p7}, Li0/i;-><init>(Ljava/lang/String;)V

    .line 28
    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object p6

    if-nez p6, :cond_133

    new-instance p6, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object p7

    invoke-direct {p6, p7}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    goto :goto_138

    :cond_133
    new-instance p6, Landroid/os/Handler;

    invoke-direct {p6}, Landroid/os/Handler;-><init>()V

    .line 29
    :goto_138
    new-instance p7, Li0/o;

    invoke-direct {p7, p6, p5, p1}, Li0/o;-><init>(Landroid/os/Handler;Ljava/util/concurrent/Callable;Lk0/a;)V

    check-cast p0, Ljava/util/concurrent/ThreadPoolExecutor;

    invoke-virtual {p0, p7}, Ljava/util/concurrent/ThreadPoolExecutor;->execute(Ljava/lang/Runnable;)V

    goto :goto_159

    :catchall_143
    move-exception p0

    .line 30
    :try_start_144
    monitor-exit v0
    :try_end_145
    .catchall {:try_start_144 .. :try_end_145} :catchall_143

    throw p0

    .line 31
    :cond_146
    sget-object p7, Le0/d;->a:Le0/j;

    check-cast p1, Ld0/d$b;

    invoke-virtual {p7, p0, p1, p2, p4}, Le0/j;->a(Landroid/content/Context;Ld0/d$b;Landroid/content/res/Resources;I)Landroid/graphics/Typeface;

    move-result-object v2

    if-eqz p5, :cond_159

    if-eqz v2, :cond_156

    invoke-virtual {p5, v2, p6}, Ld0/e$c;->b(Landroid/graphics/Typeface;Landroid/os/Handler;)V

    goto :goto_159

    :cond_156
    invoke-virtual {p5, v1, p6}, Ld0/e$c;->a(ILandroid/os/Handler;)V

    :cond_159
    :goto_159
    if-eqz v2, :cond_164

    sget-object p0, Le0/d;->b:Lr/f;

    invoke-static {p2, p3, p4}, Le0/d;->c(Landroid/content/res/Resources;II)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p0, p1, v2}, Lr/f;->c(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_164
    return-object v2
.end method

.method public static b(Landroid/content/Context;Landroid/content/res/Resources;ILjava/lang/String;I)Landroid/graphics/Typeface;
    .registers 11

    sget-object v0, Le0/d;->a:Le0/j;

    move-object v1, p0

    move-object v2, p1

    move v3, p2

    move-object v4, p3

    move v5, p4

    invoke-virtual/range {v0 .. v5}, Le0/j;->d(Landroid/content/Context;Landroid/content/res/Resources;ILjava/lang/String;I)Landroid/graphics/Typeface;

    move-result-object p0

    if-eqz p0, :cond_16

    invoke-static {p1, p2, p4}, Le0/d;->c(Landroid/content/res/Resources;II)Ljava/lang/String;

    move-result-object p1

    sget-object p2, Le0/d;->b:Lr/f;

    invoke-virtual {p2, p1, p0}, Lr/f;->c(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_16
    return-object p0
.end method

.method public static c(Landroid/content/res/Resources;II)Ljava/lang/String;
    .registers 4

    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0, p1}, Landroid/content/res/Resources;->getResourcePackageName(I)Ljava/lang/String;

    move-result-object p0

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

    const-string p0, "-"

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

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

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

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

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

    move-result-object p0

    return-object p0
.end method
