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 16:59:23 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-01-09 18:17:29 +0900
commit860c3b8e8cc65e2a2b26b4da0356b5bcff6450e6 (patch)
tree6c9a0d1957663d17cb1577f6672e6d5b4c1c7613 /java/src/com/android/inputmethod/latin/settings/SettingsValues.java
parent941a4540bc648f329d3dd8e357d33ccd80694679 (diff)
downloadlatinime-860c3b8e8cc65e2a2b26b4da0356b5bcff6450e6.tar.gz
latinime-860c3b8e8cc65e2a2b26b4da0356b5bcff6450e6.tar.xz
latinime-860c3b8e8cc65e2a2b26b4da0356b5bcff6450e6.zip
Add American typography boolean to SpacingAndPunctuations
Change-Id: Ic2663eaef38fbe7c5bd1fb3a81771e94c2d4de52
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);