bfz.smali

.class public Ldxoptimizer/bfz;
.super Ljava/lang/Object;
.source "PushMessageHandler.java"


# instance fields
.field private a:Landroid/content/Context;


# direct methods
.method constructor <init>(Landroid/content/Context;)V
    .registers 2

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

    .line 43
    iput-object p1, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    .line 44
    return-void
.end method

.method static synthetic a(Ldxoptimizer/bfz;)Landroid/content/Context;
    .registers 2

    .prologue
    .line 34
    iget-object v0, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    return-object v0
.end method

.method private a(Lorg/json/JSONObject;)V
    .registers 7

    .prologue
    .line 91
    :try_start_0
    const-string v0, "intent_params"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 92
    const-string v1, "push_paras"

    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v1

    .line 93
    iget-object v2, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    invoke-static {v2, v0}, Ldxoptimizer/bft;->a(Landroid/content/Context;Lorg/json/JSONObject;)Landroid/content/Intent;

    move-result-object v0

    .line 94
    iget-object v2, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    invoke-static {v2, v0, v1}, Ldxoptimizer/bft;->a(Landroid/content/Context;Landroid/content/Intent;Lorg/json/JSONObject;)Ldxoptimizer/cgd;

    move-result-object v0

    .line 95
    const-string v2, "is_toast"

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z

    move-result v2

    .line 96
    const-string v3, "is_warn"

    const/4 v4, 0x0

    invoke-virtual {v1, v3, v4}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z

    move-result v3

    .line 97
    if-eqz v0, :cond_34

    .line 98
    iget v4, v0, Ldxoptimizer/cgd;->o:I

    if-nez v4, :cond_35

    .line 99
    const/4 v1, 0x2

    iput v1, v0, Ldxoptimizer/cgd;->o:I

    .line 100
    iget-object v1, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    invoke-static {v1, v0}, Ldxoptimizer/cge;->a(Landroid/content/Context;Ldxoptimizer/cgd;)V

    .line 124
    :cond_34
    :goto_34
    return-void

    .line 101
    :cond_35
    iget-boolean v4, v0, Ldxoptimizer/cgd;->m:Z

    if-eqz v4, :cond_7e

    if-eqz v2, :cond_7e

    .line 102
    new-instance v2, Ldxoptimizer/bga;

    invoke-direct {v2}, Ldxoptimizer/bga;-><init>()V

    .line 103
    const/4 v4, 0x1

    iput v4, v2, Ldxoptimizer/bga;->j:I

    .line 104
    iget-object v4, v0, Ldxoptimizer/cgd;->c:Ljava/lang/CharSequence;

    iput-object v4, v2, Ldxoptimizer/bga;->c:Ljava/lang/CharSequence;

    .line 105
    iget-object v4, v0, Ldxoptimizer/cgd;->d:Landroid/app/PendingIntent;

    iput-object v4, v2, Ldxoptimizer/bga;->b:Landroid/app/PendingIntent;

    .line 106
    iget-object v4, v0, Ldxoptimizer/cgd;->n:Ljava/lang/CharSequence;

    iput-object v4, v2, Ldxoptimizer/bga;->g:Ljava/lang/CharSequence;

    .line 107
    iget v4, v0, Ldxoptimizer/cgd;->f:I

    iput v4, v2, Ldxoptimizer/bga;->l:I

    .line 108
    iget v4, v0, Ldxoptimizer/cgd;->o:I

    iput v4, v2, Ldxoptimizer/bga;->m:I

    .line 109
    const-string v4, "right_click_key"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Ldxoptimizer/bga;->i:Ljava/lang/String;

    .line 110
    const-string v4, "left_click_key"

    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v2, Ldxoptimizer/bga;->h:Ljava/lang/String;

    .line 111
    if-eqz v3, :cond_6e

    .line 112
    const v1, 0x7f02025c

    iput v1, v2, Ldxoptimizer/bga;->e:I

    .line 114
    :cond_6e
    new-instance v1, Ldxoptimizer/bfy;

    invoke-direct {v1, v0, v2}, Ldxoptimizer/bfy;-><init>(Ldxoptimizer/cgd;Ldxoptimizer/bga;)V

    .line 115
    iget-object v0, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    invoke-static {v0, v1}, Ldxoptimizer/bfr;->a(Landroid/content/Context;Ldxoptimizer/bfp;)V
    :try_end_78
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_78} :catch_79

    goto :goto_34

    .line 121
    :catch_79
    move-exception v0

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

    goto :goto_34

    .line 117
    :cond_7e
    :try_start_7e
    new-instance v1, Ldxoptimizer/bfx;

    iget-boolean v2, v0, Ldxoptimizer/cgd;->m:Z

    invoke-direct {v1, v0, v2}, Ldxoptimizer/bfx;-><init>(Ldxoptimizer/cgd;Z)V

    .line 118
    iget-object v0, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    invoke-static {v0, v1}, Ldxoptimizer/bfr;->a(Landroid/content/Context;Ldxoptimizer/bfp;)V
    :try_end_8a
    .catch Lorg/json/JSONException; {:try_start_7e .. :try_end_8a} :catch_79

    goto :goto_34
.end method

.method private b(Lorg/json/JSONObject;)V
    .registers 7

    .prologue
    .line 129
    :try_start_0
    const-string v0, "intent_params"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 130
    const-string v1, "push_paras"

    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v1

    .line 131
    iget-object v2, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    invoke-static {v2, v0}, Ldxoptimizer/bft;->a(Landroid/content/Context;Lorg/json/JSONObject;)Landroid/content/Intent;

    move-result-object v0

    .line 132
    const-string v2, "picture_url"

    invoke-virtual {v1, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 133
    const-string v3, "priority"

    invoke-virtual {v1, v3}, Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I

    move-result v1

    .line 134
    invoke-static {}, Ldxoptimizer/cbn;->a()Ldxoptimizer/cbn;

    move-result-object v3

    new-instance v4, Ldxoptimizer/bfz$1;

    invoke-direct {v4, p0, v2, v0, v1}, Ldxoptimizer/bfz$1;-><init>(Ldxoptimizer/bfz;Ljava/lang/String;Landroid/content/Intent;I)V

    invoke-virtual {v3, v4}, Ldxoptimizer/cbn;->b(Ljava/lang/Runnable;)V
    :try_end_2a
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_2a} :catch_2b

    .line 180
    :goto_2a
    return-void

    .line 177
    :catch_2b
    move-exception v0

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

    goto :goto_2a
.end method

.method private c(Lorg/json/JSONObject;)V
    .registers 5

    .prologue
    .line 186
    :try_start_0
    const-string v0, "push_paras"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 187
    const-string v1, "picture_url"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 188
    if-eqz v0, :cond_1b

    .line 189
    invoke-static {}, Ldxoptimizer/cbn;->a()Ldxoptimizer/cbn;

    move-result-object v1

    new-instance v2, Ldxoptimizer/bfz$2;

    invoke-direct {v2, p0, v0, p1}, Ldxoptimizer/bfz$2;-><init>(Ldxoptimizer/bfz;Ljava/lang/String;Lorg/json/JSONObject;)V

    const/4 v0, 0x4

    invoke-virtual {v1, v2, v0}, Ldxoptimizer/cbn;->a(Ljava/lang/Runnable;I)V
    :try_end_1b
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_1b} :catch_1c

    .line 219
    :cond_1b
    :goto_1b
    return-void

    .line 216
    :catch_1c
    move-exception v0

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

    goto :goto_1b
.end method


# virtual methods
.method public a(Lcom/dianxinos/optimizer/server/RecommendInfo;)V
    .registers 7

    .prologue
    const/4 v1, 0x0

    const/4 v0, 0x1

    .line 48
    :try_start_2
    new-instance v2, Lorg/json/JSONObject;

    iget-object v3, p1, Lcom/dianxinos/optimizer/server/RecommendInfo;->content:Ljava/lang/String;

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

    .line 49
    const-string v3, "competitive_paras"

    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v3

    .line 52
    if-eqz v3, :cond_1f

    .line 53
    const-string v0, "pkgs"

    const/4 v1, 0x0

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

    move-result-object v1

    .line 54
    const-string v0, "need_show"

    const/4 v4, 0x1

    invoke-virtual {v3, v0, v4}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z

    move-result v0

    .line 56
    :cond_1f
    if-nez v0, :cond_29

    iget-object v0, p0, Ldxoptimizer/bfz;->a:Landroid/content/Context;

    invoke-static {v0, v1}, Ldxoptimizer/bft;->b(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_32

    .line 57
    :cond_29
    const-string v0, "msg_type"

    invoke-virtual {v2, v0}, Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I

    move-result v0

    .line 58
    packed-switch v0, :pswitch_data_5e

    .line 76
    :cond_32
    :goto_32
    new-instance v0, Lorg/json/JSONObject;

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

    .line 77
    const-string v1, "msg_pmi"

    iget-object v2, p1, Lcom/dianxinos/optimizer/server/RecommendInfo;->recommendId:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 78
    const-string v1, "msg_j_c"

    invoke-static {v1, v0}, Ldxoptimizer/cgh;->a(Ljava/lang/String;Lorg/json/JSONObject;)V

    .line 79
    const-string v0, "msg_c"

    const-string v1, "msg_pt"

    const/4 v2, 0x1

    .line 80
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    .line 79
    invoke-static {v0, v1, v2}, Ldxoptimizer/cgh;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Number;)V

    .line 86
    :goto_4f
    return-void

    .line 60
    :pswitch_50
    invoke-direct {p0, v2}, Ldxoptimizer/bfz;->a(Lorg/json/JSONObject;)V

    goto :goto_32

    .line 81
    :catch_54
    move-exception v0

    goto :goto_4f

    .line 63
    :pswitch_56
    invoke-direct {p0, v2}, Ldxoptimizer/bfz;->b(Lorg/json/JSONObject;)V

    goto :goto_32

    .line 66
    :pswitch_5a
    invoke-direct {p0, v2}, Ldxoptimizer/bfz;->c(Lorg/json/JSONObject;)V
    :try_end_5d
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_5d} :catch_54

    goto :goto_32

    .line 58
    :pswitch_data_5e
    .packed-switch 0x1
        :pswitch_50
        :pswitch_56
        :pswitch_5a
    .end packed-switch
.end method