mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Stop passing through keyPrefs as it's already available.
Change-Id: I43a56beba0cf0fdf5f93c5c764edbd279ee033b2
This commit is contained in:
parent
11a3965f8c
commit
d179e40899
@ -281,8 +281,7 @@ public final class DebugSettingsFragment extends SubScreenFragment
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int readValue(final String key) {
|
public int readValue(final String key) {
|
||||||
return getPercentageFromValue(
|
return getPercentageFromValue(Settings.readKeyboardHeight(prefs, defaultValue));
|
||||||
Settings.readKeyboardHeight(prefs, key, defaultValue));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -368,8 +368,9 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static float readKeyboardHeight(final SharedPreferences prefs,
|
public static float readKeyboardHeight(final SharedPreferences prefs,
|
||||||
final String prefKey, final float defaultValue) {
|
final float defaultValue) {
|
||||||
final float percentage = prefs.getFloat(prefKey, UNDEFINED_PREFERENCE_VALUE_FLOAT);
|
final float percentage = prefs.getFloat(
|
||||||
|
DebugSettings.PREF_KEYBOARD_HEIGHT_SCALE, UNDEFINED_PREFERENCE_VALUE_FLOAT);
|
||||||
return (percentage != UNDEFINED_PREFERENCE_VALUE_FLOAT) ? percentage : defaultValue;
|
return (percentage != UNDEFINED_PREFERENCE_VALUE_FLOAT) ? percentage : defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,8 +190,7 @@ public class SettingsValues {
|
|||||||
mHasCustomKeyPreviewAnimationParams = prefs.getBoolean(
|
mHasCustomKeyPreviewAnimationParams = prefs.getBoolean(
|
||||||
DebugSettings.PREF_HAS_CUSTOM_KEY_PREVIEW_ANIMATION_PARAMS, false);
|
DebugSettings.PREF_HAS_CUSTOM_KEY_PREVIEW_ANIMATION_PARAMS, false);
|
||||||
mHasKeyboardResize = prefs.getBoolean(DebugSettings.PREF_RESIZE_KEYBOARD, false);
|
mHasKeyboardResize = prefs.getBoolean(DebugSettings.PREF_RESIZE_KEYBOARD, false);
|
||||||
mKeyboardHeightScale = Settings.readKeyboardHeight(
|
mKeyboardHeightScale = Settings.readKeyboardHeight(prefs, DEFAULT_SIZE_SCALE);
|
||||||
prefs, DebugSettings.PREF_KEYBOARD_HEIGHT_SCALE, DEFAULT_SIZE_SCALE);
|
|
||||||
mKeyPreviewShowUpDuration = Settings.readKeyPreviewAnimationDuration(
|
mKeyPreviewShowUpDuration = Settings.readKeyPreviewAnimationDuration(
|
||||||
prefs, DebugSettings.PREF_KEY_PREVIEW_SHOW_UP_DURATION,
|
prefs, DebugSettings.PREF_KEY_PREVIEW_SHOW_UP_DURATION,
|
||||||
res.getInteger(R.integer.config_key_preview_show_up_duration));
|
res.getInteger(R.integer.config_key_preview_show_up_duration));
|
||||||
|
Loading…
Reference in New Issue
Block a user