Fix SecureSettingsSwitchPref and Global derp

Signed-off-by: xyyx <xyyx@mail.ru>
This commit is contained in:
ezio84
2017-09-04 13:37:16 +02:00
committed by hungphan2001
parent cfc8d23c5e
commit b9fd5ed58a
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ public class GlobalSettingSwitchPreference extends SwitchPreference {
@Override
protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
setChecked(Settings.System.getString(getContext().getContentResolver(), getKey()) != null ? getPersistedBoolean(isChecked())
setChecked(Settings.Global.getString(getContext().getContentResolver(), getKey()) != null ? getPersistedBoolean(isChecked())
: (Boolean) defaultValue);
}
}

View File

@@ -58,7 +58,7 @@ public class SecureSettingSwitchPreference extends SwitchPreference {
@Override
protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
setChecked(Settings.System.getString(getContext().getContentResolver(), getKey()) != null ? getPersistedBoolean(isChecked())
setChecked(Settings.Secure.getString(getContext().getContentResolver(), getKey()) != null ? getPersistedBoolean(isChecked())
: (Boolean) defaultValue);
}
}