diff options
author | 2014-01-09 09:31:24 +0000 | |
---|---|---|
committer | 2014-01-09 09:31:24 +0000 | |
commit | c912b2228a340354d7f951aad25c0bdfc1dee323 (patch) | |
tree | b8bcc433a482e05b37baf1351db1cf42099c9f9b /java/src/com/android/inputmethod/latin/settings/SettingsValues.java | |
parent | 85040b7cde2a8d7165bcfff7101ac09caea2af52 (diff) | |
parent | 860c3b8e8cc65e2a2b26b4da0356b5bcff6450e6 (diff) | |
download | latinime-c912b2228a340354d7f951aad25c0bdfc1dee323.tar.gz latinime-c912b2228a340354d7f951aad25c0bdfc1dee323.tar.xz latinime-c912b2228a340354d7f951aad25c0bdfc1dee323.zip |
Merge "Add American typography boolean to SpacingAndPunctuations"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/settings/SettingsValues.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/SettingsValues.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java index 3fa686ba7..6ecee8167 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java @@ -96,9 +96,9 @@ public final class SettingsValues { // Debug settings public final boolean mIsInternal; - public SettingsValues(final Context context, final SharedPreferences prefs, final Locale locale, - final Resources res, final InputAttributes inputAttributes) { - mLocale = locale; + public SettingsValues(final Context context, final SharedPreferences prefs, final Resources res, + final InputAttributes inputAttributes) { + mLocale = res.getConfiguration().locale; // Get the resources mDelayUpdateOldSuggestions = res.getInteger(R.integer.config_delay_update_old_suggestions); mSpacingAndPunctuations = new SpacingAndPunctuations(res); @@ -166,12 +166,13 @@ public final class SettingsValues { } } + // TODO: Remove this constructor. // Only for tests private SettingsValues(final Locale locale) { // TODO: locale is saved, but not used yet. May have to change this if tests require. mLocale = locale; mDelayUpdateOldSuggestions = 0; - mSpacingAndPunctuations = SpacingAndPunctuations.DEFAULT; + mSpacingAndPunctuations = new SpacingAndPunctuations(locale); mHintToSaveText = "Touch again to save"; mInputAttributes = new InputAttributes(null, false /* isFullscreenMode */); mAutoCap = true; @@ -206,6 +207,7 @@ public final class SettingsValues { mAppWorkarounds.set(null); } + // TODO: Remove this method. @UsedForTesting public static SettingsValues makeDummySettingsValuesForTest(final Locale locale) { return new SettingsValues(locale); |