.class Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;
.super Lcom/moji/tool/thread/task/MJAsyncTask;
.source "CreditTaskHelper.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/credit/CreditTaskHelper;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "LoginDoneTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/tool/thread/task/MJAsyncTask<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field private a:Ljava/lang/ref/SoftReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/SoftReference<",
            "Landroid/content/Context;",
            ">;"
        }
    .end annotation
.end field

.field private b:Lcom/moji/credit/CreditTaskType;

.field private c:Z

.field private d:Ljava/lang/String;

.field private e:Z

.field private f:I

.field private g:I


# direct methods
.method constructor <init>(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;ZLjava/lang/String;Z)V
    .locals 2

    .line 307
    sget-object v0, Lcom/moji/tool/thread/ThreadPriority;->NORMAL:Lcom/moji/tool/thread/ThreadPriority;

    invoke-direct {p0, v0}, Lcom/moji/tool/thread/task/MJAsyncTask;-><init>(Lcom/moji/tool/thread/ThreadPriority;)V

    const/4 v0, 0x0

    .line 300
    iput-boolean v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->c:Z

    const/4 v1, 0x0

    .line 301
    iput-object v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->d:Ljava/lang/String;

    .line 302
    iput-boolean v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->e:Z

    const/4 v0, -0x1

    .line 303
    iput v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->f:I

    .line 304
    iput v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->g:I

    .line 308
    iput-object p2, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    .line 309
    iput-boolean p3, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->c:Z

    .line 310
    iput-object p4, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->d:Ljava/lang/String;

    .line 311
    iput-boolean p5, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->e:Z

    .line 312
    new-instance p2, Ljava/lang/ref/SoftReference;

    invoke-direct {p2, p1}, Ljava/lang/ref/SoftReference;-><init>(Ljava/lang/Object;)V

    iput-object p2, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a:Ljava/lang/ref/SoftReference;

    .line 313
    iput v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->f:I

    return-void
.end method

.method private a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;)I
    .locals 0

    if-eqz p1, :cond_1

    if-nez p2, :cond_0

    goto :goto_0

    .line 390
    :cond_0
    new-instance p1, Lcom/moji/http/cs/CreditTaskDoneRequest;

    iget p2, p2, Lcom/moji/credit/CreditTaskType;->taskType:I

    invoke-direct {p1, p2}, Lcom/moji/http/cs/CreditTaskDoneRequest;-><init>(I)V

    .line 391
    new-instance p2, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask$1;

    invoke-direct {p2, p0}, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask$1;-><init>(Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;)V

    invoke-virtual {p1, p2}, Lcom/moji/http/cs/CreditTaskDoneRequest;->b(Lcom/moji/requestcore/MJBaseHttpCallback;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/moji/http/cs/entity/CreditTaskDoneResp;

    goto :goto_1

    :cond_1
    :goto_0
    const/4 p1, -0x1

    .line 388
    iput p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->g:I

    .line 404
    :goto_1
    iget p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->g:I

    return p1
.end method

.method static synthetic a(Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;I)I
    .locals 0

    .line 297
    iput p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->f:I

    return p1
.end method

.method static synthetic b(Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;I)I
    .locals 0

    .line 297
    iput p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->g:I

    return p1
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Void;)Ljava/lang/Boolean;
    .locals 7

    .line 344
    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a:Ljava/lang/ref/SoftReference;

    invoke-virtual {p1}, Ljava/lang/ref/SoftReference;->get()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/content/Context;

    const/4 v0, 0x0

    if-nez p1, :cond_0

    .line 346
    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1

    .line 349
    :cond_0
    iget-object v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    const/4 v2, 0x1

    invoke-static {p1, v1, v2}, Lcom/moji/credit/CreditTaskHelper;->a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;Z)Z

    move-result v1

    const-string v3, "CreditTaskHelper"

    .line 350
    new-instance v4, Ljava/lang/StringBuilder;

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

    const-string v5, "taskValid:"

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

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

    const-string v5, " type:"

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

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    iget-object v6, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    iget v6, v6, Lcom/moji/credit/CreditTaskType;->taskNameRes:I

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

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

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

    move-result-object v4

    invoke-static {v3, v4}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    if-eqz v1, :cond_6

    .line 352
    iget-object v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    sget-object v3, Lcom/moji/credit/CreditTaskType;->COMPLETE_PERSONAL_INFO:Lcom/moji/credit/CreditTaskType;

    if-ne v1, v3, :cond_3

    .line 354
    sget-object v1, Lcom/moji/credit/CreditTaskType;->UPLOAD_FACE_CHANGE_NICK:Lcom/moji/credit/CreditTaskType;

    invoke-direct {p0, p1, v1}, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;)I

    move-result v1

    .line 355
    sget-object v3, Lcom/moji/credit/CreditTaskType;->COMPLETE_PERSONAL_INFO:Lcom/moji/credit/CreditTaskType;

    invoke-direct {p0, p1, v3}, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;)I

    move-result v3

    if-lez v1, :cond_1

    add-int/2addr v1, v0

    .line 358
    sget-object v4, Lcom/moji/credit/CreditTaskType;->UPLOAD_FACE_CHANGE_NICK:Lcom/moji/credit/CreditTaskType;

    invoke-static {p1, v4}, Lcom/moji/credit/CreditTaskHelper;->c(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;)V

    goto :goto_0

    :cond_1
    const/4 v1, 0x0

    :goto_0
    if-lez v3, :cond_2

    add-int/2addr v1, v3

    .line 362
    sget-object v3, Lcom/moji/credit/CreditTaskType;->COMPLETE_PERSONAL_INFO:Lcom/moji/credit/CreditTaskType;

    invoke-static {p1, v3}, Lcom/moji/credit/CreditTaskHelper;->c(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;)V

    :cond_2
    if-lez v1, :cond_6

    .line 365
    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    invoke-virtual {p1, v1}, Lcom/moji/credit/CreditTaskType;->setTaskPoint(I)V

    goto :goto_1

    .line 369
    :cond_3
    iget-object v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    invoke-direct {p0, p1, v1}, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;)I

    move-result v1

    if-lez v1, :cond_6

    .line 371
    iget-object v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    invoke-virtual {v0, v1}, Lcom/moji/credit/CreditTaskType;->setTaskPoint(I)V

    .line 372
    iget-object v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    invoke-static {p1, v0}, Lcom/moji/credit/CreditTaskHelper;->c(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;)V

    .line 374
    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    sget-object v0, Lcom/moji/credit/CreditTaskType;->COMPLETE_PERSONAL_INFO:Lcom/moji/credit/CreditTaskType;

    if-eq p1, v0, :cond_4

    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    sget-object v0, Lcom/moji/credit/CreditTaskType;->UPLOAD_FACE_CHANGE_NICK:Lcom/moji/credit/CreditTaskType;

    if-eq p1, v0, :cond_4

    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    sget-object v0, Lcom/moji/credit/CreditTaskType;->REGISTER_LOGIN:Lcom/moji/credit/CreditTaskType;

    if-ne p1, v0, :cond_5

    .line 377
    :cond_4
    sput-boolean v2, Lcom/moji/credit/EarnCreditActivity;->needUpdate:Z

    .line 378
    invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;

    move-result-object p1

    new-instance v0, Lcom/moji/credit/CreditEvent;

    const/16 v1, 0xc

    invoke-direct {v0, v1}, Lcom/moji/credit/CreditEvent;-><init>(I)V

    invoke-virtual {p1, v0}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V

    :cond_5
    :goto_1
    const/4 v0, 0x1

    .line 383
    :cond_6
    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1
.end method

.method protected bridge synthetic a([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 0

    .line 297
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a([Ljava/lang/Void;)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1
.end method

.method protected a(Ljava/lang/Boolean;)V
    .locals 3

    .line 318
    invoke-super {p0, p1}, Lcom/moji/tool/thread/task/MJAsyncTask;->a(Ljava/lang/Object;)V

    .line 319
    iget-object v0, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a:Ljava/lang/ref/SoftReference;

    invoke-virtual {v0}, Ljava/lang/ref/SoftReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/content/Context;

    if-nez v0, :cond_0

    return-void

    .line 323
    :cond_0
    iget-boolean v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->e:Z

    if-eqz v1, :cond_1

    .line 324
    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a:Ljava/lang/ref/SoftReference;

    invoke-virtual {p1}, Ljava/lang/ref/SoftReference;->clear()V

    return-void

    .line 327
    :cond_1
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    if-eqz p1, :cond_3

    const/4 p1, 0x1

    .line 328
    sput-boolean p1, Lcom/moji/credit/MyCreditActivity;->mNeedRefreshCredit:Z

    .line 329
    iget-object v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    invoke-static {v0, v1, p1}, Lcom/moji/credit/util/CreditToast;->a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;Z)V

    .line 330
    iget v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->f:I

    if-lez v1, :cond_2

    .line 331
    sget-object v1, Lcom/moji/credit/CreditTaskType;->DAY_ALL_DONE:Lcom/moji/credit/CreditTaskType;

    .line 332
    iget v2, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->f:I

    invoke-virtual {v1, v2}, Lcom/moji/credit/CreditTaskType;->setTaskPoint(I)V

    .line 333
    invoke-static {v0, v1, p1}, Lcom/moji/credit/util/CreditToast;->a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;Z)V

    .line 335
    :cond_2
    invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;

    move-result-object p1

    new-instance v0, Lcom/moji/credit/CreditEvent;

    const/16 v1, 0xd

    invoke-direct {v0, v1}, Lcom/moji/credit/CreditEvent;-><init>(I)V

    invoke-virtual {p1, v0}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V

    goto :goto_0

    .line 336
    :cond_3
    iget-boolean p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->c:Z

    if-eqz p1, :cond_4

    .line 337
    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->b:Lcom/moji/credit/CreditTaskType;

    iget-object v1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->d:Ljava/lang/String;

    invoke-static {v0, p1, v1}, Lcom/moji/credit/util/CreditToast;->a(Landroid/content/Context;Lcom/moji/credit/CreditTaskType;Ljava/lang/String;)V

    .line 339
    :cond_4
    :goto_0
    iget-object p1, p0, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a:Ljava/lang/ref/SoftReference;

    invoke-virtual {p1}, Ljava/lang/ref/SoftReference;->clear()V

    return-void
.end method

.method protected bridge synthetic a(Ljava/lang/Object;)V
    .locals 0

    .line 297
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lcom/moji/credit/CreditTaskHelper$LoginDoneTask;->a(Ljava/lang/Boolean;)V

    return-void
.end method
