.class public Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;
.super Landroid/content/BroadcastReceiver;
.source "AvatarStarResourceReceiver.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 24
    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method


# virtual methods
.method protected a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/data/Weather;)V
    .locals 1

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

    move-result-object v0

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

    return-void
.end method

.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 4

    const/4 v0, 0x0

    .line 34
    :try_start_0
    invoke-virtual {p2}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 37
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->setClassLoader(Ljava/lang/ClassLoader;)V

    :cond_0
    const-string v1, "cityId"

    .line 40
    invoke-virtual {p2, v1, v0}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    :try_start_1
    const-string v0, "mInfo"

    .line 41
    invoke-virtual {p2, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object p2

    check-cast p2, Lcom/moji/common/area/AreaInfo;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_1

    :catch_0
    move-exception p2

    goto :goto_0

    :catch_1
    move-exception p2

    const/4 v1, 0x0

    :goto_0
    const-string v0, "AvatarStarResourceRecei"

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

    const/4 p2, 0x0

    :goto_1
    if-nez p2, :cond_1

    return-void

    :cond_1
    const-string v0, "AvatarStarResourceRecei"

    .line 48
    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, " cityId = "

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

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

    const-string v3, " , mId = "

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

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

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

    move-result-object v2

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

    if-lez v1, :cond_2

    .line 51
    new-instance v0, Lcom/moji/mjad/MojiAdRequest;

    invoke-direct {v0, p1}, Lcom/moji/mjad/MojiAdRequest;-><init>(Landroid/content/Context;)V

    new-instance p1, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;

    invoke-direct {p1, p0, p2}, Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver$1;-><init>(Lcom/moji/mjad/avatar/receiver/AvatarStarResourceReceiver;Lcom/moji/common/area/AreaInfo;)V

    invoke-virtual {v0, p1}, Lcom/moji/mjad/MojiAdRequest;->a(Lcom/moji/mjad/avatar/network/AvatarStarResourceRequestCallback;)V

    :cond_2
    return-void
.end method
