Haptic feedback default value
This commit is contained in:
parent
ac411a549f
commit
577fac76f8
@ -10,6 +10,7 @@ import org.solovyev.android.prefs.BooleanPreference;
|
|||||||
import org.solovyev.android.prefs.IntegerPreference;
|
import org.solovyev.android.prefs.IntegerPreference;
|
||||||
import org.solovyev.android.prefs.Preference;
|
import org.solovyev.android.prefs.Preference;
|
||||||
import org.solovyev.android.prefs.StringPreference;
|
import org.solovyev.android.prefs.StringPreference;
|
||||||
|
import org.solovyev.android.view.VibratorContainer;
|
||||||
|
|
||||||
import java.text.DecimalFormatSymbols;
|
import java.text.DecimalFormatSymbols;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@ -163,6 +164,14 @@ public final class CalculatorPreferences {
|
|||||||
applyDefaultPreference(preferences, Graph.lineColorImag);
|
applyDefaultPreference(preferences, Graph.lineColorImag);
|
||||||
applyDefaultPreference(preferences, Graph.lineColorReal);
|
applyDefaultPreference(preferences, Graph.lineColorReal);
|
||||||
|
|
||||||
|
if ( !VibratorContainer.Preferences.hapticFeedbackEnabled.isSet(preferences) ) {
|
||||||
|
VibratorContainer.Preferences.hapticFeedbackEnabled.putPreference(preferences, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !VibratorContainer.Preferences.hapticFeedbackDuration.isSet(preferences) ) {
|
||||||
|
VibratorContainer.Preferences.hapticFeedbackDuration.putPreference(preferences, 60L);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void applyDefaultPreference(@NotNull SharedPreferences preferences, @NotNull Preference<?> preference) {
|
private static void applyDefaultPreference(@NotNull SharedPreferences preferences, @NotNull Preference<?> preference) {
|
||||||
|
Loading…
Reference in New Issue
Block a user