Remove intermediate method
This commit is contained in:
parent
164b24a3dd
commit
7dfb6dc45b
@ -87,13 +87,8 @@ public final class Preferences {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Engine.Preferences.angleUnit.isSet(preferences)) {
|
Engine.Preferences.angleUnit.tryPutDefault(preferences);
|
||||||
Engine.Preferences.angleUnit.putDefault(preferences);
|
Engine.Preferences.numeralBase.tryPutDefault(preferences);
|
||||||
}
|
|
||||||
|
|
||||||
if (!Engine.Preferences.numeralBase.isSet(preferences)) {
|
|
||||||
Engine.Preferences.numeralBase.putDefault(preferences);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Engine.Preferences.multiplicationSign.isSet(preferences)) {
|
if (!Engine.Preferences.multiplicationSign.isSet(preferences)) {
|
||||||
if (isPhoneModel(samsung_galaxy_s) || isPhoneModel(samsung_galaxy_s_2)) {
|
if (isPhoneModel(samsung_galaxy_s) || isPhoneModel(samsung_galaxy_s_2)) {
|
||||||
@ -102,34 +97,30 @@ public final class Preferences {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applyDefaultPreference(preferences, Gui.theme);
|
Gui.theme.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.layout);
|
Gui.layout.tryPutDefault(preferences);
|
||||||
if (Gui.layout.getPreference(preferences) == Gui.Layout.main_cellphone) {
|
if (Gui.layout.getPreference(preferences) == Gui.Layout.main_cellphone) {
|
||||||
Gui.layout.putDefault(preferences);
|
Gui.layout.putDefault(preferences);
|
||||||
}
|
}
|
||||||
applyDefaultPreference(preferences, Gui.feedbackWindowShown);
|
Gui.feedbackWindowShown.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.showReleaseNotes);
|
Gui.showReleaseNotes.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.usePrevAsBack);
|
Gui.usePrevAsBack.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.showEqualsButton);
|
Gui.showEqualsButton.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.autoOrientation);
|
Gui.autoOrientation.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.hideNumeralBaseDigits);
|
Gui.hideNumeralBaseDigits.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.preventScreenFromFading);
|
Gui.preventScreenFromFading.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Gui.language);
|
Gui.language.tryPutDefault(preferences);
|
||||||
|
|
||||||
applyDefaultPreference(preferences, Graph.plotImag);
|
Graph.plotImag.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Calculations.calculateOnFly);
|
Calculations.calculateOnFly.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Calculations.preferredAngleUnits);
|
Calculations.preferredAngleUnits.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Calculations.preferredNumeralBase);
|
Calculations.preferredNumeralBase.tryPutDefault(preferences);
|
||||||
|
|
||||||
applyDefaultPreference(preferences, Onscreen.showAppIcon);
|
Onscreen.showAppIcon.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Onscreen.startOnBoot);
|
Onscreen.startOnBoot.tryPutDefault(preferences);
|
||||||
applyDefaultPreference(preferences, Onscreen.theme);
|
Onscreen.theme.tryPutDefault(preferences);
|
||||||
|
|
||||||
applyDefaultPreference(preferences, Widget.theme);
|
Widget.theme.tryPutDefault(preferences);
|
||||||
}
|
|
||||||
|
|
||||||
private static void applyDefaultPreference(@Nonnull SharedPreferences preferences, @Nonnull Preference<?> preference) {
|
|
||||||
preference.tryPutDefault(preferences);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SimpleTheme {
|
public enum SimpleTheme {
|
||||||
|
Loading…
Reference in New Issue
Block a user