.class public Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;
.super Lcom/moji/mjweather/assshop/weather/state/WeatherAvatarState;
.source "WeatherUsingState.java"


# instance fields
.field private l:Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;


# direct methods
.method public constructor <init>(Lcom/moji/mjweather/assshop/weather/state/WeatherAvatarStateControl;)V
    .locals 0

    .line 27
    invoke-direct {p0, p1}, Lcom/moji/mjweather/assshop/weather/state/WeatherAvatarState;-><init>(Lcom/moji/mjweather/assshop/weather/state/WeatherAvatarStateControl;)V

    return-void
.end method


# virtual methods
.method public a(Lcom/moji/mjweather/weather/avatar/AvatarView;Landroid/widget/ImageView;)V
    .locals 2

    .line 32
    invoke-super {p0, p1, p2}, Lcom/moji/mjweather/assshop/weather/state/WeatherAvatarState;->a(Lcom/moji/mjweather/weather/avatar/AvatarView;Landroid/widget/ImageView;)V

    .line 33
    invoke-static {}, Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;->b()Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->l:Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;

    .line 37
    iget-object p1, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->c:Lcom/moji/mjad/avatar/data/AvatarInfo;

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

    iget-object v0, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->c:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget v0, v0, Lcom/moji/mjad/avatar/data/AvatarInfo;->id:I

    const/4 v1, 0x1

    invoke-virtual {p0, v1, p1, v0}, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->a(ZLjava/lang/String;I)V

    .line 38
    iget-object p1, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->l:Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;

    invoke-virtual {p1}, Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;->h()V

    .line 39
    iget-object p1, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->l:Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;

    iget-object v0, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->c:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget v0, v0, Lcom/moji/mjad/avatar/data/AvatarInfo;->voiceId:I

    invoke-virtual {p1, v0, p2}, Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;->a(ILandroid/widget/ImageView;)V

    const-string p1, "chao1"

    const-string p2, "preformClick:WeatherUsingState"

    .line 40
    invoke-static {p1, p2}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public a(ZLjava/lang/Object;)V
    .locals 0

    .line 46
    invoke-super {p0, p1, p2}, Lcom/moji/mjweather/assshop/weather/state/WeatherAvatarState;->a(ZLjava/lang/Object;)V

    .line 47
    iget-object p1, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->c:Lcom/moji/mjad/avatar/data/AvatarInfo;

    sget-object p2, Lcom/moji/mjad/avatar/data/AVATAR_STATUS;->AVATAR_STATE_USING:Lcom/moji/mjad/avatar/data/AVATAR_STATUS;

    iput-object p2, p1, Lcom/moji/mjad/avatar/data/AvatarInfo;->status:Lcom/moji/mjad/avatar/data/AVATAR_STATUS;

    return-void
.end method

.method public a(ZLjava/lang/String;I)V
    .locals 2

    .line 53
    invoke-static {}, Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;->b()Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/mjweather/assshop/weather/WeatherAvatarUtil;->f()I

    move-result v0

    if-eq p3, v0, :cond_1

    .line 54
    iget-object v0, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->g:Lcom/moji/mjweather/weather/avatar/AvatarView;

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

    move-result v1

    if-eqz v1, :cond_0

    new-instance p2, Ljava/lang/StringBuilder;

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

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

    const-string p3, ""

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

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

    move-result-object p2

    :cond_0
    invoke-virtual {v0, p2}, Lcom/moji/mjweather/weather/avatar/AvatarView;->setDefaultAvatar(Ljava/lang/String;)V

    :cond_1
    const/4 p2, 0x0

    .line 57
    invoke-virtual {p0, p1, p2}, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->a(ZLjava/lang/Object;)V

    .line 58
    iget-object p1, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->e:Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter;

    iget-object p2, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->c:Lcom/moji/mjad/avatar/data/AvatarInfo;

    iget p2, p2, Lcom/moji/mjad/avatar/data/AvatarInfo;->id:I

    invoke-virtual {p1, p2}, Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter;->g(I)V

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

    move-result-object p1

    sget-object p2, Lcom/moji/statistics/EVENT_TAG;->AVATAR_PREVIEW_SUCCESS:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {p1, p2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    return-void
.end method

.method public b()V
    .locals 2

    .line 65
    invoke-super {p0}, Lcom/moji/mjweather/assshop/weather/state/WeatherAvatarState;->b()V

    .line 67
    iget-object v0, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->d:Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;

    iget-object v0, v0, Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;->s:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 68
    iget-object v0, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->d:Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;

    iget-object v0, v0, Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;->q:Lcom/moji/circleprogress/SectorProgressView;

    invoke-virtual {v0, v1}, Lcom/moji/circleprogress/SectorProgressView;->setVisibility(I)V

    .line 69
    iget-object v0, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->d:Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;

    iget-object v0, v0, Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;->q:Lcom/moji/circleprogress/SectorProgressView;

    const/high16 v1, 0x44fa0000    # 2000.0f

    invoke-virtual {v0, v1}, Lcom/moji/circleprogress/SectorProgressView;->setProgress(F)V

    .line 70
    iget-object v0, p0, Lcom/moji/mjweather/assshop/weather/state/WeatherUsingState;->d:Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;

    iget-object v0, v0, Lcom/moji/mjweather/assshop/weather/adapter/WeatherAvatarAdapter$AvatarHolder;->p:Landroid/widget/TextView;

    const v1, 0x7f060235

    invoke-static {v1}, Lcom/moji/tool/DeviceTool;->e(I)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    return-void
.end method
