.class public Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;
.super Lcom/moji/base/MJActivity;
.source "AssistShopSettingSubActivity.java"


# instance fields
.field public mTvTitle:Lcom/moji/titlebar/MJTitleBar;


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

    .line 19
    invoke-direct {p0}, Lcom/moji/base/MJActivity;-><init>()V

    return-void
.end method

.method private a()V
    .locals 3

    .line 47
    iget-object v0, p0, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->mTvTitle:Lcom/moji/titlebar/MJTitleBar;

    new-instance v1, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity$1;

    const v2, 0x7f0e011b

    invoke-direct {v1, p0, v2}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity$1;-><init>(Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;I)V

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->a(Lcom/moji/titlebar/MJTitleBar$Action;)Landroid/view/View;

    return-void
.end method

.method public static openSetting(Landroid/content/Context;)V
    .locals 2

    .line 27
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 28
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method


# virtual methods
.method public changeTitleBarText(Z)V
    .locals 2

    .line 70
    iget-object v0, p0, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->mTvTitle:Lcom/moji/titlebar/MJTitleBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->a(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    if-nez v0, :cond_0

    return-void

    :cond_0
    if-eqz p1, :cond_1

    const p1, 0x7f0e0027

    .line 75
    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(I)V

    .line 76
    iget-object p1, p0, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->mTvTitle:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {p1}, Lcom/moji/titlebar/MJTitleBar;->f()V

    goto :goto_0

    :cond_1
    const p1, 0x7f0e011b

    .line 78
    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(I)V

    .line 79
    iget-object p1, p0, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->mTvTitle:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {p1}, Lcom/moji/titlebar/MJTitleBar;->i()V

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

    move-result-object p1

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

    return-void
.end method

.method public onBackPressed()V
    .locals 4

    .line 87
    iget-object v0, p0, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->mTvTitle:Lcom/moji/titlebar/MJTitleBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->a(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    if-nez v0, :cond_0

    return-void

    .line 91
    :cond_0
    invoke-virtual {p0}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->getSupportFragmentManager()Landroid/support/v4/app/FragmentManager;

    move-result-object v2

    const-string v3, "fragement"

    invoke-virtual {v2, v3}, Landroid/support/v4/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroid/support/v4/app/Fragment;

    move-result-object v2

    check-cast v2, Lcom/moji/mjweather/assshop/voice/AvatarSettingFragment;

    if-nez v2, :cond_1

    return-void

    :cond_1
    const v3, 0x7f0e011b

    .line 95
    invoke-static {v3}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

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

    move-result v0

    if-eqz v0, :cond_2

    .line 96
    invoke-super {p0}, Lcom/moji/base/MJActivity;->onBackPressed()V

    goto :goto_0

    .line 98
    :cond_2
    invoke-virtual {p0, v1}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->changeTitleBarText(Z)V

    .line 99
    invoke-virtual {v2, v1}, Lcom/moji/mjweather/assshop/voice/AvatarSettingFragment;->a(Z)V

    .line 100
    invoke-virtual {v2}, Lcom/moji/mjweather/assshop/voice/AvatarSettingFragment;->a()V

    :goto_0
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3

    .line 33
    invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onCreate(Landroid/os/Bundle;)V

    const p1, 0x7f0b00c5

    .line 34
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->setContentView(I)V

    const p1, 0x7f090bba

    .line 35
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Lcom/moji/titlebar/MJTitleBar;

    iput-object p1, p0, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->mTvTitle:Lcom/moji/titlebar/MJTitleBar;

    .line 38
    invoke-virtual {p0}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->getSupportFragmentManager()Landroid/support/v4/app/FragmentManager;

    move-result-object p1

    invoke-virtual {p1}, Landroid/support/v4/app/FragmentManager;->beginTransaction()Landroid/support/v4/app/FragmentTransaction;

    move-result-object p1

    .line 39
    iget-object v0, p0, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->mTvTitle:Lcom/moji/titlebar/MJTitleBar;

    const v1, 0x7f0e011c

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setTitleText(I)V

    .line 40
    invoke-static {}, Lcom/moji/mjweather/assshop/voice/AvatarSettingFragment;->b()Landroid/support/v4/app/Fragment;

    move-result-object v0

    const-string v1, "fragement"

    const v2, 0x7f090271

    invoke-virtual {p1, v2, v0, v1}, Landroid/support/v4/app/FragmentTransaction;->replace(ILandroid/support/v4/app/Fragment;Ljava/lang/String;)Landroid/support/v4/app/FragmentTransaction;

    .line 41
    invoke-virtual {p1}, Landroid/support/v4/app/FragmentTransaction;->commitAllowingStateLoss()I

    .line 43
    invoke-direct {p0}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->a()V

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .line 108
    invoke-super {p0}, Lcom/moji/base/MJActivity;->onDestroy()V

    .line 109
    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;->j()V

    return-void
.end method
