aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/event/Combiner.java14
-rw-r--r--java/src/com/android/inputmethod/event/CombinerChain.java69
-rw-r--r--java/src/com/android/inputmethod/event/DeadKeyCombiner.java5
-rw-r--r--java/src/com/android/inputmethod/event/EventDecoderSpec.java26
-rw-r--r--java/src/com/android/inputmethod/event/EventInterpreter.java58
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java341
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java19
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java6
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java40
-rw-r--r--java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java5
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java5
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java5
-rw-r--r--java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java13
13 files changed, 300 insertions, 306 deletions
diff --git a/java/src/com/android/inputmethod/event/Combiner.java b/java/src/com/android/inputmethod/event/Combiner.java
index ab6b70c04..c3869a299 100644
--- a/java/src/com/android/inputmethod/event/Combiner.java
+++ b/java/src/com/android/inputmethod/event/Combiner.java
@@ -16,14 +16,22 @@
package com.android.inputmethod.event;
+import java.util.ArrayList;
+
/**
- * A generic interface for combiners.
+ * A generic interface for combiners. Combiners are objects that transform chains of input events
+ * into committable strings and manage feedback to show to the user on the combining state.
*/
public interface Combiner {
/**
- * Combine an event with the existing state and return the new event.
+ * Process an event, possibly combining it with the existing state and return the new event.
+ *
+ * If this event does not result in any new event getting passed down the chain, this method
+ * returns null. It may also modify the previous event list if appropriate.
+ *
+ * @param previousEvents the previous events in this composition.
* @param event the event to combine with the existing state.
* @return the resulting event.
*/
- Event combine(Event event);
+ Event processEvent(ArrayList<Event> previousEvents, Event event);
}
diff --git a/java/src/com/android/inputmethod/event/CombinerChain.java b/java/src/com/android/inputmethod/event/CombinerChain.java
new file mode 100644
index 000000000..0e01c819a
--- /dev/null
+++ b/java/src/com/android/inputmethod/event/CombinerChain.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.event;
+
+import com.android.inputmethod.latin.utils.CollectionUtils;
+
+import java.util.ArrayList;
+
+/**
+ * This class implements the logic chain between receiving events and generating code points.
+ *
+ * Event sources are multiple. It may be a hardware keyboard, a D-PAD, a software keyboard,
+ * or any exotic input source.
+ * This class will orchestrate the composing chain that starts with an event as its input. Each
+ * composer will be given turns one after the other.
+ * The output is composed of two sequences of code points: the first, representing the already
+ * finished combining part, will be shown normally as the composing string, while the second is
+ * feedback on the composing state and will typically be shown with different styling such as
+ * a colored background.
+ */
+public class CombinerChain {
+ // TODO: Create an object type to represent input material + visual feedback + decoding state
+
+ private final ArrayList<Combiner> mCombiners;
+
+ /**
+ * Create an combiner chain.
+ *
+ * The combiner chain takes events as inputs and outputs code points and combining state.
+ * For example, if the input language is Japanese, the combining chain will typically perform
+ * kana conversion.
+ *
+ * @param combinerList A list of combiners to be applied in order.
+ */
+ public CombinerChain(final Combiner... combinerList) {
+ mCombiners = CollectionUtils.newArrayList();
+ // The dead key combiner is always active, and always first
+ mCombiners.add(new DeadKeyCombiner());
+ }
+
+ // Pass a new event through the whole chain.
+ public void processEvent(final ArrayList<Event> previousEvents, final Event newEvent) {
+ final ArrayList<Event> modifiablePreviousEvents = new ArrayList<Event>(previousEvents);
+ Event event = newEvent;
+ for (final Combiner combiner : mCombiners) {
+ // A combiner can never return more than one event; it can return several
+ // code points, but they should be encapsulated within one event.
+ event = combiner.processEvent(modifiablePreviousEvents, event);
+ if (null == event) {
+ // Combiners return null if they eat the event.
+ return;
+ }
+ }
+ }
+}
diff --git a/java/src/com/android/inputmethod/event/DeadKeyCombiner.java b/java/src/com/android/inputmethod/event/DeadKeyCombiner.java
index ae8639713..f77ce6347 100644
--- a/java/src/com/android/inputmethod/event/DeadKeyCombiner.java
+++ b/java/src/com/android/inputmethod/event/DeadKeyCombiner.java
@@ -21,14 +21,17 @@ import android.view.KeyCharacterMap;
import com.android.inputmethod.latin.Constants;
+import java.util.ArrayList;
+
/**
* A combiner that handles dead keys.
*/
public class DeadKeyCombiner implements Combiner {
+ // TODO: make this a list of events instead
final StringBuilder mDeadSequence = new StringBuilder();
@Override
- public Event combine(final Event event) {
+ public Event processEvent(final ArrayList<Event> previousEvents, final Event event) {
if (null == event) return null; // Just in case some combiner is broken
if (TextUtils.isEmpty(mDeadSequence)) {
if (event.isDead()) {
diff --git a/java/src/com/android/inputmethod/event/EventDecoderSpec.java b/java/src/com/android/inputmethod/event/EventDecoderSpec.java
deleted file mode 100644
index 303b4b4c9..000000000
--- a/java/src/com/android/inputmethod/event/EventDecoderSpec.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.event;
-
-/**
- * Class describing a decoder chain. This will depend on the language and the input medium (soft
- * or hard keyboard for example).
- */
-public class EventDecoderSpec {
- public EventDecoderSpec() {
- }
-}
diff --git a/java/src/com/android/inputmethod/event/EventInterpreter.java b/java/src/com/android/inputmethod/event/EventInterpreter.java
deleted file mode 100644
index bcf10fc58..000000000
--- a/java/src/com/android/inputmethod/event/EventInterpreter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.event;
-
-import com.android.inputmethod.latin.utils.CollectionUtils;
-
-import java.util.ArrayList;
-
-/**
- * This class implements the logic between receiving events and generating code points.
- *
- * Event sources are multiple. It may be a hardware keyboard, a D-PAD, a software keyboard,
- * or any exotic input source.
- * This class will orchestrate the decoding chain that starts with an event and ends up with
- * a stream of code points + decoding state.
- */
-public class EventInterpreter {
- // TODO: Implement an object pool for events, as we'll create a lot of them
- // TODO: Create a combiner
- // TODO: Create an object type to represent input material + visual feedback + decoding state
-
- private final EventDecoderSpec mDecoderSpec;
- private final ArrayList<Combiner> mCombiners;
-
- /**
- * Create an event interpreter according to a specification.
- *
- * The specification contains information about what to do with events. Typically, it will
- * contain information about the type of keyboards - for example, if hardware keyboard(s) is/are
- * attached, their type will be included here so that the decoder knows what to do with each
- * keypress (a 10-key keyboard is not handled like a qwerty-ish keyboard).
- * It also contains information for combining characters. For example, if the input language
- * is Japanese, the specification will typically request kana conversion.
- * Also note that the specification can be null. This means that we need to create a default
- * interpreter that does no specific combining, and assumes the most common cases.
- *
- * @param specification the specification for event interpretation. null for default.
- */
- public EventInterpreter(final EventDecoderSpec specification) {
- mDecoderSpec = null != specification ? specification : new EventDecoderSpec();
- mCombiners = CollectionUtils.newArrayList();
- mCombiners.add(new DeadKeyCombiner());
- }
-}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
index 2ac51de32..1d9ee90fb 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
@@ -111,30 +111,30 @@ public final class KeyboardTextsTable {
/* 29: 5 */ "keylabel_for_east_slavic_row2_11",
/* 30: 5 */ "keylabel_for_east_slavic_row3_5",
/* 31: 5 */ "more_keys_for_cyrillic_soft_sign",
- /* 32: 5 */ "more_keys_for_punctuation",
- /* 33: 4 */ "more_keys_for_nordic_row2_11",
- /* 34: 4 */ "keylabel_for_symbols_1",
- /* 35: 4 */ "keylabel_for_symbols_2",
- /* 36: 4 */ "keylabel_for_symbols_3",
- /* 37: 4 */ "keylabel_for_symbols_4",
- /* 38: 4 */ "keylabel_for_symbols_5",
- /* 39: 4 */ "keylabel_for_symbols_6",
- /* 40: 4 */ "keylabel_for_symbols_7",
- /* 41: 4 */ "keylabel_for_symbols_8",
- /* 42: 4 */ "keylabel_for_symbols_9",
- /* 43: 4 */ "keylabel_for_symbols_0",
- /* 44: 4 */ "label_to_symbol_key",
- /* 45: 4 */ "label_to_symbol_with_microphone_key",
- /* 46: 4 */ "additional_more_keys_for_symbols_1",
- /* 47: 4 */ "additional_more_keys_for_symbols_2",
- /* 48: 4 */ "additional_more_keys_for_symbols_3",
- /* 49: 4 */ "additional_more_keys_for_symbols_4",
- /* 50: 4 */ "additional_more_keys_for_symbols_5",
- /* 51: 4 */ "additional_more_keys_for_symbols_6",
- /* 52: 4 */ "additional_more_keys_for_symbols_7",
- /* 53: 4 */ "additional_more_keys_for_symbols_8",
- /* 54: 4 */ "additional_more_keys_for_symbols_9",
- /* 55: 4 */ "additional_more_keys_for_symbols_0",
+ /* 32: 4 */ "more_keys_for_nordic_row2_11",
+ /* 33: 4 */ "keylabel_for_symbols_1",
+ /* 34: 4 */ "keylabel_for_symbols_2",
+ /* 35: 4 */ "keylabel_for_symbols_3",
+ /* 36: 4 */ "keylabel_for_symbols_4",
+ /* 37: 4 */ "keylabel_for_symbols_5",
+ /* 38: 4 */ "keylabel_for_symbols_6",
+ /* 39: 4 */ "keylabel_for_symbols_7",
+ /* 40: 4 */ "keylabel_for_symbols_8",
+ /* 41: 4 */ "keylabel_for_symbols_9",
+ /* 42: 4 */ "keylabel_for_symbols_0",
+ /* 43: 4 */ "label_to_symbol_key",
+ /* 44: 4 */ "label_to_symbol_with_microphone_key",
+ /* 45: 4 */ "additional_more_keys_for_symbols_1",
+ /* 46: 4 */ "additional_more_keys_for_symbols_2",
+ /* 47: 4 */ "additional_more_keys_for_symbols_3",
+ /* 48: 4 */ "additional_more_keys_for_symbols_4",
+ /* 49: 4 */ "additional_more_keys_for_symbols_5",
+ /* 50: 4 */ "additional_more_keys_for_symbols_6",
+ /* 51: 4 */ "additional_more_keys_for_symbols_7",
+ /* 52: 4 */ "additional_more_keys_for_symbols_8",
+ /* 53: 4 */ "additional_more_keys_for_symbols_9",
+ /* 54: 4 */ "additional_more_keys_for_symbols_0",
+ /* 55: 3 */ "more_keys_for_punctuation",
/* 56: 3 */ "more_keys_for_star",
/* 57: 3 */ "keyspec_left_parenthesis",
/* 58: 3 */ "keyspec_right_parenthesis",
@@ -177,78 +177,77 @@ public final class KeyboardTextsTable {
/* 95: 2 */ "more_keys_for_right_parenthesis",
/* 96: 2 */ "more_keys_for_arabic_diacritics",
/* 97: 2 */ "keylabel_for_comma",
- /* 98: 2 */ "more_keys_for_comma",
- /* 99: 2 */ "keyhintlabel_for_tablet_comma",
- /* 100: 2 */ "more_keys_for_tablet_comma",
- /* 101: 2 */ "keyhintlabel_for_period",
- /* 102: 2 */ "more_keys_for_period",
- /* 103: 2 */ "keyhintlabel_for_tablet_period",
- /* 104: 2 */ "keylabel_for_symbols_question",
- /* 105: 2 */ "keylabel_for_symbols_semicolon",
- /* 106: 2 */ "keylabel_for_symbols_percent",
- /* 107: 2 */ "more_keys_for_symbols_semicolon",
- /* 108: 2 */ "more_keys_for_symbols_percent",
- /* 109: 1 */ "more_keys_for_v",
- /* 110: 1 */ "more_keys_for_j",
- /* 111: 1 */ "more_keys_for_cyrillic_ka",
- /* 112: 1 */ "more_keys_for_cyrillic_a",
- /* 113: 1 */ "more_keys_for_east_slavic_row2_11",
- /* 114: 1 */ "more_keys_for_currency_dollar",
- /* 115: 1 */ "more_keys_for_tablet_punctuation",
- /* 116: 1 */ "more_keys_for_plus",
- /* 117: 1 */ "more_keys_for_less_than",
- /* 118: 1 */ "more_keys_for_greater_than",
- /* 119: 1 */ "keylabel_for_period",
- /* 120: 1 */ "keylabel_for_tablet_period",
- /* 121: 1 */ "more_keys_for_exclamation",
- /* 122: 1 */ "more_keys_for_q",
- /* 123: 1 */ "more_keys_for_x",
- /* 124: 1 */ "keylabel_for_q",
- /* 125: 1 */ "keylabel_for_w",
- /* 126: 1 */ "keylabel_for_y",
- /* 127: 1 */ "keylabel_for_x",
- /* 128: 0 */ "more_keys_for_currency",
- /* 129: 0 */ "more_keys_for_symbols_1",
- /* 130: 0 */ "more_keys_for_symbols_2",
- /* 131: 0 */ "more_keys_for_symbols_3",
- /* 132: 0 */ "more_keys_for_symbols_4",
- /* 133: 0 */ "more_keys_for_symbols_5",
- /* 134: 0 */ "more_keys_for_symbols_6",
- /* 135: 0 */ "more_keys_for_symbols_7",
- /* 136: 0 */ "more_keys_for_symbols_8",
- /* 137: 0 */ "more_keys_for_symbols_9",
- /* 138: 0 */ "more_keys_for_symbols_0",
- /* 139: 0 */ "more_keys_for_am_pm",
- /* 140: 0 */ "settings_as_more_key",
- /* 141: 0 */ "shortcut_as_more_key",
- /* 142: 0 */ "action_next_as_more_key",
- /* 143: 0 */ "action_previous_as_more_key",
- /* 144: 0 */ "label_to_more_symbol_key",
- /* 145: 0 */ "label_to_more_symbol_for_tablet_key",
- /* 146: 0 */ "label_to_phone_numeric_key",
- /* 147: 0 */ "label_to_phone_symbols_key",
- /* 148: 0 */ "label_time_am",
- /* 149: 0 */ "label_time_pm",
- /* 150: 0 */ "keylabel_for_popular_domain",
- /* 151: 0 */ "more_keys_for_popular_domain",
- /* 152: 0 */ "keyspecs_for_left_parenthesis_more_keys",
- /* 153: 0 */ "keyspecs_for_right_parenthesis_more_keys",
- /* 154: 0 */ "single_laqm_raqm",
- /* 155: 0 */ "single_raqm_laqm",
- /* 156: 0 */ "double_laqm_raqm",
- /* 157: 0 */ "double_raqm_laqm",
- /* 158: 0 */ "single_lqm_rqm",
- /* 159: 0 */ "single_9qm_lqm",
- /* 160: 0 */ "single_9qm_rqm",
- /* 161: 0 */ "single_rqm_9qm",
- /* 162: 0 */ "double_lqm_rqm",
- /* 163: 0 */ "double_9qm_lqm",
- /* 164: 0 */ "double_9qm_rqm",
- /* 165: 0 */ "double_rqm_9qm",
- /* 166: 0 */ "more_keys_for_single_quote",
- /* 167: 0 */ "more_keys_for_double_quote",
- /* 168: 0 */ "more_keys_for_tablet_double_quote",
- /* 169: 0 */ "emoji_key_as_more_key",
+ /* 98: 2 */ "keyhintlabel_for_tablet_comma",
+ /* 99: 2 */ "more_keys_for_tablet_comma",
+ /* 100: 2 */ "keyhintlabel_for_period",
+ /* 101: 2 */ "more_keys_for_period",
+ /* 102: 2 */ "keyhintlabel_for_tablet_period",
+ /* 103: 2 */ "keylabel_for_symbols_question",
+ /* 104: 2 */ "keylabel_for_symbols_semicolon",
+ /* 105: 2 */ "keylabel_for_symbols_percent",
+ /* 106: 2 */ "more_keys_for_symbols_semicolon",
+ /* 107: 2 */ "more_keys_for_symbols_percent",
+ /* 108: 1 */ "more_keys_for_v",
+ /* 109: 1 */ "more_keys_for_j",
+ /* 110: 1 */ "more_keys_for_cyrillic_ka",
+ /* 111: 1 */ "more_keys_for_cyrillic_a",
+ /* 112: 1 */ "more_keys_for_east_slavic_row2_11",
+ /* 113: 1 */ "more_keys_for_currency_dollar",
+ /* 114: 1 */ "more_keys_for_tablet_punctuation",
+ /* 115: 1 */ "more_keys_for_plus",
+ /* 116: 1 */ "more_keys_for_less_than",
+ /* 117: 1 */ "more_keys_for_greater_than",
+ /* 118: 1 */ "keylabel_for_period",
+ /* 119: 1 */ "keylabel_for_tablet_period",
+ /* 120: 1 */ "more_keys_for_exclamation",
+ /* 121: 1 */ "more_keys_for_q",
+ /* 122: 1 */ "more_keys_for_x",
+ /* 123: 1 */ "keylabel_for_q",
+ /* 124: 1 */ "keylabel_for_w",
+ /* 125: 1 */ "keylabel_for_y",
+ /* 126: 1 */ "keylabel_for_x",
+ /* 127: 0 */ "more_keys_for_currency",
+ /* 128: 0 */ "more_keys_for_symbols_1",
+ /* 129: 0 */ "more_keys_for_symbols_2",
+ /* 130: 0 */ "more_keys_for_symbols_3",
+ /* 131: 0 */ "more_keys_for_symbols_4",
+ /* 132: 0 */ "more_keys_for_symbols_5",
+ /* 133: 0 */ "more_keys_for_symbols_6",
+ /* 134: 0 */ "more_keys_for_symbols_7",
+ /* 135: 0 */ "more_keys_for_symbols_8",
+ /* 136: 0 */ "more_keys_for_symbols_9",
+ /* 137: 0 */ "more_keys_for_symbols_0",
+ /* 138: 0 */ "more_keys_for_am_pm",
+ /* 139: 0 */ "settings_as_more_key",
+ /* 140: 0 */ "shortcut_as_more_key",
+ /* 141: 0 */ "action_next_as_more_key",
+ /* 142: 0 */ "action_previous_as_more_key",
+ /* 143: 0 */ "label_to_more_symbol_key",
+ /* 144: 0 */ "label_to_more_symbol_for_tablet_key",
+ /* 145: 0 */ "label_to_phone_numeric_key",
+ /* 146: 0 */ "label_to_phone_symbols_key",
+ /* 147: 0 */ "label_time_am",
+ /* 148: 0 */ "label_time_pm",
+ /* 149: 0 */ "keylabel_for_popular_domain",
+ /* 150: 0 */ "more_keys_for_popular_domain",
+ /* 151: 0 */ "keyspecs_for_left_parenthesis_more_keys",
+ /* 152: 0 */ "keyspecs_for_right_parenthesis_more_keys",
+ /* 153: 0 */ "single_laqm_raqm",
+ /* 154: 0 */ "single_raqm_laqm",
+ /* 155: 0 */ "double_laqm_raqm",
+ /* 156: 0 */ "double_raqm_laqm",
+ /* 157: 0 */ "single_lqm_rqm",
+ /* 158: 0 */ "single_9qm_lqm",
+ /* 159: 0 */ "single_9qm_rqm",
+ /* 160: 0 */ "single_rqm_9qm",
+ /* 161: 0 */ "double_lqm_rqm",
+ /* 162: 0 */ "double_9qm_lqm",
+ /* 163: 0 */ "double_9qm_rqm",
+ /* 164: 0 */ "double_rqm_9qm",
+ /* 165: 0 */ "more_keys_for_single_quote",
+ /* 166: 0 */ "more_keys_for_double_quote",
+ /* 167: 0 */ "more_keys_for_tablet_double_quote",
+ /* 168: 0 */ "emoji_key_as_more_key",
};
private static final String EMPTY = "";
@@ -270,10 +269,8 @@ public final class KeyboardTextsTable {
/* double_angle_quotes */ "!text/double_laqm_raqm",
/* keylabel_for_currency */ "$",
/* more_keys_for_r ~ */
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- /* ~ more_keys_for_cyrillic_soft_sign */
- /* more_keys_for_punctuation */ "!fixedColumnOrder!8,;,/,!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis,#,!,\\,,?,&,\\%,+,\",-,:,',@",
- /* more_keys_for_nordic_row2_11 */ EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
+ /* ~ more_keys_for_nordic_row2_11 */
/* keylabel_for_symbols_1 */ "1",
/* keylabel_for_symbols_2 */ "2",
/* keylabel_for_symbols_3 */ "3",
@@ -292,6 +289,7 @@ public final class KeyboardTextsTable {
/* additional_more_keys_for_symbols_1 ~ */
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
/* ~ additional_more_keys_for_symbols_0 */
+ /* more_keys_for_punctuation */ "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&",
// U+2020: "†" DAGGER
// U+2021: "‡" DOUBLE DAGGER
// U+2605: "★" BLACK STAR
@@ -339,8 +337,8 @@ public final class KeyboardTextsTable {
/* more_keys_for_arabic_diacritics */ EMPTY,
// Comma key
/* keylabel_for_comma */ ",",
- /* more_keys_for_comma ~ */
- EMPTY, EMPTY, EMPTY, EMPTY,
+ /* keyhintlabel_for_tablet_comma ~ */
+ EMPTY, EMPTY, EMPTY,
/* ~ keyhintlabel_for_period */
/* more_keys_for_period */ "!text/more_keys_for_punctuation",
/* keyhintlabel_for_tablet_period */ EMPTY,
@@ -359,7 +357,7 @@ public final class KeyboardTextsTable {
// U+00A5: "¥" YEN SIGN
// U+20B1: "₱" PESO SIGN
/* more_keys_for_currency_dollar */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1",
- /* more_keys_for_tablet_punctuation */ "!fixedColumnOrder!7,;,/,!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis,#,',\\,,&,\\%,+,\",-,:,@",
+ /* more_keys_for_tablet_punctuation */ "!autoColumnOrder!7,\\,,',#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,@,:,-,\",+,\\%,&",
// U+00B1: "±" PLUS-MINUS SIGN
/* more_keys_for_plus */ "\u00B1",
/* more_keys_for_less_than */ "!fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_left_double_angle_quote",
@@ -531,10 +529,8 @@ public final class KeyboardTextsTable {
/* label_to_alpha_key */ "\u0623\u200C\u0628\u200C\u062C",
/* more_keys_for_s ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null,
- /* ~ more_keys_for_cyrillic_soft_sign */
- /* more_keys_for_punctuation */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(",
- /* more_keys_for_nordic_row2_11 */ null,
+ null, null, null, null, null, null, null, null,
+ /* ~ more_keys_for_nordic_row2_11 */
// U+0661: "١" ARABIC-INDIC DIGIT ONE
/* keylabel_for_symbols_1 */ "\u0661",
// U+0662: "٢" ARABIC-INDIC DIGIT TWO
@@ -573,6 +569,7 @@ public final class KeyboardTextsTable {
// U+066B: "٫" ARABIC DECIMAL SEPARATOR
// U+066C: "٬" ARABIC THOUSANDS SEPARATOR
/* additional_more_keys_for_symbols_0 */ "0,\u066B,\u066C",
+ /* more_keys_for_punctuation */ null,
// U+2605: "★" BLACK STAR
// U+066D: "٭" ARABIC FIVE POINTED STAR
/* more_keys_for_star */ "\u2605,\u066D",
@@ -634,7 +631,6 @@ public final class KeyboardTextsTable {
/* more_keys_for_arabic_diacritics */ "!fixedColumnOrder!7, \u0655|\u0655, \u0654|\u0654, \u0652|\u0652, \u064D|\u064D, \u064C|\u064C, \u064B|\u064B, \u0651|\u0651, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u0650|\u0650, \u064F|\u064F, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
// U+060C: "،" ARABIC COMMA
/* keylabel_for_comma */ "\u060C",
- /* more_keys_for_comma */ "\\,",
/* keyhintlabel_for_tablet_comma */ "\u061F",
/* more_keys_for_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\",\'",
// U+0651: "ّ" ARABIC SHADDA
@@ -807,23 +803,23 @@ public final class KeyboardTextsTable {
/* more_keys_for_l */ "l\u00B7l,\u0142",
/* more_keys_for_g ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null,
- /* ~ more_keys_for_cyrillic_soft_sign */
- // U+00B7: "·" MIDDLE DOT
- /* more_keys_for_punctuation */ "!fixedColumnOrder!9,;,/,(,),#,\u00B7,!,\\,,?,&,\\%,+,\",-,:,',@",
- /* more_keys_for_nordic_row2_11 ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null,
+ /* ~ additional_more_keys_for_symbols_0 */
+ // U+00B7: "·" MIDDLE DOT
+ /* more_keys_for_punctuation */ "!autoColumnOrder!9,\\,,?,!,\u00B7,#,),(,/,;,',@,:,-,\",+,\\%,&",
+ /* more_keys_for_star ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null,
/* ~ more_keys_for_swiss_row2_11 */
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
/* keylabel_for_spanish_row2_10 */ "\u00E7",
/* more_keys_for_bullet ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null,
+ null, null, null, null, null, null,
/* ~ more_keys_for_currency_dollar */
- /* more_keys_for_tablet_punctuation */ "!fixedColumnOrder!8,;,/,(,),#,\u00B7,',\\,,&,\\%,+,\",-,:,@",
+ /* more_keys_for_tablet_punctuation */ "!autoColumnOrder!8,\\,,',\u00B7,#,),(,/,;,@,:,-,\",+,\\%,&",
};
/* Language cs: Czech */
@@ -967,8 +963,8 @@ public final class KeyboardTextsTable {
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
/* more_keys_for_nordic_row2_10 */ "\u00E4",
/* keylabel_for_east_slavic_row1_9 ~ */
- null, null, null, null, null, null,
- /* ~ more_keys_for_punctuation */
+ null, null, null, null, null,
+ /* ~ more_keys_for_cyrillic_soft_sign */
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
/* more_keys_for_nordic_row2_11 */ "\u00F6",
};
@@ -1237,7 +1233,6 @@ public final class KeyboardTextsTable {
/* keylabel_for_spanish_row2_10 */ "\u0135",
/* more_keys_for_bullet ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null,
/* ~ more_keys_for_symbols_percent */
// U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX
/* more_keys_for_v */ "w,\u0175",
@@ -1310,11 +1305,13 @@ public final class KeyboardTextsTable {
/* more_keys_for_n */ "\u00F1,\u0144",
/* single_quotes ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null,
- /* ~ more_keys_for_cyrillic_soft_sign */
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null,
+ /* ~ additional_more_keys_for_symbols_0 */
// U+00A1: "¡" INVERTED EXCLAMATION MARK
// U+00BF: "¿" INVERTED QUESTION MARK
- /* more_keys_for_punctuation */ "!fixedColumnOrder!9,\u00A1,;,/,(,),#,!,\\,,?,\u00BF,&,\\%,+,\",-,:,',@",
+ /* more_keys_for_punctuation */ "!autoColumnOrder!9,\\,,?,!,#,),(,/,;,\u00A1,',@,:,-,\",+,\\%,&,\u00BF",
};
/* Language et_EE: Estonian (Estonia) */
@@ -1491,13 +1488,8 @@ public final class KeyboardTextsTable {
// U+FDFC: "﷼" RIAL SIGN
/* keylabel_for_currency */ "\uFDFC",
/* more_keys_for_r ~ */
- null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~ more_keys_for_cyrillic_soft_sign */
- // U+061F: "؟" ARABIC QUESTION MARK
- // U+060C: "،" ARABIC COMMA
- // U+061B: "؛" ARABIC SEMICOLON
- /* more_keys_for_punctuation */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,!text/keyspec_left_parenthesis,!text/keyspec_right_parenthesis",
- /* more_keys_for_nordic_row2_11 */ null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~ more_keys_for_nordic_row2_11 */
// U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE
/* keylabel_for_symbols_1 */ "\u06F1",
// U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO
@@ -1536,6 +1528,7 @@ public final class KeyboardTextsTable {
// U+066B: "٫" ARABIC DECIMAL SEPARATOR
// U+066C: "٬" ARABIC THOUSANDS SEPARATOR
/* additional_more_keys_for_symbols_0 */ "0,\u066B,\u066C",
+ /* more_keys_for_punctuation */ null,
// U+2605: "★" BLACK STAR
// U+066D: "٭" ARABIC FIVE POINTED STAR
/* more_keys_for_star */ "\u2605,\u066D",
@@ -1593,7 +1586,6 @@ public final class KeyboardTextsTable {
/* more_keys_for_arabic_diacritics */ "!fixedColumnOrder!7, \u0655|\u0655, \u0652|\u0652, \u0651|\u0651, \u064C|\u064C, \u064D|\u064D, \u064B|\u064B, \u0654|\u0654, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u064F|\u064F, \u0650|\u0650, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
// U+060C: "،" ARABIC COMMA
/* keylabel_for_comma */ "\u060C",
- /* more_keys_for_comma */ "\\,",
/* keyhintlabel_for_tablet_comma */ "\u061F",
/* more_keys_for_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote",
// U+064B: "ً" ARABIC FATHATAN
@@ -1664,8 +1656,8 @@ public final class KeyboardTextsTable {
// U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
/* more_keys_for_nordic_row2_10 */ "\u00F8",
/* keylabel_for_east_slavic_row1_9 ~ */
- null, null, null, null, null, null,
- /* ~ more_keys_for_punctuation */
+ null, null, null, null, null,
+ /* ~ more_keys_for_cyrillic_soft_sign */
// U+00E6: "æ" LATIN SMALL LETTER AE
/* more_keys_for_nordic_row2_11 */ "\u00E6",
};
@@ -1813,7 +1805,7 @@ public final class KeyboardTextsTable {
// U+20B9: "₹" INDIAN RUPEE SIGN
/* keylabel_for_currency */ "\u20B9",
/* more_keys_for_r ~ */
- null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
/* ~ more_keys_for_nordic_row2_11 */
// U+0967: "१" DEVANAGARI DIGIT ONE
/* keylabel_for_symbols_1 */ "\u0967",
@@ -1951,21 +1943,22 @@ public final class KeyboardTextsTable {
/* label_to_alpha_key */ "\u0531\u0532\u0533",
/* more_keys_for_s ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null,
- /* ~ more_keys_for_cyrillic_soft_sign */
- // U+058A: "֊" ARMENIAN HYPHEN
- // U+055C: "՜" ARMENIAN EXCLAMATION MARK
- // U+055D: "՝" ARMENIAN COMMA
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~ additional_more_keys_for_symbols_0 */
// U+055E: "՞" ARMENIAN QUESTION MARK
- // U+0559: "ՙ" ARMENIAN MODIFIER LETTER LEFT HALF RING
+ // U+055C: "՜" ARMENIAN EXCLAMATION MARK
// U+055A: "՚" ARMENIAN APOSTROPHE
+ // U+0559: "ՙ" ARMENIAN MODIFIER LETTER LEFT HALF RING
+ // U+055D: "՝" ARMENIAN COMMA
// U+055B: "՛" ARMENIAN EMPHASIS MARK
+ // U+058A: "֊" ARMENIAN HYPHEN
+ // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+055F: "՟" ARMENIAN ABBREVIATION MARK
- /* more_keys_for_punctuation */ "!fixedColumnOrder!8,!,?,\u0559,\u055A,.,\u055C,\\,,\u055E,:,;,\u055F,\u00AB,\u00BB,\u058A,\u055D,\u055B",
- /* more_keys_for_nordic_row2_11 ~ */
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* more_keys_for_punctuation */ "!autoColumnOrder!8,\\,,\u055E,\u055C,.,\u055A,\u0559,?,!,\u055D,\u055B,\u058A,\u00BB,\u00AB,\u055F,;,:",
+ /* more_keys_for_star ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null,
/* ~ keyspec_right_single_angle_quote */
// U+058F: "֏" ARMENIAN DRAM SIGN
// TODO: Enable this when we have glyph for the following letter
@@ -1980,7 +1973,7 @@ public final class KeyboardTextsTable {
/* more_keys_for_h ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null,
/* ~ more_keys_for_greater_than */
// U+0589: "։" ARMENIAN FULL STOP
/* keylabel_for_period */ "\u0589",
@@ -2114,7 +2107,7 @@ public final class KeyboardTextsTable {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null,
- /* ~ additional_more_keys_for_symbols_0 */
+ /* ~ more_keys_for_punctuation */
// U+2605: "★" BLACK STAR
/* more_keys_for_star */ "\u2605",
// The all letters need to be mirrored are found at
@@ -2142,7 +2135,7 @@ public final class KeyboardTextsTable {
/* keylabel_for_tablet_comma ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null,
/* ~ more_keys_for_tablet_punctuation */
// U+00B1: "±" PLUS-MINUS SIGN
// U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN
@@ -2192,7 +2185,7 @@ public final class KeyboardTextsTable {
/* keylabel_for_east_slavic_row3_5 */ "\u0438",
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
/* more_keys_for_cyrillic_soft_sign */ "\u044A",
- /* more_keys_for_punctuation ~ */
+ /* more_keys_for_nordic_row2_11 ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
@@ -2210,7 +2203,7 @@ public final class KeyboardTextsTable {
/* more_keys_for_cyrillic_o */ "\u04E9",
/* keylabel_for_south_slavic_row1_6 ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null,
/* ~ more_keys_for_j */
// U+049B: "қ" CYRILLIC SMALL LETTER KA WITH DESCENDER
/* more_keys_for_cyrillic_ka */ "\u049B",
@@ -2237,7 +2230,7 @@ public final class KeyboardTextsTable {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
/* ~ more_keys_for_east_slavic_row2_11 */
// U+17DB: "៛" KHMER CURRENCY SYMBOL RIEL
/* more_keys_for_currency_dollar */ "\u17DB,\u00A2,\u00A3,\u20AC,\u00A5,\u20B1",
@@ -2271,7 +2264,7 @@ public final class KeyboardTextsTable {
/* keylabel_for_east_slavic_row3_5 */ "\u0438",
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
/* more_keys_for_cyrillic_soft_sign */ "\u044A",
- /* more_keys_for_punctuation ~ */
+ /* more_keys_for_nordic_row2_11 ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
@@ -2605,8 +2598,8 @@ public final class KeyboardTextsTable {
// U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
/* more_keys_for_nordic_row2_10 */ "\u00F6",
/* keylabel_for_east_slavic_row1_9 ~ */
- null, null, null, null, null, null,
- /* ~ more_keys_for_punctuation */
+ null, null, null, null, null,
+ /* ~ more_keys_for_cyrillic_soft_sign */
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
/* more_keys_for_nordic_row2_11 */ "\u00E4",
};
@@ -2627,7 +2620,7 @@ public final class KeyboardTextsTable {
// U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
/* keylabel_for_currency */ "\u0930\u0941.",
/* more_keys_for_r ~ */
- null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
/* ~ more_keys_for_nordic_row2_11 */
// U+0967: "१" DEVANAGARI DIGIT ONE
/* keylabel_for_symbols_1 */ "\u0967",
@@ -3170,8 +3163,8 @@ public final class KeyboardTextsTable {
// U+0153: "œ" LATIN SMALL LIGATURE OE
/* more_keys_for_nordic_row2_10 */ "\u00F8,\u0153",
/* keylabel_for_east_slavic_row1_9 ~ */
- null, null, null, null, null, null,
- /* ~ more_keys_for_punctuation */
+ null, null, null, null, null,
+ /* ~ more_keys_for_cyrillic_soft_sign */
// U+00E6: "æ" LATIN SMALL LETTER AE
/* more_keys_for_nordic_row2_11 */ "\u00E6",
};
@@ -3379,7 +3372,7 @@ public final class KeyboardTextsTable {
/* keylabel_for_east_slavic_row3_5 */ "\u0438",
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
/* more_keys_for_cyrillic_soft_sign */ "\u044A",
- /* more_keys_for_punctuation ~ */
+ /* more_keys_for_nordic_row2_11 ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
@@ -3660,7 +3653,7 @@ public final class KeyboardTextsTable {
/* more_keys_for_cyrillic_u ~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null,
+ null, null, null,
/* ~ more_keys_for_v */
// U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX
/* more_keys_for_j */ "\u0135",
@@ -3670,36 +3663,36 @@ public final class KeyboardTextsTable {
// Currently we are dropping the region from the key.
private static final Object[] LANGUAGES_AND_TEXTS = {
// "locale", TEXT_ARRAY, /* numberOfNonNullText/lengthOf_TEXT_ARRAY localeName */
- "DEFAULT", LANGUAGE_DEFAULT, /* 170/170 default */
+ "DEFAULT", LANGUAGE_DEFAULT, /* 169/169 default */
"af", LANGUAGE_af, /* 7/ 12 Afrikaans */
- "ar", LANGUAGE_ar, /* 58/109 Arabic */
+ "ar", LANGUAGE_ar, /* 56/108 Arabic */
"az", LANGUAGE_az_AZ, /* 8/ 17 Azerbaijani (Azerbaijan) */
"be", LANGUAGE_be_BY, /* 9/ 32 Belarusian (Belarus) */
"bg", LANGUAGE_bg, /* 2/ 10 Bulgarian */
- "ca", LANGUAGE_ca, /* 11/116 Catalan */
+ "ca", LANGUAGE_ca, /* 11/115 Catalan */
"cs", LANGUAGE_cs, /* 17/ 21 Czech */
- "da", LANGUAGE_da, /* 19/ 34 Danish */
+ "da", LANGUAGE_da, /* 19/ 33 Danish */
"de", LANGUAGE_de, /* 16/ 92 German */
"el", LANGUAGE_el, /* 1/ 10 Greek */
"en", LANGUAGE_en, /* 8/ 11 English */
- "eo", LANGUAGE_eo, /* 26/128 Esperanto */
- "es", LANGUAGE_es, /* 8/ 33 Spanish */
+ "eo", LANGUAGE_eo, /* 26/127 Esperanto */
+ "es", LANGUAGE_es, /* 8/ 56 Spanish */
"et", LANGUAGE_et_EE, /* 22/ 27 Estonian (Estonia) */
"eu", LANGUAGE_eu_ES, /* 7/ 8 Basque (Spain) */
- "fa", LANGUAGE_fa, /* 61/119 Persian */
- "fi", LANGUAGE_fi, /* 10/ 34 Finnish */
+ "fa", LANGUAGE_fa, /* 59/118 Persian */
+ "fi", LANGUAGE_fi, /* 10/ 33 Finnish */
"fr", LANGUAGE_fr, /* 13/ 92 French */
"gl", LANGUAGE_gl_ES, /* 7/ 8 Gallegan (Spain) */
- "hi", LANGUAGE_hi, /* 24/ 56 Hindi */
+ "hi", LANGUAGE_hi, /* 24/ 55 Hindi */
"hr", LANGUAGE_hr, /* 9/ 19 Croatian */
"hu", LANGUAGE_hu, /* 9/ 19 Hungarian */
- "hy", LANGUAGE_hy_AM, /* 8/122 Armenian (Armenia) */
+ "hy", LANGUAGE_hy_AM, /* 8/121 Armenian (Armenia) */
"is", LANGUAGE_is, /* 10/ 15 Icelandic */
"it", LANGUAGE_it, /* 5/ 5 Italian */
- "iw", LANGUAGE_iw, /* 20/117 Hebrew */
+ "iw", LANGUAGE_iw, /* 20/116 Hebrew */
"ka", LANGUAGE_ka_GE, /* 3/ 10 Georgian (Georgia) */
- "kk", LANGUAGE_kk, /* 15/114 Kazakh */
- "km", LANGUAGE_km_KH, /* 2/115 Khmer (Cambodia) */
+ "kk", LANGUAGE_kk, /* 15/113 Kazakh */
+ "km", LANGUAGE_km_KH, /* 2/114 Khmer (Cambodia) */
"ky", LANGUAGE_ky, /* 10/ 81 Kirghiz */
"lo", LANGUAGE_lo_LA, /* 2/ 20 Lao (Laos) */
"lt", LANGUAGE_lt, /* 18/ 22 Lithuanian */
@@ -3707,8 +3700,8 @@ public final class KeyboardTextsTable {
"mk", LANGUAGE_mk, /* 9/ 86 Macedonian */
"mn", LANGUAGE_mn_MN, /* 2/ 20 Mongolian (Mongolia) */
"my", LANGUAGE_my_MM, /* 1/ 10 Burmese (Myanmar) */
- "nb", LANGUAGE_nb, /* 11/ 34 Norwegian Bokmål */
- "ne", LANGUAGE_ne_NP, /* 24/ 56 Nepali (Nepal) */
+ "nb", LANGUAGE_nb, /* 11/ 33 Norwegian Bokmål */
+ "ne", LANGUAGE_ne_NP, /* 24/ 55 Nepali (Nepal) */
"nl", LANGUAGE_nl, /* 9/ 12 Dutch */
"pl", LANGUAGE_pl, /* 10/ 16 Polish */
"pt", LANGUAGE_pt, /* 6/ 6 Portuguese */
@@ -3718,7 +3711,7 @@ public final class KeyboardTextsTable {
"sk", LANGUAGE_sk, /* 20/ 22 Slovak */
"sl", LANGUAGE_sl, /* 8/ 19 Slovenian */
"sr", LANGUAGE_sr, /* 11/ 86 Serbian */
- "sv", LANGUAGE_sv, /* 21/ 34 Swedish */
+ "sv", LANGUAGE_sv, /* 21/ 33 Swedish */
"sw", LANGUAGE_sw, /* 9/ 17 Swahili */
"th", LANGUAGE_th, /* 2/ 20 Thai */
"tl", LANGUAGE_tl, /* 7/ 8 Tagalog */
@@ -3726,7 +3719,7 @@ public final class KeyboardTextsTable {
"uk", LANGUAGE_uk, /* 11/ 80 Ukrainian */
"vi", LANGUAGE_vi, /* 8/ 20 Vietnamese */
"zu", LANGUAGE_zu, /* 8/ 11 Zulu */
- "zz", LANGUAGE_zz, /* 19/111 Alphabet */
+ "zz", LANGUAGE_zz, /* 19/110 Alphabet */
};
static {
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index fc5c7f7ec..b6d477629 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -169,7 +169,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private int mDelayUpdateSuggestions;
private int mDelayUpdateShiftState;
- private long mDoubleSpacePeriodTimerStart;
public UIHandler(final LatinIME ownerInstance) {
super(ownerInstance);
@@ -283,10 +282,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE), mDelayUpdateShiftState);
}
- public void cancelUpdateShiftState() {
- removeMessages(MSG_UPDATE_SHIFT_STATE);
- }
-
@UsedForTesting
public void removeAllMessages() {
for (int i = 0; i <= MSG_LAST; ++i) {
@@ -314,19 +309,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
obtainMessage(MSG_ON_END_BATCH_INPUT, suggestedWords).sendToTarget();
}
- public void startDoubleSpacePeriodTimer() {
- mDoubleSpacePeriodTimerStart = SystemClock.uptimeMillis();
- }
-
- public void cancelDoubleSpacePeriodTimer() {
- mDoubleSpacePeriodTimerStart = 0;
- }
-
- public boolean isAcceptingDoubleSpacePeriod() {
- return SystemClock.uptimeMillis() - mDoubleSpacePeriodTimerStart
- < getOwnerInstance().mSettings.getCurrent().mDoubleSpacePeriodTimeout;
- }
-
// Working variables for the following methods.
private boolean mIsOrientationChanging;
private boolean mPendingSuccessiveImsCallback;
@@ -882,7 +864,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
setNeutralSuggestionStrip();
mHandler.cancelUpdateSuggestionStrip();
- mHandler.cancelDoubleSpacePeriodTimer();
mainKeyboardView.setMainDictionaryAvailability(null != suggest
? suggest.mDictionaryFacilitator.hasMainDictionary() : false);
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 2ac11aa29..29382fea4 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.latin;
+import com.android.inputmethod.event.CombinerChain;
import com.android.inputmethod.event.Event;
import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.CoordinateUtils;
@@ -40,6 +41,8 @@ public final class WordComposer {
public static final int CAPS_MODE_AUTO_SHIFTED = 0x5;
public static final int CAPS_MODE_AUTO_SHIFT_LOCKED = 0x7;
+ private CombinerChain mCombinerChain;
+
// An array of code points representing the characters typed so far.
// The array is limited to MAX_WORD_LENGTH code points, but mTypedWord extends past that
// and mCodePointSize can go past that. If mCodePointSize is greater than MAX_WORD_LENGTH,
@@ -87,6 +90,7 @@ public final class WordComposer {
private boolean mIsFirstCharCapitalized;
public WordComposer() {
+ mCombinerChain = new CombinerChain();
mPrimaryKeyCodes = new int[MAX_WORD_LENGTH];
mEvents = CollectionUtils.newArrayList();
mTypedWord = new StringBuilder(MAX_WORD_LENGTH);
@@ -101,6 +105,7 @@ public final class WordComposer {
}
public WordComposer(final WordComposer source) {
+ mCombinerChain = source.mCombinerChain;
mPrimaryKeyCodes = Arrays.copyOf(source.mPrimaryKeyCodes, source.mPrimaryKeyCodes.length);
mEvents = new ArrayList<Event>(source.mEvents);
mTypedWord = new StringBuilder(source.mTypedWord);
@@ -187,6 +192,7 @@ public final class WordComposer {
final int keyX = event.mX;
final int keyY = event.mY;
final int newIndex = size();
+ mCombinerChain.processEvent(mEvents, event);
mTypedWord.appendCodePoint(primaryCode);
mEvents.add(event);
refreshSize();
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 1eff42762..8faf17584 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -28,7 +28,6 @@ import android.view.inputmethod.EditorInfo;
import com.android.inputmethod.compat.SuggestionSpanUtils;
import com.android.inputmethod.event.Event;
-import com.android.inputmethod.event.EventInterpreter;
import com.android.inputmethod.event.InputTransaction;
import com.android.inputmethod.keyboard.KeyboardSwitcher;
import com.android.inputmethod.latin.Constants;
@@ -96,6 +95,7 @@ public final class InputLogic {
// TODO: This boolean is persistent state and causes large side effects at unexpected times.
// Find a way to remove it for readability.
private boolean mIsAutoCorrectionIndicatorOn;
+ private long mDoubleSpacePeriodCountdownStart;
public InputLogic(final LatinIME latinIME,
final SuggestionStripViewAccessor suggestionStripViewAccessor) {
@@ -138,6 +138,7 @@ public final class InputLogic {
// In some cases (namely, after rotation of the device) editorInfo.initialSelStart is lying
// so we try using some heuristics to find out about these and fix them.
mConnection.tryFixLyingCursorPosition();
+ cancelDoubleSpacePeriodCountdown();
mInputLogicHandler = new InputLogicHandler(mLatinIME, this);
}
@@ -406,7 +407,7 @@ public final class InputLogic {
// TODO: Consolidate the double-space period timer, mLastKeyTime, and the space state.
if (event.mCodePoint != Constants.CODE_SPACE) {
- handler.cancelDoubleSpacePeriodTimer();
+ cancelDoubleSpacePeriodCountdown();
}
boolean didAutoCorrect = false;
@@ -847,7 +848,7 @@ public final class InputLogic {
if (Constants.CODE_SPACE == codePoint) {
if (inputTransaction.mSettingsValues.isSuggestionsRequested()) {
- if (maybeDoubleSpacePeriod(inputTransaction.mSettingsValues, handler)) {
+ if (maybeDoubleSpacePeriod(inputTransaction)) {
inputTransaction.requireShiftUpdate(InputTransaction.SHIFT_UPDATE_NOW);
mSpaceState = SpaceState.DOUBLE;
} else if (!mSuggestedWords.isPunctuationSuggestions()) {
@@ -855,7 +856,7 @@ public final class InputLogic {
}
}
- handler.startDoubleSpacePeriodTimer();
+ startDoubleSpacePeriodCountdown(inputTransaction);
handler.postUpdateSuggestionStrip();
} else {
if (swapWeakSpace) {
@@ -952,7 +953,7 @@ public final class InputLogic {
return;
}
if (SpaceState.DOUBLE == inputTransaction.mSpaceState) {
- handler.cancelDoubleSpacePeriodTimer();
+ cancelDoubleSpacePeriodCountdown();
if (mConnection.revertDoubleSpacePeriod()) {
// No need to reset mSpaceState, it has already be done (that's why we
// receive it as a parameter)
@@ -1100,6 +1101,19 @@ public final class InputLogic {
return false;
}
+ public void startDoubleSpacePeriodCountdown(final InputTransaction inputTransaction) {
+ mDoubleSpacePeriodCountdownStart = inputTransaction.mTimestamp;
+ }
+
+ public void cancelDoubleSpacePeriodCountdown() {
+ mDoubleSpacePeriodCountdownStart = 0;
+ }
+
+ public boolean isDoubleSpacePeriodCountdownActive(final InputTransaction inputTransaction) {
+ return inputTransaction.mTimestamp - mDoubleSpacePeriodCountdownStart
+ < inputTransaction.mSettingsValues.mDoubleSpacePeriodTimeout;
+ }
+
/**
* Apply the double-space-to-period transformation if applicable.
*
@@ -1112,14 +1126,12 @@ public final class InputLogic {
* method applies the transformation and returns true. Otherwise, it does nothing and
* returns false.
*
- * @param settingsValues the current values of the settings.
+ * @param inputTransaction The transaction in progress.
* @return true if we applied the double-space-to-period transformation, false otherwise.
*/
- private boolean maybeDoubleSpacePeriod(final SettingsValues settingsValues,
- // TODO: remove this argument
- final LatinIME.UIHandler handler) {
- if (!settingsValues.mUseDoubleSpacePeriod) return false;
- if (!handler.isAcceptingDoubleSpacePeriod()) return false;
+ private boolean maybeDoubleSpacePeriod(final InputTransaction inputTransaction) {
+ if (!inputTransaction.mSettingsValues.mUseDoubleSpacePeriod) return false;
+ if (!isDoubleSpacePeriodCountdownActive(inputTransaction)) return false;
// We only do this when we see two spaces and an accepted code point before the cursor.
// The code point may be a surrogate pair but the two spaces may not, so we need 4 chars.
final CharSequence lastThree = mConnection.getTextBeforeCursor(4, 0);
@@ -1135,10 +1147,10 @@ public final class InputLogic {
Character.isSurrogatePair(lastThree.charAt(0), lastThree.charAt(1)) ?
Character.codePointAt(lastThree, 0) : lastThree.charAt(length - 3);
if (canBeFollowedByDoubleSpacePeriod(firstCodePoint)) {
- handler.cancelDoubleSpacePeriodTimer();
+ cancelDoubleSpacePeriodCountdown();
mConnection.deleteSurroundingText(2, 0);
- final String textToInsert =
- settingsValues.mSpacingAndPunctuations.mSentenceSeparatorAndSpace;
+ final String textToInsert = inputTransaction.mSettingsValues.mSpacingAndPunctuations
+ .mSentenceSeparatorAndSpace;
mConnection.commitText(textToInsert, 1);
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.latinIME_maybeDoubleSpacePeriod(textToInsert,
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);
}
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
index c26e223c9..1d84bb59f 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
@@ -507,7 +507,7 @@ final class SuggestionStripLayoutHelper {
hintView, 1.0f - mCenterSuggestionWeight, ViewGroup.LayoutParams.MATCH_PARENT);
}
- public void layoutImportantNotice(final View importantNoticeStrip, final int stripWidth,
+ public void layoutImportantNotice(final View importantNoticeStrip,
final String importantNoticeTitle) {
final TextView titleView = (TextView)importantNoticeStrip.findViewById(
R.id.important_notice_title);
@@ -516,8 +516,7 @@ final class SuggestionStripLayoutHelper {
titleView.setTextColor(mColorAutoCorrect);
titleView.setText(importantNoticeTitle);
titleView.setTextScaleX(1.0f); // Reset textScaleX.
- final float titleScaleX = getTextScaleX(
- importantNoticeTitle, width, titleView.getPaint());
+ final float titleScaleX = getTextScaleX(importantNoticeTitle, width, titleView.getPaint());
titleView.setTextScaleX(titleScaleX);
}
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index 43cb11b14..3cdd07361 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -232,8 +232,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
if (!ImportantNoticeUtils.shouldShowImportantNotice(getContext(), inputAttributes)) {
return false;
}
- final int width = getWidth();
- if (width <= 0) {
+ if (getWidth() <= 0) {
return false;
}
final String importantNoticeTitle = ImportantNoticeUtils.getNextImportantNoticeTitle(
@@ -241,7 +240,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
if (TextUtils.isEmpty(importantNoticeTitle)) {
return false;
}
- mLayoutHelper.layoutImportantNotice(mImportantNoticeStrip, width, importantNoticeTitle);
+ mLayoutHelper.layoutImportantNotice(mImportantNoticeStrip, importantNoticeTitle);
mStripVisibilityGroup.showImportantNoticeStrip();
mImportantNoticeStrip.setOnClickListener(this);
return true;
diff --git a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
index ca8bef397..7d937a9d2 100644
--- a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
+import android.text.TextUtils;
import android.util.Log;
import com.android.inputmethod.latin.InputAttributes;
@@ -82,7 +83,17 @@ public final class ImportantNoticeUtils {
if (inputAttributes == null || inputAttributes.mIsPasswordField) {
return false;
}
- return hasNewImportantNotice(context) && !isInSystemSetupWizard(context);
+ if (isInSystemSetupWizard(context)) {
+ return false;
+ }
+ if (!hasNewImportantNotice(context)) {
+ return false;
+ }
+ final String importantNoticeTitle = getNextImportantNoticeTitle(context);
+ if (TextUtils.isEmpty(importantNoticeTitle)) {
+ return false;
+ }
+ return true;
}
public static void updateLastImportantNoticeVersion(final Context context) {