From 44f144ab3ae6824a64d309add591cfc469451480 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 20 Mar 2014 15:28:05 +0900 Subject: [PATCH] Remove reference of KeyboardTextsSet from SpacingAndPunctuations Change-Id: I76a8fcbd2466bcaf9cd85501af270db5aa913999 --- .../config-spacing-and-punctuations.xml | 25 +++++++++++++++++++ .../config-spacing-and-punctuations.xml | 25 +++++++++++++++++++ .../config-spacing-and-punctuations.xml | 2 +- .../config-spacing-and-punctuations.xml | 2 +- .../settings/SpacingAndPunctuations.java | 5 +--- 5 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 java/res/values-iw-sw600dp/config-spacing-and-punctuations.xml create mode 100644 java/res/values-iw/config-spacing-and-punctuations.xml diff --git a/java/res/values-iw-sw600dp/config-spacing-and-punctuations.xml b/java/res/values-iw-sw600dp/config-spacing-and-punctuations.xml new file mode 100644 index 000000000..b562b18db --- /dev/null +++ b/java/res/values-iw-sw600dp/config-spacing-and-punctuations.xml @@ -0,0 +1,25 @@ + + + + + + :,;,\",(|),)|(,\',-,/,@,_ + diff --git a/java/res/values-iw/config-spacing-and-punctuations.xml b/java/res/values-iw/config-spacing-and-punctuations.xml new file mode 100644 index 000000000..9a9e6ee7a --- /dev/null +++ b/java/res/values-iw/config-spacing-and-punctuations.xml @@ -0,0 +1,25 @@ + + + + + + !,?,\\,,:,;,\",(|),)|(,\',-,/,@,_ + diff --git a/java/res/values-sw600dp/config-spacing-and-punctuations.xml b/java/res/values-sw600dp/config-spacing-and-punctuations.xml index 9c12cf49a..4d19412a3 100644 --- a/java/res/values-sw600dp/config-spacing-and-punctuations.xml +++ b/java/res/values-sw600dp/config-spacing-and-punctuations.xml @@ -19,5 +19,5 @@ --> - :,;,\",!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis,\',-,/,@,_ + :,;,\",(,),\',-,/,@,_ diff --git a/java/res/values/config-spacing-and-punctuations.xml b/java/res/values/config-spacing-and-punctuations.xml index 1dd2e1f6b..ad5663d9b 100644 --- a/java/res/values/config-spacing-and-punctuations.xml +++ b/java/res/values/config-spacing-and-punctuations.xml @@ -21,7 +21,7 @@ - !,?,\\,,:,;,\",!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis,\',-,/,@,_ + !,?,\\,,:,;,\",(,),\',-,/,@,_ ([{& diff --git a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java index 5954758aa..796921f71 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.keyboard.internal.KeyboardTextsSet; import com.android.inputmethod.keyboard.internal.MoreKeySpec; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.PunctuationSuggestions; @@ -61,10 +60,8 @@ public final class SpacingAndPunctuations { // English variants. German rules (not "German typography") also have small gotchas. mUsesAmericanTypography = Locale.ENGLISH.getLanguage().equals(locale.getLanguage()); mUsesGermanRules = Locale.GERMAN.getLanguage().equals(locale.getLanguage()); - final KeyboardTextsSet textsSet = new KeyboardTextsSet(); - textsSet.setLocale(locale); final String[] suggestPuncsSpec = MoreKeySpec.splitKeySpecs( - textsSet.resolveTextReference(res.getString(R.string.suggested_punctuations))); + res.getString(R.string.suggested_punctuations)); mSuggestPuncList = PunctuationSuggestions.newPunctuationSuggestions(suggestPuncsSpec); }