.class Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;
.super Lcom/moji/mjad/avatar/network/AvatarStarResourceRequestCallback;
.source "AvatarStarResourceReceiver.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;->onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.end annotation

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


# instance fields
.field final synthetic a:Lcom/moji/common/area/AreaInfo;

.field final synthetic b:Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;


# direct methods
.method constructor <init>(Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;Lcom/moji/common/area/AreaInfo;)V
    .locals 0

    .line 51
    iput-object p1, p0, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;->b:Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;

    iput-object p2, p0, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;->a:Lcom/moji/common/area/AreaInfo;

    invoke-direct {p0}, Lcom/moji/mjad/avatar/network/AvatarStarResourceRequestCallback;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;Ljava/lang/String;)V
    .locals 4

    const-string p2, "AvatarStarResourceRecei"

    .line 54
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, " result = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {p2, v0}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 55
    invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;

    move-result-object p2

    iget-object v0, p0, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;->a:Lcom/moji/common/area/AreaInfo;

    invoke-virtual {p2, v0}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;

    move-result-object p2

    if-eqz p1, :cond_2

    if-eqz p2, :cond_2

    .line 56
    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    if-eqz v0, :cond_2

    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    if-eqz v0, :cond_2

    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    if-eqz v0, :cond_2

    .line 59
    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    iget v1, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->a:I

    iput v1, v0, Lcom/moji/weatherprovider/data/Avatar;->mAvatarId:I

    .line 60
    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    iget-wide v1, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->e:J

    iput-wide v1, v0, Lcom/moji/weatherprovider/data/Avatar;->mUpdatetime:J

    .line 61
    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    iget-object v1, p0, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;->a:Lcom/moji/common/area/AreaInfo;

    iget v1, v1, Lcom/moji/common/area/AreaInfo;->cityId:I

    int-to-long v1, v1

    iput-wide v1, v0, Lcom/moji/weatherprovider/data/Avatar;->mId:J

    .line 62
    iget-object v0, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->d:Ljava/util/List;

    if-eqz v0, :cond_0

    iget-object v0, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    .line 63
    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Avatar;->mWord:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 64
    iget-object v0, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/avatar/data/AvatarStarSentenseInfo;

    .line 65
    new-instance v2, Lcom/moji/weatherprovider/data/Avatar$Word;

    iget-object v3, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v3, v3, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    invoke-direct {v2, v3}, Lcom/moji/weatherprovider/data/Avatar$Word;-><init>(Lcom/moji/weatherprovider/data/Avatar;)V

    .line 66
    iget-object v3, v1, Lcom/moji/mjad/avatar/data/AvatarStarSentenseInfo;->url:Ljava/lang/String;

    iput-object v3, v2, Lcom/moji/weatherprovider/data/Avatar$Word;->mUrl:Ljava/lang/String;

    .line 67
    iget-object v3, v1, Lcom/moji/mjad/avatar/data/AvatarStarSentenseInfo;->entry:Ljava/lang/String;

    iput-object v3, v2, Lcom/moji/weatherprovider/data/Avatar$Word;->mEntry:Ljava/lang/String;

    .line 68
    iget v3, v1, Lcom/moji/mjad/avatar/data/AvatarStarSentenseInfo;->order:I

    iput v3, v2, Lcom/moji/weatherprovider/data/Avatar$Word;->mOrder:I

    .line 69
    iget-object v1, v1, Lcom/moji/mjad/avatar/data/AvatarStarSentenseInfo;->description:Ljava/lang/String;

    iput-object v1, v2, Lcom/moji/weatherprovider/data/Avatar$Word;->mDescription:Ljava/lang/String;

    .line 70
    iget-object v1, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v1, v1, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    iget-object v1, v1, Lcom/moji/weatherprovider/data/Avatar;->mWord:Ljava/util/List;

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 73
    :cond_0
    iget-object v0, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->c:Lcom/moji/mjad/avatar/data/AvatarStarClothInfo;

    if-eqz v0, :cond_1

    .line 74
    iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Avatar;->mLayer:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 75
    new-instance v0, Lcom/moji/weatherprovider/data/Avatar$Layer;

    iget-object v1, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object v1, v1, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    invoke-direct {v0, v1}, Lcom/moji/weatherprovider/data/Avatar$Layer;-><init>(Lcom/moji/weatherprovider/data/Avatar;)V

    .line 76
    iget-object v1, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->c:Lcom/moji/mjad/avatar/data/AvatarStarClothInfo;

    iget v1, v1, Lcom/moji/mjad/avatar/data/AvatarStarClothInfo;->position:I

    iput v1, v0, Lcom/moji/weatherprovider/data/Avatar$Layer;->mPosition:I

    .line 77
    iget-object p1, p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;->c:Lcom/moji/mjad/avatar/data/AvatarStarClothInfo;

    iget-object p1, p1, Lcom/moji/mjad/avatar/data/AvatarStarClothInfo;->url:Ljava/lang/String;

    iput-object p1, v0, Lcom/moji/weatherprovider/data/Avatar$Layer;->mCode:Ljava/lang/String;

    .line 78
    iget-object p1, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/Detail;->mAdvertisement:Lcom/moji/weatherprovider/data/Advertisement;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/Advertisement;->mAvatar:Lcom/moji/weatherprovider/data/Avatar;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/Avatar;->mLayer:Ljava/util/List;

    invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 80
    :cond_1
    iget-object p1, p0, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;->b:Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;

    iget-object v0, p0, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;->a:Lcom/moji/common/area/AreaInfo;

    invoke-virtual {p1, v0, p2}, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/data/Weather;)V

    :cond_2
    return-void
.end method

.method public a(Lcom/moji/mjad/enumdata/ERROR_CODE;Ljava/lang/String;)V
    .locals 0

    return-void
.end method

.method public bridge synthetic a(Ljava/lang/Object;Ljava/lang/String;)V
    .locals 0

    .line 51
    check-cast p1, Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;

    invoke-virtual {p0, p1, p2}, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;->a(Lcom/moji/mjad/avatar/data/AvatarStarResourceDetail;Ljava/lang/String;)V

    return-void
.end method
