.class public final synthetic Li4/k;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Landroidx/activity/result/b;
.implements Landroidx/lifecycle/u;


# instance fields
.field public final synthetic r:I

.field public final synthetic s:Lcom/floydwiz/gamingcenter/activities/MainActivity;


# direct methods
.method public synthetic constructor <init>(Lcom/floydwiz/gamingcenter/activities/MainActivity;I)V
    .registers 4

    iput p2, p0, Li4/k;->r:I

    const/4 v0, 0x1

    if-eq p2, v0, :cond_6

    const/4 v0, 0x2

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

    iput-object p1, p0, Li4/k;->s:Lcom/floydwiz/gamingcenter/activities/MainActivity;

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/Object;)V
    .registers 4

    iget-object v0, p0, Li4/k;->s:Lcom/floydwiz/gamingcenter/activities/MainActivity;

    check-cast p1, Landroid/net/Uri;

    sget v1, Lcom/floydwiz/gamingcenter/activities/MainActivity;->N:I

    const-string v1, "this$0"

    .line 1
    invoke-static {v0, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    if-nez p1, :cond_e

    goto :goto_1d

    :cond_e
    invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->J:Ljava/lang/String;

    iget-object v0, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->H:Ls4/o;

    if-eqz v0, :cond_1e

    .line 2
    iget-object v0, v0, Ls4/o;->n:Landroidx/lifecycle/t;

    invoke-virtual {v0, p1}, Landroidx/lifecycle/t;->k(Ljava/lang/Object;)V

    :goto_1d
    return-void

    :cond_1e
    const-string p1, "viewModel"

    .line 3
    invoke-static {p1}, Lx/e;->m(Ljava/lang/String;)V

    const/4 p1, 0x0

    throw p1
.end method

.method public d(Ljava/lang/Object;)V
    .registers 11

    iget v0, p0, Li4/k;->r:I

    const/4 v1, 0x0

    const/4 v2, 0x1

    const-string v3, "viewModel"

    const/4 v4, 0x0

    const-string v5, "this$0"

    packed-switch v0, :pswitch_data_162

    goto/16 :goto_12d

    :pswitch_e
    iget-object v0, p0, Li4/k;->s:Lcom/floydwiz/gamingcenter/activities/MainActivity;

    check-cast p1, Ljava/lang/Integer;

    sget v2, Lcom/floydwiz/gamingcenter/activities/MainActivity;->N:I

    .line 1
    invoke-static {v0, v5}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    if-eqz p1, :cond_32

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    invoke-static {v0, p1, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    iget-object p1, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->H:Ls4/o;

    if-eqz p1, :cond_2e

    .line 2
    iget-object p1, p1, Ls4/o;->c:Landroidx/lifecycle/t;

    .line 3
    invoke-virtual {p1, v1}, Landroidx/lifecycle/t;->k(Ljava/lang/Object;)V

    goto :goto_32

    :cond_2e
    invoke-static {v3}, Lx/e;->m(Ljava/lang/String;)V

    throw v1

    :cond_32
    :goto_32
    return-void

    .line 4
    :pswitch_33
    iget-object v0, p0, Li4/k;->s:Lcom/floydwiz/gamingcenter/activities/MainActivity;

    check-cast p1, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse;

    sget v6, Lcom/floydwiz/gamingcenter/activities/MainActivity;->N:I

    .line 5
    invoke-static {v0, v5}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v5, "game_centre"

    if-nez p1, :cond_41

    goto :goto_5d

    :cond_41
    invoke-virtual {p1}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse;->getLatestVersionCode()Ljava/lang/Integer;

    move-result-object v6

    if-nez v6, :cond_48

    goto :goto_5d

    :cond_48
    invoke-virtual {v6}, Ljava/lang/Number;->intValue()I

    move-result v6

    .line 6
    invoke-virtual {v0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v7

    const-string v8, "LATEST_AVAILABLE_VERSION_CODE"

    invoke-interface {v7, v8, v6}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->apply()V

    :goto_5d
    if-nez p1, :cond_60

    goto :goto_78

    .line 7
    :cond_60
    invoke-virtual {p1}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse;->getLatestVersionMd5()Ljava/lang/String;

    move-result-object v6

    if-nez v6, :cond_67

    goto :goto_78

    .line 8
    :cond_67
    invoke-virtual {v0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v7

    const-string v8, "LATEST_AVAILABLE_VERSION_MD5"

    invoke-interface {v7, v8, v6}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->apply()V

    :goto_78
    if-nez p1, :cond_7b

    goto :goto_93

    .line 9
    :cond_7b
    invoke-virtual {p1}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse;->getLatestVersionUrl()Ljava/lang/String;

    move-result-object v6

    if-nez v6, :cond_82

    goto :goto_93

    .line 10
    :cond_82
    invoke-virtual {v0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v7

    const-string v8, "LATEST_AVAILABLE_VERSION_URL"

    invoke-interface {v7, v8, v6}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->apply()V

    :goto_93
    if-nez p1, :cond_96

    goto :goto_ae

    .line 11
    :cond_96
    invoke-virtual {p1}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse;->getPartnerAppUrl()Ljava/lang/String;

    move-result-object v6

    if-nez v6, :cond_9d

    goto :goto_ae

    .line 12
    :cond_9d
    invoke-virtual {v0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v7

    const-string v8, "APP_PARTNER_AVAILABLE_URL"

    invoke-interface {v7, v8, v6}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->apply()V

    :goto_ae
    if-nez p1, :cond_b1

    goto :goto_c9

    .line 13
    :cond_b1
    invoke-virtual {p1}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse;->getPartnerAppMd5()Ljava/lang/String;

    move-result-object v6

    if-nez v6, :cond_b8

    goto :goto_c9

    .line 14
    :cond_b8
    invoke-virtual {v0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v7

    const-string v8, "APP_PARTNER_AVAILABLE_MD5"

    invoke-interface {v7, v8, v6}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->apply()V

    :goto_c9
    const-string v6, "APP_PARTNER_AVAILABLE_PACKAGE_NAME"

    if-nez p1, :cond_ce

    goto :goto_e4

    .line 15
    :cond_ce
    invoke-virtual {p1}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse;->getPartnerAppPackageName()Ljava/lang/String;

    move-result-object p1

    if-nez p1, :cond_d5

    goto :goto_e4

    .line 16
    :cond_d5
    invoke-virtual {v0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v7

    invoke-interface {v7}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v7

    invoke-interface {v7, v6, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object p1

    invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V

    .line 17
    :goto_e4
    iget-object p1, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->H:Ls4/o;

    if-eqz p1, :cond_129

    .line 18
    iget-object v7, p1, Ls4/o;->q:Ls4/q;

    invoke-static {p1}, Lp/a;->e(Landroidx/lifecycle/c0;)Lq9/w;

    move-result-object p1

    invoke-virtual {v7, p1, v0}, Ls4/q;->f(Lq9/w;Landroid/content/Context;)V

    .line 19
    iget-object p1, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->H:Ls4/o;

    if-eqz p1, :cond_125

    .line 20
    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    const-string v3, ""

    .line 21
    invoke-virtual {v0, v5, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v5

    invoke-interface {v5, v6, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    if-nez v5, :cond_106

    goto :goto_107

    :cond_106
    move-object v3, v5

    :goto_107
    const-string v5, "pm"

    .line 22
    invoke-static {v1, v5}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    .line 23
    :try_start_10c
    invoke-virtual {v1, v3, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
    :try_end_10f
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_10c .. :try_end_10f} :catch_110

    goto :goto_111

    :catch_110
    move v2, v4

    :goto_111
    if-eqz v2, :cond_11b

    new-array p1, v4, [Ljava/lang/Object;

    const-string v0, "debugpartnerapp Partner app is already installed!"

    .line 24
    invoke-static {v0, p1}, Lbb/a;->b(Ljava/lang/String;[Ljava/lang/Object;)V

    goto :goto_124

    :cond_11b
    iget-object v1, p1, Ls4/o;->q:Ls4/q;

    invoke-static {p1}, Lp/a;->e(Landroidx/lifecycle/c0;)Lq9/w;

    move-result-object p1

    invoke-virtual {v1, p1, v0}, Ls4/q;->e(Lq9/w;Landroid/content/Context;)V

    :goto_124
    return-void

    .line 25
    :cond_125
    invoke-static {v3}, Lx/e;->m(Ljava/lang/String;)V

    throw v1

    :cond_129
    invoke-static {v3}, Lx/e;->m(Ljava/lang/String;)V

    throw v1

    .line 26
    :goto_12d
    iget-object v0, p0, Li4/k;->s:Lcom/floydwiz/gamingcenter/activities/MainActivity;

    check-cast p1, Ljava/lang/Boolean;

    sget v6, Lcom/floydwiz/gamingcenter/activities/MainActivity;->N:I

    .line 27
    invoke-static {v0, v5}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    iget-object v5, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->K:Landroidx/appcompat/app/b;

    if-eqz v5, :cond_160

    invoke-virtual {v5}, Landroid/app/Dialog;->isShowing()Z

    move-result v5

    if-ne v5, v2, :cond_141

    goto :goto_142

    :cond_141
    move v2, v4

    :goto_142
    if-eqz v2, :cond_160

    sget-object v2, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;

    invoke-static {p1, v2}, Lx/e;->a(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_160

    iget-object p1, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->K:Landroidx/appcompat/app/b;

    if-nez p1, :cond_151

    goto :goto_154

    :cond_151
    invoke-virtual {p1}, Lf/m;->dismiss()V

    :goto_154
    iget-object p1, v0, Lcom/floydwiz/gamingcenter/activities/MainActivity;->H:Ls4/o;

    if-eqz p1, :cond_15c

    invoke-virtual {p1, v0}, Ls4/o;->e(Landroid/content/Context;)V

    goto :goto_160

    :cond_15c
    invoke-static {v3}, Lx/e;->m(Ljava/lang/String;)V

    throw v1

    :cond_160
    :goto_160
    return-void

    nop

    :pswitch_data_162
    .packed-switch 0x1
        :pswitch_33
        :pswitch_e
    .end packed-switch
.end method
