am d179e408: Stop passing through keyPrefs as it\'s already available.

* commit 'd179e40899b648ce2ceb8543678176f9a696ff30':
  Stop passing through keyPrefs as it's already available.
main
Andy Wang 2014-12-02 06:35:45 +00:00 committed by Android Git Automerger
commit c95ebf9644
3 changed files with 5 additions and 6 deletions

View File

@ -281,8 +281,7 @@ public final class DebugSettingsFragment extends SubScreenFragment
@Override
public int readValue(final String key) {
return getPercentageFromValue(
Settings.readKeyboardHeight(prefs, key, defaultValue));
return getPercentageFromValue(Settings.readKeyboardHeight(prefs, defaultValue));
}
@Override

View File

@ -368,8 +368,9 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
}
public static float readKeyboardHeight(final SharedPreferences prefs,
final String prefKey, final float defaultValue) {
final float percentage = prefs.getFloat(prefKey, UNDEFINED_PREFERENCE_VALUE_FLOAT);
final float defaultValue) {
final float percentage = prefs.getFloat(
DebugSettings.PREF_KEYBOARD_HEIGHT_SCALE, UNDEFINED_PREFERENCE_VALUE_FLOAT);
return (percentage != UNDEFINED_PREFERENCE_VALUE_FLOAT) ? percentage : defaultValue;
}

View File

@ -190,8 +190,7 @@ public class SettingsValues {
mHasCustomKeyPreviewAnimationParams = prefs.getBoolean(
DebugSettings.PREF_HAS_CUSTOM_KEY_PREVIEW_ANIMATION_PARAMS, false);
mHasKeyboardResize = prefs.getBoolean(DebugSettings.PREF_RESIZE_KEYBOARD, false);
mKeyboardHeightScale = Settings.readKeyboardHeight(
prefs, DebugSettings.PREF_KEYBOARD_HEIGHT_SCALE, DEFAULT_SIZE_SCALE);
mKeyboardHeightScale = Settings.readKeyboardHeight(prefs, DEFAULT_SIZE_SCALE);
mKeyPreviewShowUpDuration = Settings.readKeyPreviewAnimationDuration(
prefs, DebugSettings.PREF_KEY_PREVIEW_SHOW_UP_DURATION,
res.getInteger(R.integer.config_key_preview_show_up_duration));