.class Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;
.super Ljava/lang/Object;
.source "SettingDevelopConsoleFragment.java"

# interfaces
.implements Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment;->a(Landroid/preference/Preference;Ljava/lang/String;)V
.end annotation

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


# instance fields
.field final synthetic a:Landroid/widget/EditText;

.field final synthetic b:Landroid/widget/EditText;

.field final synthetic c:Lorg/json/JSONArray;

.field final synthetic d:Landroid/widget/TextView;

.field final synthetic e:Lorg/json/JSONObject;

.field final synthetic f:Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment;


# direct methods
.method constructor <init>(Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment;Landroid/widget/EditText;Landroid/widget/EditText;Lorg/json/JSONArray;Landroid/widget/TextView;Lorg/json/JSONObject;)V
    .locals 0

    .line 333
    iput-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->f:Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment;

    iput-object p2, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->a:Landroid/widget/EditText;

    iput-object p3, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->b:Landroid/widget/EditText;

    iput-object p4, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->c:Lorg/json/JSONArray;

    iput-object p5, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->d:Landroid/widget/TextView;

    iput-object p6, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->e:Lorg/json/JSONObject;

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

    return-void
.end method


# virtual methods
.method public a(Lcom/moji/dialog/MJDialog;Lcom/moji/dialog/type/ETypeAction;)V
    .locals 2
    .param p1    # Lcom/moji/dialog/MJDialog;
        .annotation build Landroid/support/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Lcom/moji/dialog/type/ETypeAction;
        .annotation build Landroid/support/annotation/NonNull;
        .end annotation
    .end param

    .line 336
    iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->a:Landroid/widget/EditText;

    invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object p1

    .line 337
    iget-object p2, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->b:Landroid/widget/EditText;

    invoke-virtual {p2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object p2

    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object p2

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

    move-result v0

    if-eqz v0, :cond_0

    .line 339
    iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->f:Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment;

    invoke-virtual {p1}, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment;->getActivity()Landroid/app/Activity;

    move-result-object p1

    const-string p2, "key \u4e0d\u80fd\u4e3a\u7a7a"

    const/4 v0, 0x0

    invoke-static {p1, p2, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

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

    return-void

    .line 342
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->a:Landroid/widget/EditText;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 343
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->b:Landroid/widget/EditText;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 345
    :try_start_0
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->c:Lorg/json/JSONArray;

    invoke-virtual {v0}, Lorg/json/JSONArray;->length()I

    move-result v0

    .line 346
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    .line 347
    invoke-virtual {v1, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 348
    iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->c:Lorg/json/JSONArray;

    invoke-virtual {p1, v0, v1}, Lorg/json/JSONArray;->put(ILjava/lang/Object;)Lorg/json/JSONArray;

    .line 349
    iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->d:Landroid/widget/TextView;

    iget-object p2, p0, Lcom/moji/mjweather/setting/fragment/SettingDevelopConsoleFragment$9;->e:Lorg/json/JSONObject;

    invoke-virtual {p2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    const-string p2, "SettingDevelopConsoleFr"

    .line 351
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_0
    return-void
.end method
