.class public Landroidx/preference/MyCheckBoxPreference;
.super Landroidx/preference/CheckBoxPreference;
.source "MyCheckBoxPreference.java"


# instance fields
.field private mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    invoke-direct {p0, p1}, Landroidx/preference/CheckBoxPreference;-><init>(Landroid/content/Context;)V

    new-instance p1, Landroidx/preference/MyCheckBoxPreference$1;

    invoke-direct {p1, p0}, Landroidx/preference/MyCheckBoxPreference$1;-><init>(Landroidx/preference/MyCheckBoxPreference;)V

    iput-object p1, p0, Landroidx/preference/MyCheckBoxPreference;->mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Landroidx/preference/CheckBoxPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    new-instance p1, Landroidx/preference/MyCheckBoxPreference$1;

    invoke-direct {p1, p0}, Landroidx/preference/MyCheckBoxPreference$1;-><init>(Landroidx/preference/MyCheckBoxPreference;)V

    iput-object p1, p0, Landroidx/preference/MyCheckBoxPreference;->mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    invoke-direct {p0, p1, p2, p3}, Landroidx/preference/CheckBoxPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    new-instance p1, Landroidx/preference/MyCheckBoxPreference$1;

    invoke-direct {p1, p0}, Landroidx/preference/MyCheckBoxPreference$1;-><init>(Landroidx/preference/MyCheckBoxPreference;)V

    iput-object p1, p0, Landroidx/preference/MyCheckBoxPreference;->mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
    .locals 0

    invoke-direct {p0, p1, p2, p3, p4}, Landroidx/preference/CheckBoxPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V

    new-instance p1, Landroidx/preference/MyCheckBoxPreference$1;

    invoke-direct {p1, p0}, Landroidx/preference/MyCheckBoxPreference$1;-><init>(Landroidx/preference/MyCheckBoxPreference;)V

    iput-object p1, p0, Landroidx/preference/MyCheckBoxPreference;->mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;

    return-void
.end method


# virtual methods
.method public callChangeListener(Ljava/lang/Object;)Z
    .locals 1

    iget-object v0, p0, Landroidx/preference/MyCheckBoxPreference;->mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;

    if-eqz v0, :cond_1

    invoke-interface {v0, p0, p1}, Landroidx/preference/MyPreference$OnPreferenceChangeListener;->onPreferenceChange(Landroidx/preference/Preference;Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    goto :goto_1

    :cond_1
    :goto_0
    const/4 p1, 0x1

    :goto_1
    return p1
.end method

.method getChecked()Z
    .locals 3

    const/4 v0, 0x0

    :try_start_0
    invoke-virtual {p0}, Landroidx/preference/MyCheckBoxPreference;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    invoke-virtual {p0}, Landroidx/preference/MyCheckBoxPreference;->getKey()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    const/4 v1, 0x0

    :goto_0
    if-nez v1, :cond_0

    goto :goto_1

    :cond_0
    const/4 v0, 0x1

    :goto_1
    return v0
.end method

.method public getOnPreferenceChangeListener()Landroidx/preference/MyPreference$OnPreferenceChangeListener;
    .locals 1

    iget-object v0, p0, Landroidx/preference/MyCheckBoxPreference;->mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;

    return-object v0
.end method

.method public isChecked()Z
    .locals 1

    invoke-virtual {p0}, Landroidx/preference/MyCheckBoxPreference;->getChecked()Z

    move-result v0

    return v0
.end method

.method protected onClick()V
    .locals 0

    invoke-super {p0}, Landroidx/preference/CheckBoxPreference;->onClick()V

    return-void
.end method

.method protected onSaveInstanceState()Landroid/os/Parcelable;
    .locals 1

    invoke-virtual {p0}, Landroidx/preference/MyCheckBoxPreference;->getChecked()Z

    move-result v0

    invoke-virtual {p0, v0}, Landroidx/preference/MyCheckBoxPreference;->setChecked(Z)V

    invoke-super {p0}, Landroidx/preference/CheckBoxPreference;->onSaveInstanceState()Landroid/os/Parcelable;

    move-result-object v0

    return-object v0
.end method

.method protected onSetInitialValue(Ljava/lang/Object;)V
    .locals 0

    invoke-virtual {p0}, Landroidx/preference/MyCheckBoxPreference;->getChecked()Z

    move-result p1

    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    invoke-super {p0, p1}, Landroidx/preference/CheckBoxPreference;->onSetInitialValue(Ljava/lang/Object;)V

    return-void
.end method

.method public setChecked(Z)V
    .locals 2

    invoke-virtual {p0}, Landroidx/preference/MyCheckBoxPreference;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-virtual {p0}, Landroidx/preference/MyCheckBoxPreference;->getKey()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1, p1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    invoke-super {p0, p1}, Landroidx/preference/CheckBoxPreference;->setChecked(Z)V

    return-void
.end method

.method public setOnPreferenceChangeListener(Landroidx/preference/MyPreference$OnPreferenceChangeListener;)V
    .locals 0

    iput-object p1, p0, Landroidx/preference/MyCheckBoxPreference;->mOnChangeListener:Landroidx/preference/MyPreference$OnPreferenceChangeListener;

    return-void
.end method
