.class public Lcom/moji/mjad/avatar/AvatarCardAdControl;
.super Lcom/moji/mjad/base/AdClickDataControl;
.source "AvatarCardAdControl.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/mjad/base/AdClickDataControl<",
        "Lcom/moji/mjad/avatar/data/AvatarCard;",
        ">;"
    }
.end annotation


# static fields
.field private static final TAG:Ljava/lang/String; = "AvatarCardAdControl"


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 25
    invoke-direct {p0, p1}, Lcom/moji/mjad/base/AdClickDataControl;-><init>(Landroid/content/Context;)V

    return-void
.end method


# virtual methods
.method public recordClick()V
    .locals 7

    .line 30
    invoke-virtual {p0}, Lcom/moji/mjad/avatar/AvatarCardAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v0

    check-cast v0, Lcom/moji/mjad/avatar/data/AvatarCard;

    if-eqz v0, :cond_2

    .line 31
    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    if-eqz v1, :cond_2

    .line 32
    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_DRESS_ASSISTANT_CARD_ONE:Lcom/moji/mjad/enumdata/MojiAdPosition;

    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_DRESS_ASSISTANT_CARD_TWO:Lcom/moji/mjad/enumdata/MojiAdPosition;

    .line 33
    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_DRESS_ASSISTANT_CARD_THREE:Lcom/moji/mjad/enumdata/MojiAdPosition;

    .line 34
    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    goto :goto_0

    .line 36
    :cond_0
    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_AVATAR_SUIT_CLOTHES_CARD:Lcom/moji/mjad/enumdata/MojiAdPosition;

    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

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

    move-result-object v1

    sget-object v2, Lcom/moji/statistics/EVENT_TAG;->NEW_AD_WEATHER_AVATAR_SUIT_CARD1_CLICK:Lcom/moji/statistics/EVENT_TAG;

    iget-wide v3, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->id:J

    invoke-static {v3, v4}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v3

    new-instance v4, Lcom/moji/statistics/EventParams;

    invoke-direct {v4}, Lcom/moji/statistics/EventParams;-><init>()V

    sget-object v5, Lcom/moji/statistics/EVENT_RECEIVER;->MIAOZHEN:Lcom/moji/statistics/EVENT_RECEIVER;

    iget-object v6, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->clickStaticsUrl:Ljava/lang/String;

    invoke-virtual {v4, v5, v6}, Lcom/moji/statistics/EventParams;->setParams(Lcom/moji/statistics/EVENT_RECEIVER;Ljava/lang/String;)Lcom/moji/statistics/EventParams;

    move-result-object v4

    iget-object v0, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->adClickParams:Ljava/lang/String;

    invoke-virtual {v4, v0}, Lcom/moji/statistics/EventParams;->setNewAdParams(Ljava/lang/String;)Lcom/moji/statistics/EventParams;

    move-result-object v0

    invoke-virtual {v1, v2, v3, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lcom/moji/statistics/EventParams;)Lcom/moji/statistics/EventManager;
    :try_end_0
    .catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    const-string v1, "AvatarCardAdControl"

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

    goto :goto_1

    .line 35
    :cond_1
    :goto_0
    invoke-super {p0}, Lcom/moji/mjad/base/AdClickDataControl;->recordClick()V

    :cond_2
    :goto_1
    return-void
.end method

.method public recordShow()V
    .locals 7

    .line 48
    invoke-virtual {p0}, Lcom/moji/mjad/avatar/AvatarCardAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v0

    check-cast v0, Lcom/moji/mjad/avatar/data/AvatarCard;

    if-eqz v0, :cond_2

    .line 49
    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    if-eqz v1, :cond_2

    .line 50
    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_DRESS_ASSISTANT_CARD_ONE:Lcom/moji/mjad/enumdata/MojiAdPosition;

    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_DRESS_ASSISTANT_CARD_TWO:Lcom/moji/mjad/enumdata/MojiAdPosition;

    .line 51
    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_DRESS_ASSISTANT_CARD_THREE:Lcom/moji/mjad/enumdata/MojiAdPosition;

    .line 52
    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    goto :goto_0

    .line 54
    :cond_0
    iget-object v1, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    sget-object v2, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_AVATAR_SUIT_CLOTHES_CARD:Lcom/moji/mjad/enumdata/MojiAdPosition;

    invoke-virtual {v1, v2}, Lcom/moji/mjad/enumdata/MojiAdPosition;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

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

    move-result-object v1

    sget-object v2, Lcom/moji/statistics/EVENT_TAG;->NEW_AD_WEATHER_AVATAR_SUIT_CARD1_SHOW:Lcom/moji/statistics/EVENT_TAG;

    iget-wide v3, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->id:J

    invoke-static {v3, v4}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v3

    new-instance v4, Lcom/moji/statistics/EventParams;

    invoke-direct {v4}, Lcom/moji/statistics/EventParams;-><init>()V

    sget-object v5, Lcom/moji/statistics/EVENT_RECEIVER;->MIAOZHEN:Lcom/moji/statistics/EVENT_RECEIVER;

    iget-object v6, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->showStaticsUrl:Ljava/lang/String;

    invoke-virtual {v4, v5, v6}, Lcom/moji/statistics/EventParams;->setParams(Lcom/moji/statistics/EVENT_RECEIVER;Ljava/lang/String;)Lcom/moji/statistics/EventParams;

    move-result-object v4

    iget-object v0, v0, Lcom/moji/mjad/avatar/data/AvatarCard;->adShowParams:Ljava/lang/String;

    invoke-virtual {v4, v0}, Lcom/moji/statistics/EventParams;->setNewAdParams(Ljava/lang/String;)Lcom/moji/statistics/EventParams;

    move-result-object v0

    invoke-virtual {v1, v2, v3, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lcom/moji/statistics/EventParams;)Lcom/moji/statistics/EventManager;

    goto :goto_1

    .line 53
    :cond_1
    :goto_0
    invoke-super {p0}, Lcom/moji/mjad/base/AdClickDataControl;->recordShow()V

    :cond_2
    :goto_1
    return-void
.end method
