618 lines
21 KiB
Smali
618 lines
21 KiB
Smali
.class public Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;
|
|
.super Lcom/moji/mvpframe/MJPreferenceFragment;
|
|
.source "SettingPersonalityAssistFragment.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/preference/Preference$OnPreferenceChangeListener;
|
|
.implements Landroid/preference/Preference$OnPreferenceClickListener;
|
|
.implements Lcom/moji/mjweather/assshop/task/LoadSettingsTask$QueryListener;
|
|
|
|
|
|
# instance fields
|
|
.field private a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;
|
|
|
|
.field private b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
.field private c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
.field private d:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
.field private e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
.field private f:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 34
|
|
invoke-direct {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected a()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f11000f
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/mjweather/assshop/task/LoadSettingsTask$Settings;)V
|
|
.locals 2
|
|
|
|
.line 157
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p1, Lcom/moji/mjweather/assshop/task/LoadSettingsTask$Settings;->b:Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 158
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
iget-object v1, p1, Lcom/moji/mjweather/assshop/task/LoadSettingsTask$Settings;->b:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;->a(Ljava/lang/CharSequence;)V
|
|
|
|
.line 160
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->d:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p1, Lcom/moji/mjweather/assshop/task/LoadSettingsTask$Settings;->a:Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 161
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->d:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
iget-object v1, p1, Lcom/moji/mjweather/assshop/task/LoadSettingsTask$Settings;->a:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;->a(Ljava/lang/CharSequence;)V
|
|
|
|
.line 164
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p1, Lcom/moji/mjweather/assshop/task/LoadSettingsTask$Settings;->c:Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 165
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
iget-object p1, p1, Lcom/moji/mjweather/assshop/task/LoadSettingsTask$Settings;->c:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;->a(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method protected b()Ljava/lang/String;
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
|
|
const v0, 0x7f0e07e6
|
|
|
|
.line 108
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected d()V
|
|
.locals 1
|
|
|
|
.line 67
|
|
invoke-super {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;->d()V
|
|
|
|
const-string v0, "setting_personality_function_clothes_shop_shift_assist"
|
|
|
|
.line 70
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V
|
|
|
|
const-string v0, "setting_personality_function_voice_shop_set_alarm"
|
|
|
|
.line 71
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V
|
|
|
|
const-string v0, "setting_personality_function_voice_shop_language"
|
|
|
|
.line 72
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V
|
|
|
|
const-string v0, "assist_shop_setting_avatar_switch"
|
|
|
|
.line 74
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->f:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
.line 75
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->f:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
|
|
|
|
const-string v0, "category_shop_setting_avatar"
|
|
|
|
.line 77
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;
|
|
|
|
const-string v0, "setting_personality_function_clothes_shop_shift_assist"
|
|
|
|
.line 78
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
const-string v0, "setting_personality_function_voice_shop_set_alarm"
|
|
|
|
.line 80
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
const-string v0, "setting_personality_function_clothes_shop_shift_assist"
|
|
|
|
.line 81
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->d:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
const-string v0, "setting_personality_function_voice_shop_language"
|
|
|
|
.line 83
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onCreate(Landroid/os/Bundle;)V
|
|
.locals 0
|
|
|
|
.line 57
|
|
invoke-super {p0, p1}, Lcom/moji/mvpframe/MJPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
|
|
.locals 4
|
|
|
|
.line 134
|
|
invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
const v1, -0x295ca3c8
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "assist_shop_setting_avatar_switch"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p1, -0x1
|
|
|
|
:goto_1
|
|
const/4 v0, 0x1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
goto/16 :goto_3
|
|
|
|
.line 136
|
|
:cond_2
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/moji/mjweather/assshop/event/AvatarDismisDialogEvent;
|
|
|
|
invoke-direct {v1}, Lcom/moji/mjweather/assshop/event/AvatarDismisDialogEvent;-><init>()V
|
|
|
|
invoke-virtual {p1, v1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 137
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/moji/mjweather/assshop/event/AvatarStateChangedEvent;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x4
|
|
|
|
invoke-direct {v1, v2, v3}, Lcom/moji/mjweather/assshop/event/AvatarStateChangedEvent;-><init>(Lcom/moji/mjad/avatar/data/AvatarInfo;I)V
|
|
|
|
invoke-virtual {p1, v1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 138
|
|
check-cast p2, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 139
|
|
iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;
|
|
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
invoke-virtual {p1, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->addPreference(Landroid/preference/Preference;)Z
|
|
|
|
.line 140
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_TAG;->AVATAR_USE_SCALE_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string v2, "1"
|
|
|
|
invoke-virtual {p1, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 141
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_TAG;->SET_USE_ASSISTANT_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string v2, "1"
|
|
|
|
invoke-virtual {p1, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto :goto_2
|
|
|
|
.line 143
|
|
:cond_3
|
|
iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;
|
|
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
invoke-virtual {p1, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->removePreference(Landroid/preference/Preference;)Z
|
|
|
|
.line 144
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_TAG;->AVATAR_USE_SCALE_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string v2, "0"
|
|
|
|
invoke-virtual {p1, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 145
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_TAG;->SET_USE_ASSISTANT_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string v2, "0"
|
|
|
|
invoke-virtual {p1, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 147
|
|
:goto_2
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p1
|
|
|
|
.line 148
|
|
new-instance p2, Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
invoke-direct {p2}, Lcom/moji/preferences/DefaultPrefer;-><init>()V
|
|
|
|
new-instance v1, Lcom/moji/mjweather/setting/SettingAssistKey;
|
|
|
|
invoke-direct {v1}, Lcom/moji/mjweather/setting/SettingAssistKey;-><init>()V
|
|
|
|
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p2, v1, v2}, Lcom/moji/preferences/DefaultPrefer;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Boolean;)V
|
|
|
|
.line 149
|
|
new-instance p2, Lcom/moji/mjad/preferences/MojiAdPreference;
|
|
|
|
invoke-direct {p2}, Lcom/moji/mjad/preferences/MojiAdPreference;-><init>()V
|
|
|
|
xor-int/2addr p1, v0
|
|
|
|
invoke-virtual {p2, p1}, Lcom/moji/mjad/preferences/MojiAdPreference;->a(I)V
|
|
|
|
:goto_3
|
|
return v0
|
|
.end method
|
|
|
|
.method public onPreferenceClick(Landroid/preference/Preference;)Z
|
|
.locals 3
|
|
|
|
.line 114
|
|
invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
const v1, -0x7e69e12f
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
const v1, -0x35408773 # -6274118.5f
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const v1, 0x693d099f
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "setting_personality_function_voice_shop_set_alarm"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string v0, "setting_personality_function_voice_shop_language"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const/4 p1, 0x2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const-string v0, "setting_personality_function_clothes_shop_shift_assist"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
const/4 p1, -0x1
|
|
|
|
:goto_1
|
|
packed-switch p1, :pswitch_data_0
|
|
|
|
goto :goto_2
|
|
|
|
.line 123
|
|
:pswitch_0
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->getActivity()Landroid/app/Activity;
|
|
|
|
move-result-object v0
|
|
|
|
const-class v1, Lcom/moji/mjweather/setting/activity/ChangeVoiceLanguageActivity;
|
|
|
|
invoke-direct {p1, v0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->startActivity(Landroid/content/Intent;)V
|
|
|
|
goto :goto_2
|
|
|
|
.line 120
|
|
:pswitch_1
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->getActivity()Landroid/app/Activity;
|
|
|
|
move-result-object v0
|
|
|
|
const-class v1, Lcom/moji/mjweather/setting/activity/SettingVoiceAlarmActivity;
|
|
|
|
invoke-direct {p1, v0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
goto :goto_3
|
|
|
|
.line 116
|
|
:pswitch_2
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->getActivity()Landroid/app/Activity;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/mjweather/assshop/voice/AssistShopSettingSubActivity;->openSetting(Landroid/content/Context;)V
|
|
|
|
.line 117
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->SET_MY_ASSISTANT_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;
|
|
|
|
:goto_2
|
|
const/4 p1, 0x0
|
|
|
|
:goto_3
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 127
|
|
invoke-virtual {p0, p1}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->startActivity(Landroid/content/Intent;)V
|
|
|
|
:cond_4
|
|
return v2
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public onResume()V
|
|
.locals 3
|
|
|
|
.line 88
|
|
invoke-super {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;->onResume()V
|
|
|
|
.line 89
|
|
new-instance v0, Lcom/moji/mjweather/assshop/task/LoadSettingsTask;
|
|
|
|
invoke-direct {v0, p0}, Lcom/moji/mjweather/assshop/task/LoadSettingsTask;-><init>(Lcom/moji/mjweather/assshop/task/LoadSettingsTask$QueryListener;)V
|
|
|
|
sget-object v1, Lcom/moji/tool/thread/ThreadType;->NORMAL_THREAD:Lcom/moji/tool/thread/ThreadType;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
new-array v2, v2, [Ljava/lang/Void;
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/mjweather/assshop/task/LoadSettingsTask;->a(Lcom/moji/tool/thread/ThreadType;[Ljava/lang/Object;)Lcom/moji/tool/thread/task/MJAsyncTask;
|
|
|
|
.line 90
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->getActivity()Landroid/app/Activity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "assist_shop_setting_avatar_switch"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 92
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;
|
|
|
|
iget-object v2, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
invoke-virtual {v1, v2}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->removePreference(Landroid/preference/Preference;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 94
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;
|
|
|
|
iget-object v2, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;
|
|
|
|
invoke-virtual {v1, v2}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->addPreference(Landroid/preference/Preference;)Z
|
|
|
|
.line 97
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->f:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 98
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityAssistFragment;->f:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;->a(Z)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|