.class Lcom/moji/credit/CreditWebActivity$5;
.super Ljava/lang/Object;
.source "CreditWebActivity.java"

# interfaces
.implements Lcom/moji/webview/jsfunction/MojiJsSdk$OnCallNativeListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/credit/CreditWebActivity;->j()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/credit/CreditWebActivity;


# direct methods
.method constructor <init>(Lcom/moji/credit/CreditWebActivity;)V
    .locals 0

    .line 229
    iput-object p1, p0, Lcom/moji/credit/CreditWebActivity$5;->a:Lcom/moji/credit/CreditWebActivity;

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

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;)Ljava/lang/String;
    .locals 2

    .line 232
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 233
    iget-object p1, p0, Lcom/moji/credit/CreditWebActivity$5;->a:Lcom/moji/credit/CreditWebActivity;

    const/4 v0, 0x0

    invoke-static {p1, v0}, Lcom/moji/credit/CreditWebActivity;->a(Lcom/moji/credit/CreditWebActivity;Z)Ljava/lang/String;

    move-result-object p1

    return-object p1

    .line 236
    :cond_0
    :try_start_0
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string p1, "key"

    .line 237
    invoke-virtual {v0, p1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v1, "value"

    .line 238
    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    const-string v0, "credits"

    .line 239
    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_1

    .line 240
    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
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 243
    invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V

    .line 245
    :cond_1
    :goto_0
    iget-object p1, p0, Lcom/moji/credit/CreditWebActivity$5;->a:Lcom/moji/credit/CreditWebActivity;

    const/4 v0, 0x1

    invoke-static {p1, v0}, Lcom/moji/credit/CreditWebActivity;->a(Lcom/moji/credit/CreditWebActivity;Z)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method
