.class Lcom/moji/mjweather/tabme/ToolGridAdapter$1;
.super Ljava/lang/Object;
.source "ToolGridAdapter.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjweather/tabme/ToolGridAdapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.end annotation

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


# instance fields
.field final synthetic a:I

.field final synthetic b:Lcom/moji/mjweather/tabme/ToolGridAdapter;


# direct methods
.method constructor <init>(Lcom/moji/mjweather/tabme/ToolGridAdapter;I)V
    .locals 0

    .line 178
    iput-object p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    iput p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->a:I

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

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 4

    .line 181
    iget v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->a:I

    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-le v0, v1, :cond_0

    return-void

    .line 182
    :cond_0
    iget v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->a:I

    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-ge v0, v1, :cond_a

    .line 183
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->c(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Ljava/util/ArrayList;

    move-result-object v0

    iget v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->a:I

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    .line 184
    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    move-result-object v1

    if-eqz v1, :cond_1

    iget-object v1, v0, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_expand:Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;

    if-eqz v1, :cond_1

    iget-object v1, v0, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_expand:Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;

    iget-object v1, v1, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;->is_menu:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, v0, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_expand:Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;

    iget-object v1, v1, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;->is_menu:Ljava/lang/String;

    const-string v2, "1"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 185
    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    iget-object v2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v2}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    move-result-object v2

    invoke-interface {v2}, Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;->a()Lcom/moji/mjad/common/control/CommonAdControl;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a(Lcom/moji/mjweather/tabme/ToolGridAdapter;Lcom/moji/mjad/common/control/CommonAdControl;)Lcom/moji/mjad/common/control/CommonAdControl;

    .line 186
    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    move-result-object v1

    invoke-interface {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;->b()Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    move-result-object v1

    if-eqz v1, :cond_1

    .line 187
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    move-result-object v0

    invoke-interface {v0}, Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;->b()Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    move-result-object v0

    .line 190
    :cond_1
    iget v1, v0, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->adIndex:I

    const/4 v2, 0x0

    if-lez v1, :cond_6

    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->e(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjad/common/control/CommonAdControl;

    move-result-object v1

    if-eqz v1, :cond_6

    .line 195
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->e(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjad/common/control/CommonAdControl;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/mjad/common/control/CommonAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v0

    check-cast v0, Lcom/moji/mjad/common/data/AdCommon;

    iget-object v0, v0, Lcom/moji/mjad/common/data/AdCommon;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    .line 196
    sget-object v1, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_MY_PAGE_DYNAMIC_MENU:Lcom/moji/mjad/enumdata/MojiAdPosition;

    if-ne v0, v1, :cond_3

    .line 197
    new-instance v1, Lcom/moji/mjad/reddot/db/RedDotDbManager;

    invoke-direct {v1}, Lcom/moji/mjad/reddot/db/RedDotDbManager;-><init>()V

    iget v3, v0, Lcom/moji/mjad/enumdata/MojiAdPosition;->value:I

    invoke-virtual {v1, v3}, Lcom/moji/mjad/reddot/db/RedDotDbManager;->a(I)Lcom/moji/mjad/reddot/data/AdRedDot;

    move-result-object v1

    if-eqz v1, :cond_2

    .line 198
    iget-boolean v1, v1, Lcom/moji/mjad/reddot/data/AdRedDot;->d:Z

    if-nez v1, :cond_2

    .line 199
    new-instance v1, Lcom/moji/mjad/reddot/db/RedDotDbManager;

    invoke-direct {v1}, Lcom/moji/mjad/reddot/db/RedDotDbManager;-><init>()V

    iget v0, v0, Lcom/moji/mjad/enumdata/MojiAdPosition;->value:I

    invoke-virtual {v1, v0}, Lcom/moji/mjad/reddot/db/RedDotDbManager;->b(I)V

    .line 201
    :cond_2
    invoke-static {}, Lcom/moji/redpoint/RedPointManager;->a()Lcom/moji/redpoint/RedPointManager;

    move-result-object v0

    sget-object v1, Lcom/moji/badge/BadgeEvent$TYPE;->MESSAGE_NUM_AD:Lcom/moji/badge/BadgeEvent$TYPE;

    invoke-virtual {v0, v2, v1}, Lcom/moji/redpoint/RedPointManager;->a(ZLcom/moji/badge/BadgeEvent$TYPE;)V

    goto :goto_0

    .line 202
    :cond_3
    sget-object v1, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_MY_PAGE_DYNAMIC_MENU_TWO:Lcom/moji/mjad/enumdata/MojiAdPosition;

    if-ne v0, v1, :cond_5

    .line 203
    new-instance v1, Lcom/moji/mjad/reddot/db/RedDotDbManager;

    invoke-direct {v1}, Lcom/moji/mjad/reddot/db/RedDotDbManager;-><init>()V

    iget v3, v0, Lcom/moji/mjad/enumdata/MojiAdPosition;->value:I

    invoke-virtual {v1, v3}, Lcom/moji/mjad/reddot/db/RedDotDbManager;->a(I)Lcom/moji/mjad/reddot/data/AdRedDot;

    move-result-object v1

    if-eqz v1, :cond_4

    .line 204
    iget-boolean v1, v1, Lcom/moji/mjad/reddot/data/AdRedDot;->d:Z

    if-nez v1, :cond_4

    .line 205
    new-instance v1, Lcom/moji/mjad/reddot/db/RedDotDbManager;

    invoke-direct {v1}, Lcom/moji/mjad/reddot/db/RedDotDbManager;-><init>()V

    iget v0, v0, Lcom/moji/mjad/enumdata/MojiAdPosition;->value:I

    invoke-virtual {v1, v0}, Lcom/moji/mjad/reddot/db/RedDotDbManager;->b(I)V

    .line 207
    :cond_4
    invoke-static {}, Lcom/moji/redpoint/RedPointManager;->a()Lcom/moji/redpoint/RedPointManager;

    move-result-object v0

    sget-object v1, Lcom/moji/badge/BadgeEvent$TYPE;->MESSAGE_NUM_AD_TWO:Lcom/moji/badge/BadgeEvent$TYPE;

    invoke-virtual {v0, v2, v1}, Lcom/moji/redpoint/RedPointManager;->a(ZLcom/moji/badge/BadgeEvent$TYPE;)V

    .line 209
    :cond_5
    :goto_0
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->e(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjad/common/control/CommonAdControl;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/moji/mjad/common/control/CommonAdControl;->setClick(Landroid/view/View;)V

    goto :goto_2

    .line 213
    :cond_6
    new-instance p1, Lcom/moji/mjweather/tabme/MeData;

    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/TabMeFragment;

    move-result-object v1

    if-nez v1, :cond_7

    goto :goto_1

    :cond_7
    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->g(Lcom/moji/mjweather/tabme/ToolGridAdapter;)I

    move-result v1

    const/16 v2, 0xc

    if-ne v1, v2, :cond_8

    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/TabMeFragment;

    move-result-object v1

    iget v2, v1, Lcom/moji/mjweather/tabme/TabMeFragment;->b:I

    goto :goto_1

    :cond_8
    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/TabMeFragment;

    move-result-object v1

    iget v2, v1, Lcom/moji/mjweather/tabme/TabMeFragment;->c:I

    :goto_1
    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p1, v0, v1}, Lcom/moji/mjweather/tabme/MeData;-><init>(Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;Ljava/lang/String;)V

    .line 214
    invoke-virtual {p1}, Lcom/moji/mjweather/tabme/MeData;->h()I

    move-result v0

    if-nez v0, :cond_9

    return-void

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

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->ME_CONTENT_CLICK:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {p1}, Lcom/moji/mjweather/tabme/MeData;->k()J

    move-result-wide v2

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

    move-result-object v2

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

    .line 216
    new-instance v0, Lcom/moji/mjad/Commerce;

    invoke-direct {v0}, Lcom/moji/mjad/Commerce;-><init>()V

    iget-object v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;->b:Lcom/moji/mjweather/tabme/ToolGridAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/TabMeFragment;

    move-result-object v1

    invoke-virtual {v1}, Lcom/moji/mjweather/tabme/TabMeFragment;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v0, v1, p1}, Lcom/moji/mjad/Commerce;->a(Landroid/content/Context;Lcom/moji/mjweather/tabme/MeData;)V

    :cond_a
    :goto_2
    return-void
.end method
