.class public Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;
.super Lcom/moji/mvpframe/MJPreferenceFragment;
.source "SettingWeatherAlertFragment.java"

# interfaces
.implements Landroid/preference/Preference$OnPreferenceChangeListener;
.implements Landroid/preference/Preference$OnPreferenceClickListener;


# static fields
.field private static final a:Ljava/lang/String; = "SettingWeatherAlertFragment"


# instance fields
.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/MJPreferenceWithSwitchButton;

.field private e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

.field private f:Lcom/moji/preferences/SettingNotificationPrefer;

.field private g:I

.field private h:I

.field private i:I

.field private j:I


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .line 29
    invoke-direct {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;-><init>()V

    const/4 v0, -0x1

    .line 36
    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->g:I

    .line 37
    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->h:I

    .line 38
    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->i:I

    .line 39
    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->j:I

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;)Lcom/moji/preferences/SettingNotificationPrefer;
    .locals 0

    .line 29
    iget-object p0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->f:Lcom/moji/preferences/SettingNotificationPrefer;

    return-object p0
.end method

.method private a(Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;)V
    .locals 4

    .line 104
    invoke-virtual {p0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->getActivity()Landroid/app/Activity;

    move-result-object v0

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0b0238

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    const v1, 0x7f090944

    .line 105
    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TimePicker;

    const/4 v2, 0x1

    .line 106
    invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TimePicker;->setIs24HourView(Ljava/lang/Boolean;)V

    .line 107
    new-instance v2, Lcom/moji/alarm/clock/AlarmClockData;

    invoke-direct {v2}, Lcom/moji/alarm/clock/AlarmClockData;-><init>()V

    .line 108
    iget v3, v2, Lcom/moji/alarm/clock/AlarmClockData;->hour:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v3}, Landroid/widget/TimePicker;->setCurrentHour(Ljava/lang/Integer;)V

    .line 109
    iget v2, v2, Lcom/moji/alarm/clock/AlarmClockData;->minutes:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TimePicker;->setCurrentMinute(Ljava/lang/Integer;)V

    .line 111
    new-instance v2, Lcom/moji/dialog/control/MJDialogCustomControl$Builder;

    invoke-virtual {p0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->getActivity()Landroid/app/Activity;

    move-result-object v3

    invoke-direct {v2, v3}, Lcom/moji/dialog/control/MJDialogCustomControl$Builder;-><init>(Landroid/content/Context;)V

    .line 112
    invoke-virtual {v2, v0}, Lcom/moji/dialog/control/MJDialogCustomControl$Builder;->a(Landroid/view/View;)Lcom/moji/dialog/control/MJDialogCustomControl$Builder;

    move-result-object v0

    const v2, 0x7f0e05ef

    .line 113
    invoke-virtual {v0, v2}, Lcom/moji/dialog/control/MJDialogCustomControl$Builder;->a(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    const v2, 0x7f0e05f7

    .line 114
    invoke-virtual {v0, v2}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->d(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    new-instance v2, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment$1;

    invoke-direct {v2, p0, v1, p1}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment$1;-><init>(Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;Landroid/widget/TimePicker;Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;)V

    .line 115
    invoke-virtual {v0, v2}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    .line 138
    invoke-virtual {p1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b()Lcom/moji/dialog/MJDialog;

    return-void
.end method

.method private c()V
    .locals 2

    .line 164
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

    iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->removePreference(Landroid/preference/Preference;)Z

    .line 165
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

    iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->removePreference(Landroid/preference/Preference;)Z

    .line 166
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->a(Z)V

    return-void
.end method

.method private e()V
    .locals 2

    .line 170
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

    iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->addPreference(Landroid/preference/Preference;)Z

    .line 171
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

    iget-object v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->addPreference(Landroid/preference/Preference;)Z

    .line 172
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;->a(Z)V

    return-void
.end method


# virtual methods
.method protected a()I
    .locals 1

    const v0, 0x7f110016

    return v0
.end method

.method protected b()Ljava/lang/String;
    .locals 1
    .annotation build Landroid/support/annotation/NonNull;
    .end annotation

    const v0, 0x7f0e080d

    .line 85
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->getString(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected d()V
    .locals 2

    .line 47
    invoke-super {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;->d()V

    .line 48
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v0, p0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 49
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v0, p0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 50
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->d:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;

    invoke-virtual {v0, p0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 51
    sget-object v0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->a:Ljava/lang/String;

    const-string v1, "addOnClickListener "

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

    return-void
.end method

.method protected f()V
    .locals 5

    .line 56
    invoke-super {p0}, Lcom/moji/mvpframe/MJPreferenceFragment;->f()V

    .line 57
    invoke-static {}, Lcom/moji/preferences/SettingNotificationPrefer;->c()Lcom/moji/preferences/SettingNotificationPrefer;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->f:Lcom/moji/preferences/SettingNotificationPrefer;

    .line 58
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->f:Lcom/moji/preferences/SettingNotificationPrefer;

    invoke-virtual {v0}, Lcom/moji/preferences/SettingNotificationPrefer;->p()I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->g:I

    .line 59
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->f:Lcom/moji/preferences/SettingNotificationPrefer;

    invoke-virtual {v0}, Lcom/moji/preferences/SettingNotificationPrefer;->q()I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->h:I

    .line 60
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->f:Lcom/moji/preferences/SettingNotificationPrefer;

    invoke-virtual {v0}, Lcom/moji/preferences/SettingNotificationPrefer;->r()I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->i:I

    .line 61
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->f:Lcom/moji/preferences/SettingNotificationPrefer;

    invoke-virtual {v0}, Lcom/moji/preferences/SettingNotificationPrefer;->s()I

    move-result v0

    iput v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->j:I

    const-string v0, "pref_key_mn_morning_alert"

    .line 63
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->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/SettingWeatherAlertFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    const-string v0, "pref_key_mn_night_alert"

    .line 64
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->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/SettingWeatherAlertFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    const-string v0, "pref_key_mn_weather_alert"

    .line 65
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->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/SettingWeatherAlertFragment;->d:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithSwitchButton;

    const-string v0, "category_key_mn_alert"

    .line 66
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->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/SettingWeatherAlertFragment;->e:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceCategory;

    .line 68
    new-instance v0, Ljava/lang/StringBuilder;

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

    iget v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->g:I

    const/16 v2, 0xa

    if-ge v1, v2, :cond_0

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v3, "0"

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

    iget v3, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->g:I

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

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

    move-result-object v1

    goto :goto_0

    :cond_0
    iget v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->g:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    :goto_0
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v1, ":"

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

    iget v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->h:I

    if-ge v1, v2, :cond_1

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v3, "0"

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

    iget v3, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->h:I

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

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

    move-result-object v1

    goto :goto_1

    :cond_1
    iget v1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->h:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    :goto_1
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

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

    move-result-object v0

    .line 69
    new-instance v1, Ljava/lang/StringBuilder;

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

    iget v3, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->i:I

    if-ge v3, v2, :cond_2

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "0"

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

    iget v4, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->i:I

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

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

    move-result-object v3

    goto :goto_2

    :cond_2
    iget v3, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->i:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    :goto_2
    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v3, ":"

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

    iget v3, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->j:I

    if-ge v3, v2, :cond_3

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "0"

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

    iget v3, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->j:I

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

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

    move-result-object v2

    goto :goto_3

    :cond_3
    iget v2, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->j:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

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

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

    move-result-object v1

    .line 71
    iget-object v2, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v2, v0}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;->a(Ljava/lang/CharSequence;)V

    .line 72
    iget-object v0, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-virtual {v0, v1}, Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;->a(Ljava/lang/CharSequence;)V

    .line 77
    invoke-static {}, Lcom/moji/preferences/units/SettingCenter;->a()Lcom/moji/preferences/units/SettingCenter;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/preferences/units/SettingCenter;->i()Z

    move-result v0

    if-nez v0, :cond_4

    .line 78
    invoke-direct {p0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->c()V

    :cond_4
    return-void
.end method

.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
    .locals 3

    .line 143
    sget-object v0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->a:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "key "

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

    invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

    move-result-object v2

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

    const-string v2, " --> "

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

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

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

    move-result-object v1

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

    .line 145
    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, 0x50b8f9af

    if-eq v0, v1, :cond_0

    goto :goto_0

    :cond_0
    const-string v0, "pref_key_mn_weather_alert"

    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 :goto_3

    .line 147
    :cond_2
    check-cast p2, Ljava/lang/Boolean;

    invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    .line 148
    iget-object p2, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->f:Lcom/moji/preferences/SettingNotificationPrefer;

    invoke-virtual {p2, p1}, Lcom/moji/preferences/SettingNotificationPrefer;->b(Z)V

    if-ne p1, v0, :cond_3

    const-string p2, "1"

    goto :goto_2

    :cond_3
    const-string p2, "0"

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

    move-result-object v1

    sget-object v2, Lcom/moji/statistics/EVENT_TAG;->SET_SUBSCRIBE_PUSH_CLICK:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {v1, v2, p2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    if-eqz p1, :cond_4

    .line 152
    new-instance p1, Lcom/moji/push/info/PushInfoSynchronous;

    invoke-direct {p1}, Lcom/moji/push/info/PushInfoSynchronous;-><init>()V

    invoke-virtual {p1}, Lcom/moji/push/info/PushInfoSynchronous;->syncAllPushInfo()V

    .line 153
    invoke-direct {p0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->e()V

    goto :goto_3

    .line 155
    :cond_4
    new-instance p1, Lcom/moji/push/info/PushInfoSynchronous;

    invoke-direct {p1}, Lcom/moji/push/info/PushInfoSynchronous;-><init>()V

    invoke-virtual {p1}, Lcom/moji/push/info/PushInfoSynchronous;->syncAllPushInfo()V

    .line 156
    invoke-direct {p0}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->c()V

    :goto_3
    return v0
.end method

.method public onPreferenceClick(Landroid/preference/Preference;)Z
    .locals 3

    .line 90
    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, 0xeb2fa53

    const/4 v2, 0x0

    if-eq v0, v1, :cond_1

    const v1, 0x6b4cdd7f

    if-eq v0, v1, :cond_0

    goto :goto_0

    :cond_0
    const-string v0, "pref_key_mn_morning_alert"

    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_1
    const-string v0, "pref_key_mn_night_alert"

    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_2
    :goto_0
    const/4 p1, -0x1

    :goto_1
    packed-switch p1, :pswitch_data_0

    goto :goto_2

    .line 95
    :pswitch_0
    iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->c:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-direct {p0, p1}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->a(Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;)V

    goto :goto_2

    .line 92
    :pswitch_1
    iget-object p1, p0, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->b:Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;

    invoke-direct {p0, p1}, Lcom/moji/mjweather/setting/fragment/SettingWeatherAlertFragment;->a(Lcom/moji/mjweather/settingpreference/pref/MJPreferenceWithValue;)V

    :goto_2
    return v2

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
