Fix SecureSettingsSwitchPref and Global derp
Signed-off-by: xyyx <xyyx@mail.ru>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user