.class public Lcom/moji/user/homepage/ChoiceCertificateActivity;
.super Lcom/moji/base/MJActivity;
.source "ChoiceCertificateActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Lcom/moji/titlebar/MJTitleBar;

.field private b:Landroid/view/View;

.field private c:Landroid/view/View;

.field private i:I


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 27
    invoke-direct {p0}, Lcom/moji/base/MJActivity;-><init>()V

    const/4 v0, -0x2

    .line 31
    iput v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->i:I

    return-void
.end method

.method private a()V
    .locals 1

    .line 49
    sget v0, Lcom/moji/user/R$id;->title_layout:I

    invoke-virtual {p0, v0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/moji/titlebar/MJTitleBar;

    iput-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->a:Lcom/moji/titlebar/MJTitleBar;

    .line 50
    sget v0, Lcom/moji/user/R$id;->rl_personal_certificate:I

    invoke-virtual {p0, v0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->b:Landroid/view/View;

    .line 51
    sget v0, Lcom/moji/user/R$id;->rl_company_certificate:I

    invoke-virtual {p0, v0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->c:Landroid/view/View;

    return-void
.end method

.method private b()V
    .locals 3

    .line 55
    iget-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->a:Lcom/moji/titlebar/MJTitleBar;

    sget v1, Lcom/moji/user/R$string;->choice_certificate:I

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setTitleText(I)V

    .line 56
    iget-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->a:Lcom/moji/titlebar/MJTitleBar;

    new-instance v1, Lcom/moji/user/homepage/ChoiceCertificateActivity$1;

    sget v2, Lcom/moji/user/R$drawable;->activity_choice_certificate_help:I

    invoke-direct {v1, p0, v2}, Lcom/moji/user/homepage/ChoiceCertificateActivity$1;-><init>(Lcom/moji/user/homepage/ChoiceCertificateActivity;I)V

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->a(Lcom/moji/titlebar/MJTitleBar$Action;)Landroid/view/View;

    .line 65
    iget-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->b:Landroid/view/View;

    new-instance v1, Lcom/moji/tool/drawable/MJStateDrawable;

    sget v2, Lcom/moji/user/R$drawable;->activity_choice_certificate_personal:I

    invoke-direct {v1, v2}, Lcom/moji/tool/drawable/MJStateDrawable;-><init>(I)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 66
    iget-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->c:Landroid/view/View;

    new-instance v1, Lcom/moji/tool/drawable/MJStateDrawable;

    sget v2, Lcom/moji/user/R$drawable;->activity_choice_certificate_company:I

    invoke-direct {v1, v2}, Lcom/moji/tool/drawable/MJStateDrawable;-><init>(I)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 68
    iget-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->b:Landroid/view/View;

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 69
    iget-object v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->c:Landroid/view/View;

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method private b(I)V
    .locals 1

    .line 86
    iget v0, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->i:I

    packed-switch v0, :pswitch_data_0

    .line 101
    sget p1, Lcom/moji/user/R$string;->status_error:I

    invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(I)V

    goto :goto_0

    .line 98
    :pswitch_0
    invoke-direct {p0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->c()V

    goto :goto_0

    .line 95
    :pswitch_1
    invoke-direct {p0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->c()V

    goto :goto_0

    .line 92
    :pswitch_2
    invoke-direct {p0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->c()V

    goto :goto_0

    .line 89
    :pswitch_3
    invoke-direct {p0, p1}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->c(I)V

    :goto_0
    return-void

    nop

    :pswitch_data_0
    .packed-switch -0x2
        :pswitch_3
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method private c()V
    .locals 2

    .line 114
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/moji/user/homepage/CertificateResultActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 115
    invoke-virtual {p0, v0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method private c(I)V
    .locals 2

    .line 107
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/moji/user/homepage/ApplyCertificateActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "extra_data_type"

    .line 108
    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 109
    invoke-virtual {p0, v0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->startActivity(Landroid/content/Intent;)V

    .line 110
    sget p1, Lcom/moji/user/R$anim;->activity_open_right_in:I

    sget v0, Lcom/moji/user/R$anim;->activity_open_right_out:I

    invoke-virtual {p0, p1, v0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->overridePendingTransition(II)V

    return-void
.end method


# virtual methods
.method public connectivityChange(Lcom/moji/user/homepage/event/CertificateStatusChangeEvent;)V
    .locals 0
    .annotation runtime Lorg/greenrobot/eventbus/Subscribe;
        a = .enum Lorg/greenrobot/eventbus/ThreadMode;->MAIN:Lorg/greenrobot/eventbus/ThreadMode;
    .end annotation

    .line 120
    iget p1, p1, Lcom/moji/user/homepage/event/CertificateStatusChangeEvent;->a:I

    iput p1, p0, Lcom/moji/user/homepage/ChoiceCertificateActivity;->i:I

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    .line 74
    invoke-static {}, Lcom/moji/tool/Utils;->b()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    .line 77
    :cond_0
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result p1

    .line 78
    sget v0, Lcom/moji/user/R$id;->rl_personal_certificate:I

    if-ne p1, v0, :cond_1

    const/4 p1, 0x1

    .line 79
    invoke-direct {p0, p1}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->b(I)V

    goto :goto_0

    .line 80
    :cond_1
    sget v0, Lcom/moji/user/R$id;->rl_company_certificate:I

    if-ne p1, v0, :cond_2

    const/4 p1, 0x2

    .line 81
    invoke-direct {p0, p1}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->b(I)V

    :cond_2
    :goto_0
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    .line 35
    invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onCreate(Landroid/os/Bundle;)V

    .line 36
    invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/account/data/AccountProvider;->f()Z

    move-result p1

    if-nez p1, :cond_0

    .line 37
    sget p1, Lcom/moji/user/R$string;->string_not_login:I

    invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(I)V

    .line 38
    invoke-virtual {p0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->finish()V

    return-void

    .line 41
    :cond_0
    sget p1, Lcom/moji/user/R$layout;->activity_choice_certificate:I

    invoke-virtual {p0, p1}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->setContentView(I)V

    .line 42
    invoke-direct {p0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->a()V

    .line 43
    invoke-direct {p0}, Lcom/moji/user/homepage/ChoiceCertificateActivity;->b()V

    .line 44
    invoke-static {}, Lcom/moji/bus/Bus;->a()Lcom/moji/bus/Bus;

    move-result-object p1

    invoke-virtual {p1, p0}, Lcom/moji/bus/Bus;->a(Ljava/lang/Object;)V

    .line 45
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object p1

    sget-object v0, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_AUTHENTICATION_QUESTION:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {p1, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .line 125
    invoke-super {p0}, Lcom/moji/base/MJActivity;->onDestroy()V

    .line 126
    invoke-static {}, Lcom/moji/bus/Bus;->a()Lcom/moji/bus/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/moji/bus/Bus;->b(Ljava/lang/Object;)V

    return-void
.end method
