diff options
author | 2014-01-09 18:29:11 +0900 | |
---|---|---|
committer | 2014-01-09 19:05:09 +0900 | |
commit | ee35e69eae734448d0aa90e46037273cc3f1e6ad (patch) | |
tree | 4b9fc06ecaddc7f43cdef1f2a78ea4a2848c2347 /java/src/com/android/inputmethod/latin/settings | |
parent | 494e2d6c17cdbf27615a2fbc02b12d2562bf7cd3 (diff) | |
download | latinime-ee35e69eae734448d0aa90e46037273cc3f1e6ad.tar.gz latinime-ee35e69eae734448d0aa90e46037273cc3f1e6ad.tar.xz latinime-ee35e69eae734448d0aa90e46037273cc3f1e6ad.zip |
Passing SpacingAndPunctuations to StringUtils.looksValidForDictionaryInsertion
This change must be checked in together with Iec437d6df0.
Change-Id: Idf745b8870965f3bdf690de7ff3b22f83f6204bf
Diffstat (limited to 'java/src/com/android/inputmethod/latin/settings')
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/SettingsValues.java | 48 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java | 19 |
2 files changed, 0 insertions, 67 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java index 6ecee8167..e4ae64fdc 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java @@ -24,7 +24,6 @@ import android.content.res.Resources; import android.util.Log; import android.view.inputmethod.EditorInfo; -import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.compat.AppWorkaroundsUtils; import com.android.inputmethod.latin.InputAttributes; import com.android.inputmethod.latin.R; @@ -166,53 +165,6 @@ 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 = new SpacingAndPunctuations(locale); - mHintToSaveText = "Touch again to save"; - mInputAttributes = new InputAttributes(null, false /* isFullscreenMode */); - mAutoCap = true; - mVibrateOn = true; - mSoundOn = true; - mKeyPreviewPopupOn = true; - mSlidingKeyInputPreviewEnabled = true; - mShowsVoiceInputKey = true; - mIncludesOtherImesInLanguageSwitchList = false; - mShowsLanguageSwitchKey = true; - mUseContactsDict = true; - mUsePersonalizedDicts = true; - mUseDoubleSpacePeriod = true; - mBlockPotentiallyOffensive = true; - mAutoCorrectEnabled = true; - mBigramPredictionEnabled = true; - mKeyLongpressTimeout = 300; - mKeypressVibrationDuration = 5; - mKeypressSoundVolume = 1; - mKeyPreviewPopupDismissDelay = 70; - mAutoCorrectionThreshold = 1; - mGestureInputEnabled = true; - mGestureTrailEnabled = true; - mGestureFloatingPreviewTextEnabled = true; - mPhraseGestureEnabled = true; - mCorrectionEnabled = mAutoCorrectEnabled && !mInputAttributes.mInputTypeNoAutoCorrect; - mSuggestionVisibility = 0; - mIsInternal = false; - mUseOnlyPersonalizationDictionaryForDebug = false; - mDisplayOrientation = Configuration.ORIENTATION_PORTRAIT; - mAppWorkarounds = new AsyncResultHolder<AppWorkaroundsUtils>(); - mAppWorkarounds.set(null); - } - - // TODO: Remove this method. - @UsedForTesting - public static SettingsValues makeDummySettingsValuesForTest(final Locale locale) { - return new SettingsValues(locale); - } - public boolean isApplicationSpecifiedCompletionsOn() { return mInputAttributes.mApplicationSpecifiedCompletionOn; } diff --git a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java index 124c97517..dbe30e260 100644 --- a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java +++ b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java @@ -18,7 +18,6 @@ package com.android.inputmethod.latin.settings; import android.content.res.Resources; -import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.keyboard.internal.KeySpecParser; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.Dictionary; @@ -43,24 +42,6 @@ public final class SpacingAndPunctuations { public final boolean mCurrentLanguageHasSpaces; public final boolean mUsesAmericanTypography; - // TODO: Remove this constructor. - @UsedForTesting - SpacingAndPunctuations(final Locale locale) { - mSymbolsPrecededBySpace = new int[] { '(', '[', '{', '&' }; - Arrays.sort(mSymbolsPrecededBySpace); - mSymbolsFollowedBySpace = new int[] { '.', ',', ';', ':', '!', '?', ')', ']', '}', '&' }; - Arrays.sort(mSymbolsFollowedBySpace); - mWordConnectors = new int[] { '\'', '-' }; - Arrays.sort(mWordConnectors); - mSentenceSeparator = Constants.CODE_PERIOD; - mSentenceSeparatorAndSpace = ". "; - final String[] suggestPuncsSpec = new String[] { "!", "?", ",", ":", ";" }; - mSuggestPuncList = createSuggestPuncList(suggestPuncsSpec); - mWordSeparators = "&\t \n()[]{}*&<>+=|.,;:!?/_\""; - mCurrentLanguageHasSpaces = true; - mUsesAmericanTypography = Locale.ENGLISH.getLanguage().equals(locale.getLanguage()); - } - public SpacingAndPunctuations(final Resources res) { mSymbolsPrecededBySpace = StringUtils.toCodePointArray(res.getString(R.string.symbols_preceded_by_space)); |