a.smali

.class public final Lsg/bigo/bigohttp/a;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field private static a:Lsg/bigo/bigohttp/dns/d; = null

.field private static b:Z = false


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

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method

.method public static a()Lokhttp3/x$a;
    .registers 1

    .line 38
    new-instance v0, Lsg/bigo/bigohttp/b;

    invoke-direct {v0}, Lsg/bigo/bigohttp/b;-><init>()V

    invoke-static {v0}, Lsg/bigo/bigohttp/a;->a(Lsg/bigo/bigohttp/b;)Lokhttp3/x$a;

    move-result-object v0

    return-object v0
.end method

.method public static a(Lokhttp3/x;)Lokhttp3/x$a;
    .registers 1

    .line 42
    invoke-virtual {p0}, Lokhttp3/x;->b()Lokhttp3/x$a;

    move-result-object p0

    return-object p0
.end method

.method public static a(Lsg/bigo/bigohttp/b;)Lokhttp3/x$a;
    .registers 9

    .line 46
    invoke-static {}, Lsg/bigo/bigohttp/c;->a()Z

    move-result v0

    if-eqz v0, :cond_118

    .line 49
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    .line 1058
    iget-boolean v1, p0, Lsg/bigo/bigohttp/b;->h:Z

    if-eqz v1, :cond_16

    .line 50
    invoke-static {}, Lsg/bigo/bigohttp/a;->c()Z

    move-result v1

    if-eqz v1, :cond_16

    const/4 v1, 0x1

    goto :goto_17

    :cond_16
    const/4 v1, 0x0

    .line 51
    :goto_17
    new-instance v2, Lokhttp3/x$a;

    invoke-direct {v2}, Lokhttp3/x$a;-><init>()V

    if-eqz v1, :cond_25

    .line 53
    invoke-static {v0}, Lsg/bigo/bigohttp/a;->b(Lsg/bigo/bigohttp/d;)Lsg/bigo/bigohttp/dns/d;

    move-result-object v1

    invoke-virtual {v2, v1}, Lokhttp3/x$a;->a(Lokhttp3/o;)Lokhttp3/x$a;

    .line 2030
    :cond_25
    iget-object v1, p0, Lsg/bigo/bigohttp/b;->a:Ljava/lang/String;

    if-nez v1, :cond_2c

    .line 2063
    iget-object v1, v0, Lsg/bigo/bigohttp/d;->b:Ljava/lang/String;

    goto :goto_2e

    .line 3030
    :cond_2c
    iget-object v1, p0, Lsg/bigo/bigohttp/b;->a:Ljava/lang/String;

    .line 60
    :goto_2e
    invoke-static {}, Lsg/bigo/bigohttp/a;->f()Z

    move-result v3

    if-eqz v3, :cond_44

    .line 3066
    iget-boolean v3, p0, Lsg/bigo/bigohttp/b;->j:Z

    if-eqz v3, :cond_44

    .line 61
    new-instance v3, Lsg/bigo/bigohttp/linkd/c;

    .line 3115
    iget-object v4, v0, Lsg/bigo/bigohttp/d;->o:Lsg/bigo/bigohttp/linkd/LinkdChannel;

    .line 4046
    iget-boolean v5, p0, Lsg/bigo/bigohttp/b;->e:Z

    .line 61
    invoke-direct {v3, v4, v5}, Lsg/bigo/bigohttp/linkd/c;-><init>(Lsg/bigo/bigohttp/linkd/LinkdChannel;Z)V

    invoke-virtual {v2, v3}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 65
    :cond_44
    new-instance v3, Lsg/bigo/bigohttp/b/e;

    invoke-direct {v3}, Lsg/bigo/bigohttp/b/e;-><init>()V

    invoke-virtual {v2, v3}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 68
    invoke-static {}, Lsg/bigo/bigohttp/a;->e()Z

    move-result v3

    if-eqz v3, :cond_67

    .line 4070
    iget-boolean v3, p0, Lsg/bigo/bigohttp/b;->k:Z

    if-eqz v3, :cond_67

    .line 69
    new-instance v3, Lsg/bigo/bigohttp/stat/e;

    invoke-direct {v3}, Lsg/bigo/bigohttp/stat/e;-><init>()V

    invoke-virtual {v2, v3}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    move-result-object v3

    new-instance v4, Lsg/bigo/bigohttp/stat/g;

    invoke-direct {v4}, Lsg/bigo/bigohttp/stat/g;-><init>()V

    .line 70
    invoke-virtual {v3, v4}, Lokhttp3/x$a;->b(Lokhttp3/u;)Lokhttp3/x$a;

    .line 73
    :cond_67
    new-instance v3, Lsg/bigo/bigohttp/b/f;

    invoke-direct {v3}, Lsg/bigo/bigohttp/b/f;-><init>()V

    invoke-virtual {v2, v3}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    move-result-object v3

    new-instance v4, Lsg/bigo/bigohttp/b/d;

    invoke-direct {v4}, Lsg/bigo/bigohttp/b/d;-><init>()V

    .line 74
    invoke-virtual {v3, v4}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    move-result-object v3

    new-instance v4, Lsg/bigo/bigohttp/b/g;

    invoke-direct {v4}, Lsg/bigo/bigohttp/b/g;-><init>()V

    .line 75
    invoke-virtual {v3, v4}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 77
    invoke-static {}, Lsg/bigo/bigohttp/a;->g()Z

    move-result v3

    const/4 v4, 0x0

    if-eqz v3, :cond_9c

    .line 5046
    iget-boolean v3, p0, Lsg/bigo/bigohttp/b;->e:Z

    if-eqz v3, :cond_9c

    .line 78
    new-instance v3, Lsg/bigo/bigohttp/token/a;

    .line 6046
    iget-boolean v5, p0, Lsg/bigo/bigohttp/b;->e:Z

    if-eqz v5, :cond_95

    .line 6075
    iget-object v5, v0, Lsg/bigo/bigohttp/d;->e:Lsg/bigo/bigohttp/token/ITokenHelper;

    goto :goto_96

    :cond_95
    move-object v5, v4

    .line 79
    :goto_96
    invoke-direct {v3, v5}, Lsg/bigo/bigohttp/token/a;-><init>(Lsg/bigo/bigohttp/token/ITokenHelper;)V

    .line 78
    invoke-virtual {v2, v3}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 82
    :cond_9c
    new-instance v3, Lsg/bigo/bigohttp/b/a;

    .line 7034
    iget-boolean v5, p0, Lsg/bigo/bigohttp/b;->b:Z

    if-eqz v5, :cond_a3

    goto :goto_a4

    :cond_a3
    move-object v1, v4

    .line 7038
    :goto_a4
    iget-boolean v5, p0, Lsg/bigo/bigohttp/b;->c:Z

    if-eqz v5, :cond_ab

    .line 7071
    iget-object v5, v0, Lsg/bigo/bigohttp/d;->d:Lsg/bigo/bigohttp/helper/ICommonFieldsHelper;

    goto :goto_ac

    :cond_ab
    move-object v5, v4

    .line 8042
    :goto_ac
    iget-boolean v6, p0, Lsg/bigo/bigohttp/b;->d:Z

    if-eqz v6, :cond_b3

    .line 8079
    iget-object v6, v0, Lsg/bigo/bigohttp/d;->f:Lsg/bigo/bigohttp/helper/ISignHelper;

    goto :goto_b4

    :cond_b3
    move-object v6, v4

    .line 9050
    :goto_b4
    iget-boolean v7, p0, Lsg/bigo/bigohttp/b;->f:Z

    if-eqz v7, :cond_ba

    .line 9083
    iget-object v4, v0, Lsg/bigo/bigohttp/d;->g:Lsg/bigo/bigohttp/helper/IBigoHashHelper;

    .line 86
    :cond_ba
    invoke-direct {v3, v1, v5, v6, v4}, Lsg/bigo/bigohttp/b/a;-><init>(Ljava/lang/String;Lsg/bigo/bigohttp/helper/ICommonFieldsHelper;Lsg/bigo/bigohttp/helper/ISignHelper;Lsg/bigo/bigohttp/helper/IBigoHashHelper;)V

    .line 82
    invoke-virtual {v2, v3}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 10074
    iget-boolean v0, p0, Lsg/bigo/bigohttp/b;->l:Z

    if-eqz v0, :cond_d2

    .line 88
    invoke-static {}, Lsg/bigo/bigohttp/a;->h()Z

    move-result v0

    if-eqz v0, :cond_d2

    .line 89
    new-instance v0, Lsg/bigo/bigohttp/domainfronting/b;

    invoke-direct {v0}, Lsg/bigo/bigohttp/domainfronting/b;-><init>()V

    invoke-virtual {v2, v0}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 11054
    :cond_d2
    iget-boolean v0, p0, Lsg/bigo/bigohttp/b;->g:Z

    if-eqz v0, :cond_e4

    .line 92
    invoke-static {}, Lsg/bigo/bigohttp/a;->b()Z

    move-result v0

    if-eqz v0, :cond_e4

    .line 93
    new-instance v0, Lsg/bigo/bigohttp/hostreplace/b;

    invoke-direct {v0}, Lsg/bigo/bigohttp/hostreplace/b;-><init>()V

    invoke-virtual {v2, v0}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 11062
    :cond_e4
    iget-boolean v0, p0, Lsg/bigo/bigohttp/b;->i:Z

    if-eqz v0, :cond_fc

    .line 96
    invoke-static {}, Lsg/bigo/bigohttp/a;->d()Z

    move-result v0

    if-eqz v0, :cond_fc

    invoke-static {p0}, Lsg/bigo/bigohttp/a;->b(Lsg/bigo/bigohttp/b;)Z

    move-result p0

    if-eqz p0, :cond_fc

    .line 97
    new-instance p0, Lsg/bigo/bigohttp/c/a;

    invoke-direct {p0}, Lsg/bigo/bigohttp/c/a;-><init>()V

    invoke-virtual {v2, p0}, Lokhttp3/x$a;->a(Lokhttp3/u;)Lokhttp3/x$a;

    .line 100
    :cond_fc
    new-instance p0, Lsg/bigo/bigohttp/b/c;

    invoke-direct {p0}, Lsg/bigo/bigohttp/b/c;-><init>()V

    invoke-virtual {v2, p0}, Lokhttp3/x$a;->b(Lokhttp3/u;)Lokhttp3/x$a;

    .line 101
    invoke-static {}, Lsg/bigo/bigohttp/c;->c()Z

    move-result p0

    if-nez p0, :cond_112

    .line 102
    new-instance p0, Lsg/bigo/bigohttp/b/b;

    invoke-direct {p0}, Lsg/bigo/bigohttp/b/b;-><init>()V

    invoke-virtual {v2, p0}, Lokhttp3/x$a;->b(Lokhttp3/u;)Lokhttp3/x$a;

    .line 105
    :cond_112
    sget-object p0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-virtual {v2, p0}, Lokhttp3/x$a;->b(Ljava/util/concurrent/TimeUnit;)Lokhttp3/x$a;

    return-object v2

    .line 47
    :cond_118
    new-instance p0, Ljava/lang/RuntimeException;

    const-string v0, "you should call init first!"

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

    throw p0
.end method

.method public static declared-synchronized a(Lsg/bigo/bigohttp/d;)V
    .registers 6

    const-class v0, Lsg/bigo/bigohttp/a;

    monitor-enter v0

    .line 11123
    :try_start_3
    sget-boolean v1, Lsg/bigo/bigohttp/a;->b:Z

    if-nez v1, :cond_49

    .line 12059
    iget-object v1, p0, Lsg/bigo/bigohttp/d;->a:Landroid/content/Context;

    .line 113
    invoke-static {v1}, Lsg/bigo/bigohttp/utils/a;->a(Landroid/content/Context;)V

    .line 114
    invoke-static {p0}, Lsg/bigo/bigohttp/c;->a(Lsg/bigo/bigohttp/d;)V

    .line 115
    invoke-static {}, Lsg/bigo/bigohttp/a;->e()Z

    move-result v1

    if-eqz v1, :cond_44

    .line 116
    invoke-static {}, Lsg/bigo/bigohttp/stat/f;->a()Lsg/bigo/bigohttp/stat/f;

    .line 12111
    iget-object v1, p0, Lsg/bigo/bigohttp/d;->n:Lsg/bigo/bigohttp/stat/IReportHttpStat;

    .line 116
    invoke-static {v1}, Lsg/bigo/bigohttp/stat/f;->a(Lsg/bigo/bigohttp/stat/IReportHttpStat;)V

    .line 13059
    iget-object p0, p0, Lsg/bigo/bigohttp/d;->a:Landroid/content/Context;

    .line 117
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object p0

    check-cast p0, Landroid/app/Application;

    .line 14008
    invoke-static {}, Lsg/bigo/bigohttp/stat/f;->a()Lsg/bigo/bigohttp/stat/f;

    move-result-object v1

    .line 14042
    new-instance v2, Lsg/bigo/bigohttp/stat/NetworkReceiver;

    invoke-direct {v2}, Lsg/bigo/bigohttp/stat/NetworkReceiver;-><init>()V

    .line 15023
    invoke-static {}, Lsg/bigo/bigohttp/stat/c;->a()Landroid/os/Handler;

    move-result-object v3

    new-instance v4, Lsg/bigo/bigohttp/stat/NetworkReceiver$1;

    invoke-direct {v4, v2, p0}, Lsg/bigo/bigohttp/stat/NetworkReceiver$1;-><init>(Lsg/bigo/bigohttp/stat/NetworkReceiver;Landroid/content/Context;)V

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

    .line 15082
    iput-object v1, v2, Lsg/bigo/bigohttp/stat/NetworkReceiver;->a:Lsg/bigo/bigohttp/stat/NetworkStateListener;

    .line 14045
    new-instance v1, Lsg/bigo/bigohttp/stat/a;

    invoke-direct {v1}, Lsg/bigo/bigohttp/stat/a;-><init>()V

    .line 16008
    invoke-virtual {p0, v1}, Landroid/app/Application;->registerActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V

    :cond_44
    const/4 p0, 0x1

    .line 119
    sput-boolean p0, Lsg/bigo/bigohttp/a;->b:Z
    :try_end_47
    .catchall {:try_start_3 .. :try_end_47} :catchall_51

    .line 120
    monitor-exit v0

    return-void

    .line 111
    :cond_49
    :try_start_49
    new-instance p0, Ljava/lang/RuntimeException;

    const-string v1, "BigoHttpClient can only init once!"

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

    throw p0
    :try_end_51
    .catchall {:try_start_49 .. :try_end_51} :catchall_51

    :catchall_51
    move-exception p0

    monitor-exit v0

    throw p0
.end method

.method private static declared-synchronized b(Lsg/bigo/bigohttp/d;)Lsg/bigo/bigohttp/dns/d;
    .registers 3

    const-class v0, Lsg/bigo/bigohttp/a;

    monitor-enter v0

    .line 127
    :try_start_3
    sget-object v1, Lsg/bigo/bigohttp/a;->a:Lsg/bigo/bigohttp/dns/d;

    if-nez v1, :cond_19

    .line 16091
    iget-object p0, p0, Lsg/bigo/bigohttp/d;->j:Lsg/bigo/bigohttp/dns/IDnsConfig;

    if-eqz p0, :cond_12

    .line 130
    invoke-interface {p0}, Lsg/bigo/bigohttp/dns/IDnsConfig;->getDNSStragegyType()I

    move-result p0

    invoke-static {p0}, Lsg/bigo/bigohttp/dns/e;->a(I)V

    .line 132
    :cond_12
    new-instance p0, Lsg/bigo/bigohttp/dns/d;

    invoke-direct {p0}, Lsg/bigo/bigohttp/dns/d;-><init>()V

    sput-object p0, Lsg/bigo/bigohttp/a;->a:Lsg/bigo/bigohttp/dns/d;

    .line 134
    :cond_19
    sget-object p0, Lsg/bigo/bigohttp/a;->a:Lsg/bigo/bigohttp/dns/d;
    :try_end_1b
    .catchall {:try_start_3 .. :try_end_1b} :catchall_1d

    monitor-exit v0

    return-object p0

    :catchall_1d
    move-exception p0

    monitor-exit v0

    throw p0
.end method

.method private static b()Z
    .registers 1

    .line 138
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    if-eqz v0, :cond_c

    .line 17087
    iget-object v0, v0, Lsg/bigo/bigohttp/d;->h:Lsg/bigo/bigohttp/hostreplace/IHostSwitcher;

    if-eqz v0, :cond_c

    const/4 v0, 0x1

    return v0

    :cond_c
    const/4 v0, 0x0

    return v0
.end method

.method private static b(Lsg/bigo/bigohttp/b;)Z
    .registers 3

    .line 19046
    iget-boolean p0, p0, Lsg/bigo/bigohttp/b;->e:Z

    const/4 v0, 0x1

    if-nez p0, :cond_6

    return v0

    .line 182
    :cond_6
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object p0

    const/4 v1, 0x0

    if-nez p0, :cond_e

    return v1

    .line 19075
    :cond_e
    iget-object p0, p0, Lsg/bigo/bigohttp/d;->e:Lsg/bigo/bigohttp/token/ITokenHelper;

    if-nez p0, :cond_13

    return v0

    :cond_13
    return v1
.end method

.method private static c()Z
    .registers 1

    .line 143
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    if-eqz v0, :cond_c

    .line 17091
    iget-object v0, v0, Lsg/bigo/bigohttp/d;->j:Lsg/bigo/bigohttp/dns/IDnsConfig;

    if-eqz v0, :cond_c

    const/4 v0, 0x1

    return v0

    :cond_c
    const/4 v0, 0x0

    return v0
.end method

.method private static d()Z
    .registers 1

    .line 148
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    if-eqz v0, :cond_c

    .line 17107
    iget-object v0, v0, Lsg/bigo/bigohttp/d;->m:Lsg/bigo/bigohttp/helper/ISchemeChangeHelper;

    if-eqz v0, :cond_c

    const/4 v0, 0x1

    return v0

    :cond_c
    const/4 v0, 0x0

    return v0
.end method

.method private static e()Z
    .registers 1

    .line 153
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    if-eqz v0, :cond_c

    .line 17111
    iget-object v0, v0, Lsg/bigo/bigohttp/d;->n:Lsg/bigo/bigohttp/stat/IReportHttpStat;

    if-eqz v0, :cond_c

    const/4 v0, 0x1

    return v0

    :cond_c
    const/4 v0, 0x0

    return v0
.end method

.method private static f()Z
    .registers 1

    .line 158
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    if-eqz v0, :cond_c

    .line 17115
    iget-object v0, v0, Lsg/bigo/bigohttp/d;->o:Lsg/bigo/bigohttp/linkd/LinkdChannel;

    if-eqz v0, :cond_c

    const/4 v0, 0x1

    return v0

    :cond_c
    const/4 v0, 0x0

    return v0
.end method

.method private static g()Z
    .registers 1

    .line 163
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    if-eqz v0, :cond_c

    .line 18075
    iget-object v0, v0, Lsg/bigo/bigohttp/d;->e:Lsg/bigo/bigohttp/token/ITokenHelper;

    if-eqz v0, :cond_c

    const/4 v0, 0x1

    return v0

    :cond_c
    const/4 v0, 0x0

    return v0
.end method

.method private static h()Z
    .registers 1

    .line 168
    invoke-static {}, Lsg/bigo/bigohttp/c;->b()Lsg/bigo/bigohttp/d;

    move-result-object v0

    if-eqz v0, :cond_c

    .line 18119
    iget-object v0, v0, Lsg/bigo/bigohttp/d;->p:Lsg/bigo/bigohttp/domainfronting/IDomainFrontingSwitcher;

    if-eqz v0, :cond_c

    const/4 v0, 0x1

    return v0

    :cond_c
    const/4 v0, 0x0

    return v0
.end method