diff options
author | 2014-09-08 13:10:21 +0000 | |
---|---|---|
committer | 2014-09-08 13:10:21 +0000 | |
commit | 61e7afa6fa98939f9dcb9f7a2ebb5678a51d4201 (patch) | |
tree | 8a8220301c1bfa88e9adbe1a63b47e036cf82808 /java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java | |
parent | 50e8d5854b981b7fbad24fdb9c141ddf39eb904a (diff) | |
parent | 0eaa25e0b344e458873bb5626130d366ac395ef3 (diff) | |
download | latinime-61e7afa6fa98939f9dcb9f7a2ebb5678a51d4201.tar.gz latinime-61e7afa6fa98939f9dcb9f7a2ebb5678a51d4201.tar.xz latinime-61e7afa6fa98939f9dcb9f7a2ebb5678a51d4201.zip |
am 0eaa25e0: am 914078fd: Fix a bug where recorrection would stop on connectors
* commit '0eaa25e0b344e458873bb5626130d366ac395ef3':
Fix a bug where recorrection would stop on connectors
Diffstat (limited to 'java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java index b8d2a2248..49d81104d 100644 --- a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java +++ b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java @@ -18,6 +18,7 @@ package com.android.inputmethod.latin.settings; import android.content.res.Resources; +import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.keyboard.internal.MoreKeySpec; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.PunctuationSuggestions; @@ -68,6 +69,22 @@ public final class SpacingAndPunctuations { mSuggestPuncList = PunctuationSuggestions.newPunctuationSuggestions(suggestPuncsSpec); } + @UsedForTesting + public SpacingAndPunctuations(final SpacingAndPunctuations model, + final int[] overrideSortedWordSeparators) { + mSortedSymbolsPrecededBySpace = model.mSortedSymbolsPrecededBySpace; + mSortedSymbolsFollowedBySpace = model.mSortedSymbolsFollowedBySpace; + mSortedSymbolsClusteringTogether = model.mSortedSymbolsClusteringTogether; + mSortedWordConnectors = model.mSortedWordConnectors; + mSortedWordSeparators = overrideSortedWordSeparators; + mSuggestPuncList = model.mSuggestPuncList; + mSentenceSeparator = model.mSentenceSeparator; + mSentenceSeparatorAndSpace = model.mSentenceSeparatorAndSpace; + mCurrentLanguageHasSpaces = model.mCurrentLanguageHasSpaces; + mUsesAmericanTypography = model.mUsesAmericanTypography; + mUsesGermanRules = model.mUsesGermanRules; + } + public boolean isWordSeparator(final int code) { return Arrays.binarySearch(mSortedWordSeparators, code) >= 0; } |