aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-01-09 09:31:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-09 09:31:24 +0000
commitc912b2228a340354d7f951aad25c0bdfc1dee323 (patch)
treeb8bcc433a482e05b37baf1351db1cf42099c9f9b /java/src/com/android/inputmethod/latin/settings/SettingsValues.java
parent85040b7cde2a8d7165bcfff7101ac09caea2af52 (diff)
parent860c3b8e8cc65e2a2b26b4da0356b5bcff6450e6 (diff)
downloadlatinime-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.java10
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);