473 lines
13 KiB
Smali
473 lines
13 KiB
Smali
.class public Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;
|
|
.super Lcom/moji/mvpframe/MJPreferenceFragment;
|
|
.source "SettingPersonalityWeatherBackgroundFragment.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/preference/Preference$OnPreferenceChangeListener;
|
|
.implements Landroid/preference/Preference$OnPreferenceClickListener;
|
|
|
|
|
|
# instance fields
|
|
.field private a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
.field private b:Lcom/moji/weathersence/data/WeatherScenePreference;
|
|
|
|
.field private c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 26
|
|
invoke-direct {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private c()V
|
|
.locals 3
|
|
|
|
.line 115
|
|
new-instance v0, Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/DefaultPrefer;-><init>()V
|
|
|
|
new-instance v1, Lcom/moji/mjweather/setting/SettingDayKey;
|
|
|
|
invoke-direct {v1}, Lcom/moji/mjweather/setting/SettingDayKey;-><init>()V
|
|
|
|
invoke-direct {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->g()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/preferences/DefaultPrefer;->b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private e()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 119
|
|
new-instance v0, Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/DefaultPrefer;-><init>()V
|
|
|
|
new-instance v1, Lcom/moji/mjweather/setting/SettingDayKey;
|
|
|
|
invoke-direct {v1}, Lcom/moji/mjweather/setting/SettingDayKey;-><init>()V
|
|
|
|
const-string v2, ""
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/preferences/DefaultPrefer;->b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private g()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 122
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0}, Ljava/util/Date;-><init>()V
|
|
|
|
.line 123
|
|
new-instance v1, Ljava/text/SimpleDateFormat;
|
|
|
|
const-string v2, "yyyyMMdd"
|
|
|
|
invoke-direct {v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 124
|
|
invoke-virtual {v1, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected a()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f110014
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method protected b()Ljava/lang/String;
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
|
|
const v0, 0x7f0e07fe
|
|
|
|
.line 58
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected d()V
|
|
.locals 2
|
|
|
|
.line 39
|
|
invoke-super {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;->d()V
|
|
|
|
const-string v0, "setting_personality_function_weather_background_anim"
|
|
|
|
.line 40
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->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/SettingPersonalityWeatherBackgroundFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
.line 41
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->a: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, "setting_personality_function_weather_background_default"
|
|
|
|
.line 43
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->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/SettingPersonalityWeatherBackgroundFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
.line 44
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
|
|
|
|
.line 46
|
|
new-instance v0, Lcom/moji/weathersence/data/WeatherScenePreference;
|
|
|
|
invoke-direct {v0}, Lcom/moji/weathersence/data/WeatherScenePreference;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->b:Lcom/moji/weathersence/data/WeatherScenePreference;
|
|
|
|
.line 47
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->b:Lcom/moji/weathersence/data/WeatherScenePreference;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/weathersence/data/WeatherScenePreference;->i()Z
|
|
|
|
move-result v0
|
|
|
|
.line 48
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;->a(Z)V
|
|
|
|
.line 50
|
|
iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->b:Lcom/moji/weathersence/data/WeatherScenePreference;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/weathersence/data/WeatherScenePreference;->j()Z
|
|
|
|
move-result v0
|
|
|
|
.line 51
|
|
iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;->a(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
|
|
.locals 4
|
|
|
|
.line 85
|
|
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, 0x27c1b9e2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const v1, 0x42de6a10
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "setting_personality_function_weather_background_anim"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string v0, "setting_personality_function_weather_background_default"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
const/4 p1, -0x1
|
|
|
|
:goto_1
|
|
packed-switch p1, :pswitch_data_0
|
|
|
|
goto :goto_4
|
|
|
|
.line 104
|
|
:pswitch_0
|
|
check-cast p2, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p1
|
|
|
|
.line 105
|
|
iget-object p2, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->a:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;
|
|
|
|
invoke-virtual {p2, p1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;->a(Z)V
|
|
|
|
.line 106
|
|
iget-object p2, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->b:Lcom/moji/weathersence/data/WeatherScenePreference;
|
|
|
|
invoke-virtual {p2, p1}, Lcom/moji/weathersence/data/WeatherScenePreference;->a(Z)V
|
|
|
|
.line 107
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p2
|
|
|
|
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->SETTINGS_ANIMATION_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const-string p1, "1"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const-string p1, "0"
|
|
|
|
:goto_2
|
|
invoke-virtual {p2, v0, p1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto :goto_4
|
|
|
|
.line 87
|
|
:pswitch_1
|
|
check-cast p2, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 89
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_TAG;->SET_NEW_AD_BACKGROUND_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string v3, "1"
|
|
|
|
invoke-virtual {v0, v1, v3}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto :goto_3
|
|
|
|
.line 91
|
|
:cond_4
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_TAG;->SET_NEW_AD_BACKGROUND_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string v3, "0"
|
|
|
|
invoke-virtual {v0, v1, v3}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 93
|
|
:goto_3
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/moji/mjad/background/event/WeatherBgAdSwitchEvent;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p2
|
|
|
|
invoke-direct {v1, p2}, Lcom/moji/mjad/background/event/WeatherBgAdSwitchEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {v0, v1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 95
|
|
invoke-direct {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->e()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
.line 96
|
|
invoke-direct {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->g()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 97
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_5
|
|
|
|
.line 98
|
|
invoke-direct {p0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->c()V
|
|
|
|
.line 99
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p2
|
|
|
|
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->SET_NEW_AD_BACKGROUND:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
invoke-virtual {p2, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 101
|
|
:cond_5
|
|
iget-object p2, p0, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->b:Lcom/moji/weathersence/data/WeatherScenePreference;
|
|
|
|
invoke-virtual {p2, p1}, Lcom/moji/weathersence/data/WeatherScenePreference;->b(Z)V
|
|
|
|
:goto_4
|
|
return v2
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public onPreferenceClick(Landroid/preference/Preference;)Z
|
|
.locals 4
|
|
|
|
.line 63
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
.line 64
|
|
invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
const v2, -0x63998489
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
const v2, 0x420cf1f1
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, "setting_personality_function_weather_background_setting"
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string v1, "setting_personality_function_weather_background_shift_source"
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
const/4 p1, -0x1
|
|
|
|
:goto_1
|
|
packed-switch p1, :pswitch_data_0
|
|
|
|
.line 74
|
|
:pswitch_0
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingPersonalityWeatherBackgroundFragment;->startActivity(Landroid/content/Intent;)V
|
|
|
|
return v3
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_0
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public onResume()V
|
|
.locals 0
|
|
|
|
.line 80
|
|
invoke-super {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;->onResume()V
|
|
|
|
return-void
|
|
.end method
|