diff options
Diffstat (limited to 'java/src')
17 files changed, 471 insertions, 272 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java b/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java index 7a3510ee1..edcdd4c4c 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java +++ b/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java @@ -37,6 +37,8 @@ final class KeyCodeDescriptionMapper { private static final String SPOKEN_LETTER_RESOURCE_NAME_FORMAT = "spoken_accented_letter_%04X"; private static final String SPOKEN_SYMBOL_RESOURCE_NAME_FORMAT = "spoken_symbol_%04X"; private static final String SPOKEN_EMOJI_RESOURCE_NAME_FORMAT = "spoken_emoji_%04X"; + private static final String SPOKEN_EMOTICON_RESOURCE_NAME_PREFIX = "spoken_emoticon"; + private static final String SPOKEN_EMOTICON_CODE_POINT_FORMAT = "_%02X"; // The resource ID of the string spoken for obscured keys private static final int OBSCURED_KEY_RES_ID = R.string.spoken_description_dot; @@ -109,7 +111,9 @@ final class KeyCodeDescriptionMapper { } if (code == Constants.CODE_OUTPUT_TEXT) { - return key.getOutputText(); + final String outputText = key.getOutputText(); + final String description = getSpokenEmoticonDescription(context, outputText); + return TextUtils.isEmpty(description) ? outputText : description; } // Just attempt to speak the description. @@ -340,4 +344,21 @@ final class KeyCodeDescriptionMapper { } return resId; } + + // TODO: Remove this method once TTS supports emoticon verbalization. + private String getSpokenEmoticonDescription(final Context context, final String outputText) { + final StringBuilder sb = new StringBuilder(SPOKEN_EMOTICON_RESOURCE_NAME_PREFIX); + final int textLength = outputText.length(); + for (int index = 0; index < textLength; index = outputText.offsetByCodePoints(index, 1)) { + final int codePoint = outputText.codePointAt(index); + sb.append(String.format(Locale.ROOT, SPOKEN_EMOTICON_CODE_POINT_FORMAT, codePoint)); + } + final String resourceName = sb.toString(); + final Resources resources = context.getResources(); + // Note that the resource package name may differ from the context package name. + final String resourcePackageName = resources.getResourcePackageName( + R.string.spoken_description_unknown); + final int resId = resources.getIdentifier(resourceName, "string", resourcePackageName); + return (resId == 0) ? null : resources.getString(resId); + } } diff --git a/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java b/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java index c937eeeaa..5af31795c 100644 --- a/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java +++ b/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java @@ -84,8 +84,8 @@ public final class CursorAnchorInfoCompatWrapper { } @UsedForTesting - public static boolean isAvailable() { - return sCursorAnchorInfoClass.exists(); + public boolean isAvailable() { + return sCursorAnchorInfoClass.exists() && mInstance != null; } private Object mInstance; @@ -96,7 +96,7 @@ public final class CursorAnchorInfoCompatWrapper { @UsedForTesting public static CursorAnchorInfoCompatWrapper fromObject(final Object instance) { - if (!isAvailable()) { + if (!sCursorAnchorInfoClass.exists()) { return new CursorAnchorInfoCompatWrapper(null); } return new CursorAnchorInfoCompatWrapper(instance); diff --git a/java/src/com/android/inputmethod/keyboard/TextDecorator.java b/java/src/com/android/inputmethod/keyboard/TextDecorator.java index 6e4e3281e..c22717f95 100644 --- a/java/src/com/android/inputmethod/keyboard/TextDecorator.java +++ b/java/src/com/android/inputmethod/keyboard/TextDecorator.java @@ -182,7 +182,7 @@ public class TextDecorator { private void layoutMain() { final CursorAnchorInfoCompatWrapper info = mCursorAnchorInfoWrapper; - if (info == null) { + if (info == null || !info.isAvailable()) { cancelLayoutInternalExpectedly("CursorAnchorInfo isn't available."); return; } diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java index 1e1188bd0..71ce768a9 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java @@ -27,6 +27,9 @@ import java.util.Comparator; import java.util.SortedSet; import java.util.TreeSet; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + public class KeyboardParams { public KeyboardId mId; public int mThemeId; @@ -67,7 +70,7 @@ public class KeyboardParams { public final KeyboardTextsSet mTextsSet = new KeyboardTextsSet(); public final KeyStylesSet mKeyStyles = new KeyStylesSet(mTextsSet); - public KeysCache mKeysCache; + @Nullable public KeysCache mKeysCache; public boolean mAllowRedundantMoreKeys; public int mMostCommonKeyHeight = 0; @@ -96,7 +99,7 @@ public class KeyboardParams { clearHistogram(); } - public void onAddKey(final Key newKey) { + public void onAddKey(@Nonnull final Key newKey) { final Key key = (mKeysCache != null) ? mKeysCache.get(newKey) : newKey; final boolean isSpacer = key.isSpacer(); if (isSpacer && key.getWidth() == 0) { @@ -129,7 +132,10 @@ public class KeyboardParams { mSortedKeys.clear(); for (final Key key : allKeys) { final Key filteredKey = Key.removeRedundantMoreKeys(key, lettersOnBaseLayout); - mSortedKeys.add(mKeysCache.replace(key, filteredKey)); + if (mKeysCache != null) { + mKeysCache.replace(key, filteredKey); + } + mSortedKeys.add(filteredKey); } } diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java index a778ee80b..978194a3b 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -83,24 +83,24 @@ public final class KeyboardTextsTable { private static final String[] NAMES = { // /* index:histogram */ "name", - /* 0:32 */ "morekeys_a", - /* 1:32 */ "morekeys_o", - /* 2:31 */ "morekeys_e", - /* 3:30 */ "morekeys_u", - /* 4:30 */ "keylabel_to_alpha", - /* 5:29 */ "morekeys_i", - /* 6:24 */ "morekeys_n", - /* 7:24 */ "morekeys_c", + /* 0:33 */ "morekeys_a", + /* 1:33 */ "morekeys_o", + /* 2:32 */ "morekeys_e", + /* 3:31 */ "morekeys_u", + /* 4:31 */ "keylabel_to_alpha", + /* 5:30 */ "morekeys_i", + /* 6:25 */ "morekeys_n", + /* 7:25 */ "morekeys_c", /* 8:23 */ "double_quotes", - /* 9:22 */ "single_quotes", - /* 10:21 */ "morekeys_s", - /* 11:18 */ "keyspec_currency", - /* 12:16 */ "morekeys_y", - /* 13:15 */ "morekeys_z", + /* 9:22 */ "morekeys_s", + /* 10:22 */ "single_quotes", + /* 11:19 */ "keyspec_currency", + /* 12:17 */ "morekeys_y", + /* 13:16 */ "morekeys_z", /* 14:14 */ "morekeys_d", /* 15:10 */ "morekeys_t", /* 16:10 */ "morekeys_l", - /* 17: 9 */ "morekeys_g", + /* 17:10 */ "morekeys_g", /* 18: 9 */ "single_angle_quotes", /* 19: 9 */ "double_angle_quotes", /* 20: 8 */ "morekeys_r", @@ -139,54 +139,54 @@ public final class KeyboardTextsTable { /* 53: 4 */ "morekeys_nordic_row2_11", /* 54: 4 */ "morekeys_punctuation", /* 55: 4 */ "keyspec_tablet_comma", - /* 56: 3 */ "keyspec_swiss_row1_11", - /* 57: 3 */ "keyspec_swiss_row2_10", - /* 58: 3 */ "keyspec_swiss_row2_11", - /* 59: 3 */ "morekeys_swiss_row1_11", - /* 60: 3 */ "morekeys_swiss_row2_10", - /* 61: 3 */ "morekeys_swiss_row2_11", - /* 62: 3 */ "morekeys_star", - /* 63: 3 */ "keyspec_left_parenthesis", - /* 64: 3 */ "keyspec_right_parenthesis", - /* 65: 3 */ "keyspec_left_square_bracket", - /* 66: 3 */ "keyspec_right_square_bracket", - /* 67: 3 */ "keyspec_left_curly_bracket", - /* 68: 3 */ "keyspec_right_curly_bracket", - /* 69: 3 */ "keyspec_less_than", - /* 70: 3 */ "keyspec_greater_than", - /* 71: 3 */ "keyspec_less_than_equal", - /* 72: 3 */ "keyspec_greater_than_equal", - /* 73: 3 */ "keyspec_left_double_angle_quote", - /* 74: 3 */ "keyspec_right_double_angle_quote", - /* 75: 3 */ "keyspec_left_single_angle_quote", - /* 76: 3 */ "keyspec_right_single_angle_quote", - /* 77: 3 */ "keyspec_comma", - /* 78: 3 */ "morekeys_tablet_comma", - /* 79: 3 */ "keyhintlabel_period", - /* 80: 3 */ "morekeys_tablet_period", - /* 81: 3 */ "morekeys_question", - /* 82: 2 */ "morekeys_h", - /* 83: 2 */ "morekeys_w", - /* 84: 2 */ "morekeys_east_slavic_row2_2", - /* 85: 2 */ "morekeys_cyrillic_u", - /* 86: 2 */ "morekeys_cyrillic_en", - /* 87: 2 */ "morekeys_cyrillic_ghe", - /* 88: 2 */ "morekeys_cyrillic_o", - /* 89: 2 */ "morekeys_cyrillic_i", - /* 90: 2 */ "keyspec_south_slavic_row1_6", - /* 91: 2 */ "keyspec_south_slavic_row2_11", - /* 92: 2 */ "keyspec_south_slavic_row3_1", - /* 93: 2 */ "keyspec_south_slavic_row3_8", - /* 94: 2 */ "morekeys_tablet_punctuation", - /* 95: 2 */ "keyspec_spanish_row2_10", - /* 96: 2 */ "morekeys_bullet", - /* 97: 2 */ "morekeys_left_parenthesis", - /* 98: 2 */ "morekeys_right_parenthesis", - /* 99: 2 */ "morekeys_arabic_diacritics", - /* 100: 2 */ "keyhintlabel_tablet_comma", - /* 101: 2 */ "keyspec_period", - /* 102: 2 */ "morekeys_period", - /* 103: 2 */ "keyspec_tablet_period", + /* 56: 4 */ "morekeys_tablet_period", + /* 57: 3 */ "keyspec_swiss_row1_11", + /* 58: 3 */ "keyspec_swiss_row2_10", + /* 59: 3 */ "keyspec_swiss_row2_11", + /* 60: 3 */ "morekeys_swiss_row1_11", + /* 61: 3 */ "morekeys_swiss_row2_10", + /* 62: 3 */ "morekeys_swiss_row2_11", + /* 63: 3 */ "morekeys_star", + /* 64: 3 */ "keyspec_left_parenthesis", + /* 65: 3 */ "keyspec_right_parenthesis", + /* 66: 3 */ "keyspec_left_square_bracket", + /* 67: 3 */ "keyspec_right_square_bracket", + /* 68: 3 */ "keyspec_left_curly_bracket", + /* 69: 3 */ "keyspec_right_curly_bracket", + /* 70: 3 */ "keyspec_less_than", + /* 71: 3 */ "keyspec_greater_than", + /* 72: 3 */ "keyspec_less_than_equal", + /* 73: 3 */ "keyspec_greater_than_equal", + /* 74: 3 */ "keyspec_left_double_angle_quote", + /* 75: 3 */ "keyspec_right_double_angle_quote", + /* 76: 3 */ "keyspec_left_single_angle_quote", + /* 77: 3 */ "keyspec_right_single_angle_quote", + /* 78: 3 */ "keyspec_comma", + /* 79: 3 */ "morekeys_tablet_comma", + /* 80: 3 */ "keyspec_period", + /* 81: 3 */ "keyhintlabel_period", + /* 82: 3 */ "morekeys_period", + /* 83: 3 */ "keyspec_tablet_period", + /* 84: 3 */ "morekeys_question", + /* 85: 2 */ "morekeys_h", + /* 86: 2 */ "morekeys_w", + /* 87: 2 */ "morekeys_east_slavic_row2_2", + /* 88: 2 */ "morekeys_cyrillic_u", + /* 89: 2 */ "morekeys_cyrillic_en", + /* 90: 2 */ "morekeys_cyrillic_ghe", + /* 91: 2 */ "morekeys_cyrillic_o", + /* 92: 2 */ "morekeys_cyrillic_i", + /* 93: 2 */ "keyspec_south_slavic_row1_6", + /* 94: 2 */ "keyspec_south_slavic_row2_11", + /* 95: 2 */ "keyspec_south_slavic_row3_1", + /* 96: 2 */ "keyspec_south_slavic_row3_8", + /* 97: 2 */ "morekeys_tablet_punctuation", + /* 98: 2 */ "keyspec_spanish_row2_10", + /* 99: 2 */ "morekeys_bullet", + /* 100: 2 */ "morekeys_left_parenthesis", + /* 101: 2 */ "morekeys_right_parenthesis", + /* 102: 2 */ "morekeys_arabic_diacritics", + /* 103: 2 */ "keyhintlabel_tablet_comma", /* 104: 2 */ "keyhintlabel_tablet_period", /* 105: 2 */ "keyspec_symbols_question", /* 106: 2 */ "keyspec_symbols_semicolon", @@ -274,8 +274,8 @@ public final class KeyboardTextsTable { EMPTY, EMPTY, EMPTY, /* ~ morekeys_c */ /* double_quotes */ "!text/double_lqm_rqm", - /* single_quotes */ "!text/single_lqm_rqm", /* morekeys_s */ EMPTY, + /* single_quotes */ "!text/single_lqm_rqm", /* keyspec_currency */ "$", /* morekeys_y ~ */ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, @@ -302,6 +302,7 @@ public final class KeyboardTextsTable { /* ~ morekeys_nordic_row2_11 */ /* morekeys_punctuation */ "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&", /* keyspec_tablet_comma */ ",", + /* morekeys_tablet_period */ "!text/morekeys_tablet_punctuation", /* keyspec_swiss_row1_11 ~ */ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, /* ~ morekeys_swiss_row2_11 */ @@ -334,8 +335,11 @@ public final class KeyboardTextsTable { // Comma key /* keyspec_comma */ ",", /* morekeys_tablet_comma */ EMPTY, + // Period key + /* keyspec_period */ ".", /* keyhintlabel_period */ EMPTY, - /* morekeys_tablet_period */ "!text/morekeys_tablet_punctuation", + /* morekeys_period */ "!text/morekeys_punctuation", + /* keyspec_tablet_period */ ".", // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "\u00BF", /* morekeys_h ~ */ @@ -352,13 +356,9 @@ public final class KeyboardTextsTable { /* morekeys_bullet */ "\u266A,\u2665,\u2660,\u2666,\u2663", /* morekeys_left_parenthesis */ "!fixedColumnOrder!3,!text/keyspecs_left_parenthesis_more_keys", /* morekeys_right_parenthesis */ "!fixedColumnOrder!3,!text/keyspecs_right_parenthesis_more_keys", - /* morekeys_arabic_diacritics */ EMPTY, - /* keyhintlabel_tablet_comma */ EMPTY, - // Period key - /* keyspec_period */ ".", - /* morekeys_period */ "!text/morekeys_punctuation", - /* keyspec_tablet_period */ ".", - /* keyhintlabel_tablet_period */ EMPTY, + /* morekeys_arabic_diacritics ~ */ + EMPTY, EMPTY, EMPTY, + /* ~ keyhintlabel_tablet_period */ /* keyspec_symbols_question */ "?", /* keyspec_symbols_semicolon */ ";", /* keyspec_symbols_percent */ "%", @@ -593,6 +593,7 @@ public final class KeyboardTextsTable { // U+060C: "،" ARABIC COMMA // U+061B: "؛" ARABIC SEMICOLON /* keyspec_tablet_comma */ "\u060C", + /* morekeys_tablet_period */ "!text/morekeys_arabic_diacritics", /* keyspec_swiss_row1_11 ~ */ null, null, null, null, null, null, /* ~ morekeys_swiss_row2_11 */ @@ -622,9 +623,11 @@ public final class KeyboardTextsTable { // U+060C: "،" ARABIC COMMA /* keyspec_comma */ "\u060C", /* morekeys_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,\",\'", + /* keyspec_period */ null, // U+0651: "ّ" ARABIC SHADDA /* keyhintlabel_period */ "\u0651", - /* morekeys_tablet_period */ "!text/morekeys_arabic_diacritics", + /* morekeys_period */ "!text/morekeys_arabic_diacritics", + /* keyspec_tablet_period */ null, // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "?,\u00BF", /* morekeys_h ~ */ @@ -656,9 +659,6 @@ public final class KeyboardTextsTable { // Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. /* morekeys_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", /* keyhintlabel_tablet_comma */ "\u061F", - /* keyspec_period */ null, - /* morekeys_period */ "!text/morekeys_arabic_diacritics", - /* keyspec_tablet_period */ null, /* keyhintlabel_tablet_period */ "\u0651", /* keyspec_symbols_question */ "\u061F", /* keyspec_symbols_semicolon */ "\u061B", @@ -671,6 +671,7 @@ public final class KeyboardTextsTable { /* Locale az_AZ: Azerbaijani (Azerbaijan) */ private static final String[] TEXTS_az_AZ = { + // This is the same as Turkish // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE @@ -710,12 +711,12 @@ public final class KeyboardTextsTable { // U+010D: "č" LATIN SMALL LETTER C WITH CARON /* morekeys_c */ "\u00E7,\u0107,\u010D", /* double_quotes */ null, - /* single_quotes */ null, // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u015F,\u00DF,\u015B,\u0161", + /* single_quotes */ null, /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE /* morekeys_y */ "\u00FD", @@ -742,9 +743,10 @@ public final class KeyboardTextsTable { null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* morekeys_s */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* morekeys_s ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, + /* keyspec_currency ~ */ + null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* morekeys_cyrillic_ie */ "\u0451", @@ -780,6 +782,23 @@ public final class KeyboardTextsTable { /* double_quotes */ "!text/double_9qm_lqm", }; + /* Locale bn_BD: Bengali (Bangladesh) */ + private static final String[] TEXTS_bn_BD = { + /* morekeys_a ~ */ + null, null, null, null, + /* ~ morekeys_u */ + // Label for "switch to alphabetic" key. + // U+0995: "क" BENGALI LETTER KA + // U+0996: "ख" BENGALI LETTER KHA + // U+0997: "ग" BENGALI LETTER GA + /* keylabel_to_alpha */ "\u0995\u0996\u0997", + /* morekeys_i ~ */ + null, null, null, null, null, null, + /* ~ single_quotes */ + // U+09F3: "৳" BENGALI RUPEE SIGN + /* keyspec_currency */ "\u09F3", + }; + /* Locale bn_IN: Bengali (India) */ private static final String[] TEXTS_bn_IN = { /* morekeys_a ~ */ @@ -792,7 +811,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0995\u0996\u0997", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", }; @@ -865,7 +884,7 @@ public final class KeyboardTextsTable { /* keyspec_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, /* ~ keyspec_south_slavic_row3_8 */ /* morekeys_tablet_punctuation */ "!autoColumnOrder!8,\\,,',\u00B7,#,),(,/,;,@,:,-,\",+,\\%,&", // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA @@ -925,11 +944,11 @@ public final class KeyboardTextsTable { // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* morekeys_c */ "\u010D,\u00E7,\u0107", /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE /* morekeys_s */ "\u0161,\u00DF,\u015B", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -988,11 +1007,11 @@ public final class KeyboardTextsTable { /* morekeys_n */ "\u00F1,\u0144", /* morekeys_c */ null, /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u00DF,\u015B,\u0161", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -1064,11 +1083,11 @@ public final class KeyboardTextsTable { /* morekeys_n */ "\u00F1,\u0144", /* morekeys_c */ null, /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u00DF,\u015B,\u0161", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency ~ */ null, null, null, null, null, null, null, /* ~ morekeys_g */ @@ -1077,8 +1096,8 @@ public final class KeyboardTextsTable { /* morekeys_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, null, null, null, - null, null, null, null, null, null, - /* ~ keyspec_tablet_comma */ + null, null, null, null, null, null, null, + /* ~ morekeys_tablet_period */ // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS /* keyspec_swiss_row1_11 */ "\u00FC", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -1149,7 +1168,6 @@ public final class KeyboardTextsTable { // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* morekeys_c */ "\u00E7", /* double_quotes */ null, - /* single_quotes */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S /* morekeys_s */ "\u00DF", }; @@ -1223,13 +1241,13 @@ public final class KeyboardTextsTable { // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE /* morekeys_c */ "\u0107,\u010D,\u00E7,\u010B", /* double_quotes */ null, - /* single_quotes */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* morekeys_s */ "\u00DF,\u0161,\u015B,\u0219,\u015F", + /* single_quotes */ null, /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX @@ -1273,6 +1291,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, /* ~ morekeys_question */ // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX // U+0127: "ħ" LATIN SMALL LETTER H WITH STROKE @@ -1286,7 +1305,7 @@ public final class KeyboardTextsTable { /* keyspec_spanish_row2_10 */ "\u0135", /* morekeys_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, /* ~ label_wait_key */ // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX /* morekeys_v */ "w,\u0175", @@ -1423,12 +1442,12 @@ public final class KeyboardTextsTable { // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* morekeys_c */ "\u010D,\u00E7,\u0107", /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* morekeys_s */ "\u0161,\u00DF,\u015B,\u015F", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -1536,7 +1555,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0627\u200C\u0628\u200C\u067E", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+FDFC: "﷼" RIAL SIGN /* keyspec_currency */ "\uFDFC", /* morekeys_y ~ */ @@ -1586,6 +1605,7 @@ public final class KeyboardTextsTable { // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK /* keyspec_tablet_comma */ "\u060C", + /* morekeys_tablet_period */ "!text/morekeys_arabic_diacritics", /* keyspec_swiss_row1_11 ~ */ null, null, null, null, null, null, /* ~ morekeys_swiss_row2_11 */ @@ -1609,9 +1629,11 @@ public final class KeyboardTextsTable { // U+060C: "،" ARABIC COMMA /* keyspec_comma */ "\u060C", /* morekeys_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", + /* keyspec_period */ null, // U+064B: "ً" ARABIC FATHATAN /* keyhintlabel_period */ "\u064B", - /* morekeys_tablet_period */ "!text/morekeys_arabic_diacritics", + /* morekeys_period */ "!text/morekeys_arabic_diacritics", + /* keyspec_tablet_period */ null, // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "?,\u00BF", /* morekeys_h ~ */ @@ -1643,9 +1665,6 @@ public final class KeyboardTextsTable { // Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. /* morekeys_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", /* keyhintlabel_tablet_comma */ "\u061F", - /* keyspec_period */ null, - /* morekeys_period */ "!text/morekeys_arabic_diacritics", - /* keyspec_tablet_period */ null, /* keyhintlabel_tablet_period */ "\u064B", /* keyspec_symbols_question */ "\u061F", /* keyspec_symbols_semicolon */ "\u061B", @@ -1692,14 +1711,15 @@ public final class KeyboardTextsTable { // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS /* morekeys_u */ "\u00FC", /* keylabel_to_alpha ~ */ - null, null, null, null, null, null, - /* ~ single_quotes */ + null, null, null, null, null, + /* ~ double_quotes */ // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE /* morekeys_s */ "\u0161,\u00DF,\u015B", - /* keyspec_currency */ null, - /* morekeys_y */ null, + /* single_quotes ~ */ + null, null, null, + /* ~ morekeys_y */ // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE @@ -1780,8 +1800,8 @@ public final class KeyboardTextsTable { /* morekeys_z ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keyspec_tablet_comma */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ morekeys_tablet_period */ // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE /* keyspec_swiss_row1_11 */ "\u00E8", // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE @@ -1862,7 +1882,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0915\u0916\u0917", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", /* morekeys_y ~ */ @@ -1901,13 +1921,26 @@ public final class KeyboardTextsTable { /* additional_morekeys_symbols_8 */ "8", /* additional_morekeys_symbols_9 */ "9", /* additional_morekeys_symbols_0 */ "0", + /* morekeys_nordic_row2_11 ~ */ + null, null, null, + /* ~ keyspec_tablet_comma */ + /* morekeys_tablet_period */ "!autoColumnOrder!8,\\,,.,',#,),(,/,;,@,:,-,\",+,\\%,&", + /* keyspec_swiss_row1_11 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + /* ~ morekeys_tablet_comma */ + // U+0964: "।" DEVANAGARI DANDA + /* keyspec_period */ "\u0964", + /* keyhintlabel_period */ null, + /* morekeys_period */ "!autoColumnOrder!9,\\,,.,?,!,#,),(,/,;,',@,:,-,\",+,\\%,&", + /* keyspec_tablet_period */ "\u0964", }; /* Locale hi_ZZ: Hindi (ZZ) */ private static final String[] TEXTS_hi_ZZ = { /* morekeys_a ~ */ null, null, null, null, null, null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", /* morekeys_y ~ */ @@ -1942,11 +1975,11 @@ public final class KeyboardTextsTable { // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* morekeys_c */ "\u010D,\u0107,\u00E7", /* double_quotes */ "!text/double_9qm_rqm", - /* single_quotes */ "!text/single_9qm_rqm", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+00DF: "ß" LATIN SMALL LETTER SHARP S /* morekeys_s */ "\u0161,\u015B,\u00DF", + /* single_quotes */ "!text/single_9qm_rqm", /* keyspec_currency */ null, /* morekeys_y */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON @@ -2009,9 +2042,10 @@ public final class KeyboardTextsTable { /* morekeys_n */ null, /* morekeys_c */ null, /* double_quotes */ "!text/double_9qm_rqm", + /* morekeys_s */ null, /* single_quotes */ "!text/single_9qm_rqm", - /* morekeys_s ~ */ - null, null, null, null, null, null, null, null, + /* keyspec_currency ~ */ + null, null, null, null, null, null, null, /* ~ morekeys_g */ /* single_angle_quotes */ "!text/single_raqm_laqm", /* double_angle_quotes */ "!text/double_raqm_laqm", @@ -2045,6 +2079,7 @@ public final class KeyboardTextsTable { // U+055F: "՟" ARMENIAN ABBREVIATION MARK /* morekeys_punctuation */ "!autoColumnOrder!8,\\,,\u055E,\u055C,.,\u055A,\u0559,?,!,\u055D,\u055B,\u058A,\u00BB,\u00AB,\u055F,;,:", /* keyspec_tablet_comma */ "\u055D", + /* morekeys_tablet_period */ "!text/morekeys_punctuation", /* keyspec_swiss_row1_11 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, @@ -2056,22 +2091,19 @@ public final class KeyboardTextsTable { // U+055D: "՝" ARMENIAN COMMA /* keyspec_comma */ "\u055D", /* morekeys_tablet_comma */ null, + // U+0589: "։" ARMENIAN FULL STOP + /* keyspec_period */ "\u0589", /* keyhintlabel_period */ null, - /* morekeys_tablet_period */ "!text/morekeys_punctuation", + /* morekeys_period */ null, + /* keyspec_tablet_period */ "\u0589", // U+055E: "՞" ARMENIAN QUESTION MARK // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "\u055E,\u00BF", /* morekeys_h ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, - /* ~ keyhintlabel_tablet_comma */ - // U+0589: "։" ARMENIAN FULL STOP - /* keyspec_period */ "\u0589", - /* morekeys_period */ null, - /* keyspec_tablet_period */ "\u0589", - /* keyhintlabel_tablet_period ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, /* ~ morekeys_greater_than */ // U+055C: "՜" ARMENIAN EXCLAMATION MARK // U+00A1: "¡" INVERTED EXCLAMATION MARK @@ -2123,8 +2155,8 @@ public final class KeyboardTextsTable { /* morekeys_n */ null, /* morekeys_c */ null, /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", /* morekeys_s */ null, + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -2184,8 +2216,8 @@ 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, - /* ~ keyspec_tablet_comma */ + null, null, null, null, null, null, + /* ~ morekeys_tablet_period */ // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS /* keyspec_swiss_row1_11 */ "\u00FC", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -2214,15 +2246,15 @@ public final class KeyboardTextsTable { null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_rqm_9qm", - /* single_quotes */ "!text/single_rqm_9qm", /* morekeys_s */ null, + /* single_quotes */ "!text/single_rqm_9qm", // U+20AA: "₪" NEW SHEQEL SIGN /* keyspec_currency */ "\u20AA", /* morekeys_y ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, + null, null, null, null, null, null, /* ~ morekeys_swiss_row2_11 */ // U+2605: "★" BLACK STAR /* morekeys_star */ "\u2605", @@ -2252,7 +2284,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, /* ~ morekeys_currency_dollar */ // U+00B1: "±" PLUS-MINUS SIGN // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN @@ -2273,6 +2305,7 @@ public final class KeyboardTextsTable { null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* morekeys_s */ null, /* single_quotes */ "!text/single_9qm_lqm", }; @@ -2309,7 +2342,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, /* ~ morekeys_w */ // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I /* morekeys_east_slavic_row2_2 */ "\u0456", @@ -2325,7 +2358,7 @@ public final class KeyboardTextsTable { /* morekeys_cyrillic_i ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, + null, null, null, null, /* ~ keyspec_x */ // U+04BB: "һ" CYRILLIC SMALL LETTER SHHA /* morekeys_east_slavic_row2_11 */ "\u04BB", @@ -2372,7 +2405,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0C85\u0C86\u0C87", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", }; @@ -2410,7 +2443,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, /* ~ morekeys_east_slavic_row2_2 */ // U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U /* morekeys_cyrillic_u */ "\u04AF", @@ -2433,7 +2466,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0E81\u0E82\u0E84", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20AD: "₭" KIP SIGN /* keyspec_currency */ "\u20AD", }; @@ -2496,12 +2529,12 @@ public final class KeyboardTextsTable { // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* morekeys_c */ "\u010D,\u00E7,\u0107", /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* morekeys_s */ "\u0161,\u00DF,\u015B,\u015F", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -2590,12 +2623,12 @@ public final class KeyboardTextsTable { // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* morekeys_c */ "\u010D,\u00E7,\u0107", /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* morekeys_s */ "\u0161,\u00DF,\u015B,\u015F", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -2641,9 +2674,10 @@ public final class KeyboardTextsTable { null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* morekeys_s */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* morekeys_s ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, + /* keyspec_currency ~ */ + null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_k */ // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE /* morekeys_cyrillic_ie */ "\u0450", @@ -2652,7 +2686,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, /* ~ morekeys_cyrillic_o */ // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE /* morekeys_cyrillic_i */ "\u045D", @@ -2676,7 +2710,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0D05", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", }; @@ -2693,7 +2727,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0410\u0411\u0412", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20AE: "₮" TUGRIK SIGN /* keyspec_currency */ "\u20AE", }; @@ -2710,7 +2744,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0915\u0916\u0917", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", /* morekeys_y ~ */ @@ -2771,22 +2805,19 @@ public final class KeyboardTextsTable { // U+104A: "၊" MYANMAR SIGN LITTLE SECTION // U+104B: "။" MYANMAR SIGN SECTION /* keyspec_tablet_comma */ "\u104A", - /* keyspec_swiss_row1_11 ~ */ + /* morekeys_tablet_period ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, /* ~ keyspec_comma */ /* morekeys_tablet_comma */ "\\,", - /* keyhintlabel_period */ "\u104A", - /* morekeys_tablet_period ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keyspec_south_slavic_row3_8 */ - /* morekeys_tablet_punctuation */ "!autoColumnOrder!8,.,',#,),(,/,;,@,...,:,-,\",+,\\%,&", - /* keyspec_spanish_row2_10 ~ */ - null, null, null, null, null, null, - /* ~ keyhintlabel_tablet_comma */ /* keyspec_period */ "\u104B", + /* keyhintlabel_period */ "\u104A", /* morekeys_period */ null, /* keyspec_tablet_period */ "\u104B", + /* morekeys_question ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keyspec_south_slavic_row3_8 */ + /* morekeys_tablet_punctuation */ "!autoColumnOrder!8,.,',#,),(,/,;,@,...,:,-,\",+,\\%,&", }; /* Locale nb: Norwegian Bokmål */ @@ -2827,9 +2858,10 @@ public final class KeyboardTextsTable { null, null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_9qm_rqm", + /* morekeys_s */ null, /* single_quotes */ "!text/single_9qm_rqm", - /* morekeys_s ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, + /* keyspec_currency ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_cyrillic_ie */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE /* keyspec_nordic_row1_11 */ "\u00E5", @@ -2859,7 +2891,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0915\u0916\u0917", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN /* keyspec_currency */ "\u0930\u0941.", /* morekeys_y ~ */ @@ -2948,8 +2980,8 @@ public final class KeyboardTextsTable { /* morekeys_n */ "\u00F1,\u0144", /* morekeys_c */ null, /* double_quotes */ "!text/double_9qm_rqm", - /* single_quotes */ "!text/single_9qm_rqm", /* morekeys_s */ null, + /* single_quotes */ "!text/single_9qm_rqm", /* keyspec_currency */ null, // U+0133: "ij" LATIN SMALL LIGATURE IJ /* morekeys_y */ "\u0133", @@ -2995,11 +3027,11 @@ public final class KeyboardTextsTable { // U+010D: "č" LATIN SMALL LETTER C WITH CARON /* morekeys_c */ "\u0107,\u00E7,\u010D", /* double_quotes */ "!text/double_9qm_rqm", - /* single_quotes */ "!text/single_9qm_rqm", // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u015B,\u00DF,\u0161", + /* single_quotes */ "!text/single_9qm_rqm", /* keyspec_currency */ null, /* morekeys_y */ null, // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE @@ -3100,12 +3132,12 @@ public final class KeyboardTextsTable { /* morekeys_n */ null, /* morekeys_c */ null, /* double_quotes */ "!text/double_9qm_rqm", - /* single_quotes */ "!text/single_9qm_rqm", // U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u0219,\u00DF,\u015B,\u0161", + /* single_quotes */ "!text/single_9qm_rqm", /* keyspec_currency ~ */ null, null, null, null, /* ~ morekeys_d */ @@ -3127,9 +3159,10 @@ public final class KeyboardTextsTable { null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* morekeys_s */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* morekeys_s ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, + /* keyspec_currency ~ */ + null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* morekeys_cyrillic_ie */ "\u0451", @@ -3159,7 +3192,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0D85,\u0D86", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+0DBB/U+0DD4: "රු" SINHALA LETTER RAYANNA/SINHALA VOWEL SIGN KETTI PAA-PILLA /* keyspec_currency */ "\u0DBB\u0DD4", }; @@ -3222,12 +3255,12 @@ public final class KeyboardTextsTable { // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* morekeys_c */ "\u010D,\u00E7,\u0107", /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* morekeys_s */ "\u0161,\u00DF,\u015B,\u015F", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -3268,9 +3301,9 @@ public final class KeyboardTextsTable { // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* morekeys_c */ "\u010D,\u0107", /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u0161", + /* single_quotes */ "!text/single_9qm_lqm", /* keyspec_currency */ null, /* morekeys_y */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON @@ -3299,9 +3332,10 @@ public final class KeyboardTextsTable { null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* morekeys_s */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* morekeys_s ~ */ - null, null, null, null, null, null, null, null, + /* keyspec_currency ~ */ + null, null, null, null, null, null, null, /* ~ morekeys_g */ /* single_angle_quotes */ "!text/single_raqm_laqm", /* double_angle_quotes */ "!text/double_raqm_laqm", @@ -3314,7 +3348,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, /* ~ morekeys_cyrillic_o */ // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE /* morekeys_cyrillic_i */ "\u045D", @@ -3361,11 +3395,11 @@ public final class KeyboardTextsTable { // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* morekeys_c */ "\u010D,\u0107,%", /* double_quotes */ null, - /* single_quotes */ null, // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u0161,%", - /* keyspec_currency */ null, - /* morekeys_y */ null, + /* single_quotes ~ */ + null, null, null, + /* ~ morekeys_y */ // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON /* morekeys_z */ "\u017E,%", // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE @@ -3436,12 +3470,12 @@ public final class KeyboardTextsTable { // U+010D: "č" LATIN SMALL LETTER C WITH CARON /* morekeys_c */ "\u00E7,\u0107,\u010D", /* double_quotes */ null, - /* single_quotes */ null, // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA // U+00DF: "ß" LATIN SMALL LETTER SHARP S /* morekeys_s */ "\u015B,\u0161,\u015F,\u00DF", + /* single_quotes */ null, /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -3527,11 +3561,10 @@ public final class KeyboardTextsTable { // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* morekeys_c */ "\u00E7", /* double_quotes */ null, - /* single_quotes */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S /* morekeys_s */ "\u00DF", - /* keyspec_currency ~ */ - null, null, null, null, null, null, + /* single_quotes ~ */ + null, null, null, null, null, null, null, /* ~ morekeys_l */ /* morekeys_g */ "g\'", }; @@ -3548,7 +3581,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+0BF9: "௹" TAMIL RUPEE SIGN /* keyspec_currency */ "\u0BF9", }; @@ -3565,7 +3598,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+0DBB/U+0DD4: "රු" SINHALA LETTER RAYANNA/SINHALA VOWEL SIGN KETTI PAA-PILLA /* keyspec_currency */ "\u0DBB\u0DD4", }; @@ -3594,7 +3627,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0C05\u0C06\u0C07", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", }; @@ -3611,7 +3644,7 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0E01\u0E02\u0E04", /* morekeys_i ~ */ null, null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT /* keyspec_currency */ "\u0E3F", }; @@ -3711,12 +3744,12 @@ public final class KeyboardTextsTable { // U+010D: "č" LATIN SMALL LETTER C WITH CARON /* morekeys_c */ "\u00E7,\u0107,\u010D", /* double_quotes */ null, - /* single_quotes */ null, // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u015F,\u00DF,\u015B,\u0161", + /* single_quotes */ null, /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE /* morekeys_y */ "\u00FD", @@ -3743,8 +3776,8 @@ public final class KeyboardTextsTable { null, null, null, /* ~ morekeys_c */ /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", /* morekeys_s */ null, + /* single_quotes */ "!text/single_9qm_lqm", // U+20B4: "₴" HRYVNIA SIGN /* keyspec_currency */ "\u20B4", /* morekeys_y ~ */ @@ -3764,7 +3797,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, /* ~ morekeys_w */ // U+0457: "ї" CYRILLIC SMALL LETTER YI /* morekeys_east_slavic_row2_2 */ "\u0457", @@ -3774,6 +3807,66 @@ public final class KeyboardTextsTable { /* morekeys_cyrillic_ghe */ "\u0491", }; + /* Locale uz_UZ: Uzbek (Uzbekistan) */ + private static final String[] TEXTS_uz_UZ = { + // This is the same as Turkish + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + /* morekeys_a */ "\u00E2,\u00E4,\u00E1", + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + /* morekeys_o */ "\u00F6,\u00F4,\u0153,\u00F2,\u00F3,\u00F5,\u00F8,\u014D", + // U+0259: "ə" LATIN SMALL LETTER SCHWA + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + /* morekeys_e */ "\u0259,\u00E9", + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + /* morekeys_u */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + /* keylabel_to_alpha */ null, + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* morekeys_i */ "\u0131,\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + // U+0148: "ň" LATIN SMALL LETTER N WITH CARON + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + /* morekeys_n */ "\u0148,\u00F1", + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + /* morekeys_c */ "\u00E7,\u0107,\u010D", + /* double_quotes */ null, + // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE + // U+0161: "š" LATIN SMALL LETTER S WITH CARON + /* morekeys_s */ "\u015F,\u00DF,\u015B,\u0161", + /* single_quotes */ null, + /* keyspec_currency */ null, + // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE + /* morekeys_y */ "\u00FD", + // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON + /* morekeys_z */ "\u017E", + /* morekeys_d ~ */ + null, null, null, + /* ~ morekeys_l */ + // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE + /* morekeys_g */ "\u011F", + }; + /* Locale vi: Vietnamese */ private static final String[] TEXTS_vi = { // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE @@ -3845,7 +3938,7 @@ public final class KeyboardTextsTable { /* morekeys_i */ "\u00EC,\u00ED,\u1EC9,\u0129,\u1ECB", /* morekeys_n ~ */ null, null, null, null, null, - /* ~ morekeys_s */ + /* ~ single_quotes */ // U+20AB: "₫" DONG SIGN /* keyspec_currency */ "\u20AB", // U+1EF3: "ỳ" LATIN SMALL LETTER Y WITH GRAVE @@ -3904,7 +3997,6 @@ public final class KeyboardTextsTable { // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* morekeys_c */ "\u00E7", /* double_quotes */ null, - /* single_quotes */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S /* morekeys_s */ "\u00DF", }; @@ -3982,7 +4074,6 @@ public final class KeyboardTextsTable { // U+010D: "č" LATIN SMALL LETTER C WITH CARON /* morekeys_c */ "\u00E7,\u0107,\u0109,\u010B,\u010D", /* double_quotes */ null, - /* single_quotes */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX @@ -3990,6 +4081,7 @@ public final class KeyboardTextsTable { // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+017F: "ſ" LATIN SMALL LETTER LONG S /* morekeys_s */ "\u00DF,\u015B,\u015D,\u015F,\u0161,\u017F", + /* single_quotes */ null, /* keyspec_currency */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX @@ -4034,6 +4126,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, /* ~ morekeys_question */ // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX /* morekeys_h */ "\u0125", @@ -4042,7 +4135,7 @@ public final class KeyboardTextsTable { /* morekeys_east_slavic_row2_2 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, + null, null, /* ~ morekeys_v */ // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX /* morekeys_j */ "\u0135", @@ -4056,42 +4149,43 @@ public final class KeyboardTextsTable { "az_AZ" , TEXTS_az_AZ, /* 11/ 18 Azerbaijani (Azerbaijan) */ "be_BY" , TEXTS_be_BY, /* 9/ 32 Belarusian (Belarus) */ "bg" , TEXTS_bg, /* 2/ 9 Bulgarian */ + "bn_BD" , TEXTS_bn_BD, /* 2/ 12 Bengali (Bangladesh) */ "bn_IN" , TEXTS_bn_IN, /* 2/ 12 Bengali (India) */ - "ca" , TEXTS_ca, /* 11/ 96 Catalan */ + "ca" , TEXTS_ca, /* 11/ 99 Catalan */ "cs" , TEXTS_cs, /* 17/ 21 Czech */ "da" , TEXTS_da, /* 19/ 54 Danish */ - "de" , TEXTS_de, /* 16/ 62 German */ + "de" , TEXTS_de, /* 16/ 63 German */ "el" , TEXTS_el, /* 1/ 5 Greek */ - "en" , TEXTS_en, /* 8/ 11 English */ + "en" , TEXTS_en, /* 8/ 10 English */ "eo" , TEXTS_eo, /* 26/126 Esperanto */ "es" , TEXTS_es, /* 8/ 55 Spanish */ "et_EE" , TEXTS_et_EE, /* 22/ 27 Estonian (Estonia) */ "eu_ES" , TEXTS_eu_ES, /* 7/ 8 Basque (Spain) */ "fa" , TEXTS_fa, /* 58/133 Persian */ "fi" , TEXTS_fi, /* 10/ 54 Finnish */ - "fr" , TEXTS_fr, /* 13/ 62 French */ + "fr" , TEXTS_fr, /* 13/ 63 French */ "gl_ES" , TEXTS_gl_ES, /* 7/ 8 Gallegan (Spain) */ - "hi" , TEXTS_hi, /* 23/ 53 Hindi */ + "hi" , TEXTS_hi, /* 27/ 84 Hindi */ "hi_ZZ" , TEXTS_hi_ZZ, /* 9/118 Hindi (ZZ) */ "hr" , TEXTS_hr, /* 9/ 20 Croatian */ "hu" , TEXTS_hu, /* 9/ 20 Hungarian */ "hy_AM" , TEXTS_hy_AM, /* 9/134 Armenian (Armenia) */ "is" , TEXTS_is, /* 10/ 16 Icelandic */ - "it" , TEXTS_it, /* 11/ 62 Italian */ + "it" , TEXTS_it, /* 11/ 63 Italian */ "iw" , TEXTS_iw, /* 20/131 Hebrew */ - "ka_GE" , TEXTS_ka_GE, /* 3/ 10 Georgian (Georgia) */ + "ka_GE" , TEXTS_ka_GE, /* 3/ 11 Georgian (Georgia) */ "kk" , TEXTS_kk, /* 15/129 Kazakh */ "km_KH" , TEXTS_km_KH, /* 2/130 Khmer (Cambodia) */ "kn_IN" , TEXTS_kn_IN, /* 2/ 12 Kannada (India) */ - "ky" , TEXTS_ky, /* 10/ 89 Kirghiz */ + "ky" , TEXTS_ky, /* 10/ 92 Kirghiz */ "lo_LA" , TEXTS_lo_LA, /* 2/ 12 Lao (Laos) */ "lt" , TEXTS_lt, /* 18/ 22 Lithuanian */ "lv" , TEXTS_lv, /* 18/ 22 Latvian */ - "mk" , TEXTS_mk, /* 9/ 94 Macedonian */ + "mk" , TEXTS_mk, /* 9/ 97 Macedonian */ "ml_IN" , TEXTS_ml_IN, /* 2/ 12 Malayalam (India) */ "mn_MN" , TEXTS_mn_MN, /* 2/ 12 Mongolian (Mongolia) */ "mr_IN" , TEXTS_mr_IN, /* 23/ 53 Marathi (India) */ - "my_MM" , TEXTS_my_MM, /* 8/104 Burmese (Myanmar) */ + "my_MM" , TEXTS_my_MM, /* 8/ 98 Burmese (Myanmar) */ "nb" , TEXTS_nb, /* 11/ 54 Norwegian Bokmål */ "ne_NP" , TEXTS_ne_NP, /* 23/ 53 Nepali (Nepal) */ "nl" , TEXTS_nl, /* 9/ 13 Dutch */ @@ -4103,7 +4197,7 @@ public final class KeyboardTextsTable { "si_LK" , TEXTS_si_LK, /* 2/ 12 Sinhalese (Sri Lanka) */ "sk" , TEXTS_sk, /* 20/ 22 Slovak */ "sl" , TEXTS_sl, /* 8/ 20 Slovenian */ - "sr" , TEXTS_sr, /* 11/ 94 Serbian */ + "sr" , TEXTS_sr, /* 11/ 97 Serbian */ "sr_ZZ" , TEXTS_sr_ZZ, /* 14/118 Serbian (ZZ) */ "sv" , TEXTS_sv, /* 21/ 54 Swedish */ "sw" , TEXTS_sw, /* 9/ 18 Swahili */ @@ -4114,9 +4208,10 @@ public final class KeyboardTextsTable { "th" , TEXTS_th, /* 2/ 12 Thai */ "tl" , TEXTS_tl, /* 7/ 8 Tagalog */ "tr" , TEXTS_tr, /* 11/ 18 Turkish */ - "uk" , TEXTS_uk, /* 11/ 88 Ukrainian */ + "uk" , TEXTS_uk, /* 11/ 91 Ukrainian */ + "uz_UZ" , TEXTS_uz_UZ, /* 11/ 18 Uzbek (Uzbekistan) */ "vi" , TEXTS_vi, /* 8/ 15 Vietnamese */ - "zu" , TEXTS_zu, /* 8/ 11 Zulu */ + "zu" , TEXTS_zu, /* 8/ 10 Zulu */ "zz" , TEXTS_zz, /* 19/120 Alphabet */ }; diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index 1da33ed3f..6f3c48c47 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -199,6 +199,9 @@ public final class BinaryDictionary extends Dictionary { int[] word, int probability, int timestamp); private static native boolean removeNgramEntryNative(long dict, int[][] prevWordCodePointArrays, boolean[] isBeginningOfSentenceArray, int[] word); + private static native boolean updateCounterNative(long dict, + int[][] prevWordCodePointArrays, boolean[] isBeginningOfSentenceArray, + int[] word, boolean isValidWord, int count, int timestamp); private static native int addMultipleDictionaryEntriesNative(long dict, LanguageModelParam[] languageModelParams, int startIndex); private static native String getPropertyNative(long dict, String query); diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 5aae010ac..099d4850e 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -247,7 +247,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen case MSG_RESUME_SUGGESTIONS: latinIme.mInputLogic.restartSuggestionsOnWordTouchedByCursor( latinIme.mSettings.getCurrent(), - msg.arg1 == ARG1_TRUE /* shouldIncludeResumedWordInSuggestions */, latinIme.mKeyboardSwitcher.getCurrentKeyboardScriptId()); break; case MSG_REOPEN_DICTIONARIES: @@ -288,8 +287,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen sendMessage(obtainMessage(MSG_REOPEN_DICTIONARIES)); } - public void postResumeSuggestions(final boolean shouldIncludeResumedWordInSuggestions, - final boolean shouldDelay) { + public void postResumeSuggestions(final boolean shouldDelay) { final LatinIME latinIme = getOwnerInstance(); if (latinIme == null) { return; @@ -299,13 +297,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } removeMessages(MSG_RESUME_SUGGESTIONS); if (shouldDelay) { - sendMessageDelayed(obtainMessage(MSG_RESUME_SUGGESTIONS, - shouldIncludeResumedWordInSuggestions ? ARG1_TRUE : ARG1_FALSE, - 0 /* ignored */), mDelayInMillisecondsToUpdateSuggestions); + sendMessageDelayed(obtainMessage(MSG_RESUME_SUGGESTIONS), + mDelayInMillisecondsToUpdateSuggestions); } else { - sendMessage(obtainMessage(MSG_RESUME_SUGGESTIONS, - shouldIncludeResumedWordInSuggestions ? ARG1_TRUE : ARG1_FALSE, - 0 /* ignored */)); + sendMessage(obtainMessage(MSG_RESUME_SUGGESTIONS)); } } @@ -622,8 +617,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } if (mHandler.hasPendingWaitForDictionaryLoad()) { mHandler.cancelWaitForDictionaryLoad(); - mHandler.postResumeSuggestions(true /* shouldIncludeResumedWordInSuggestions */, - false /* shouldDelay */); + mHandler.postResumeSuggestions(false /* shouldDelay */); } } @@ -926,11 +920,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // mLastSelection{Start,End} are reset later in this method, no need to do it here needToCallLoadKeyboardLater = true; } else { - // When rotating, initialSelStart and initialSelEnd sometimes are lying. Make a best - // effort to work around this bug. + // When rotating, and when input is starting again in a field from where the focus + // didn't move (the keyboard having been closed with the back key), + // initialSelStart and initialSelEnd sometimes are lying. Make a best effort to + // work around this bug. mInputLogic.mConnection.tryFixLyingCursorPosition(); - mHandler.postResumeSuggestions(true /* shouldIncludeResumedWordInSuggestions */, - true /* shouldDelay */); + mHandler.postResumeSuggestions(true /* shouldDelay */); needToCallLoadKeyboardLater = false; } } else { diff --git a/java/src/com/android/inputmethod/latin/NgramContext.java b/java/src/com/android/inputmethod/latin/NgramContext.java index c35c6e2c8..6d438584f 100644 --- a/java/src/com/android/inputmethod/latin/NgramContext.java +++ b/java/src/com/android/inputmethod/latin/NgramContext.java @@ -169,8 +169,14 @@ public class NgramContext { @Override public int hashCode() { - // Just for having equals(). - return mPrevWordsInfo[0].hashCode(); + int hashValue = 0; + for (final WordInfo wordInfo : mPrevWordsInfo) { + if (wordInfo == null || !WordInfo.EMPTY_WORD_INFO.equals(wordInfo)) { + break; + } + hashValue ^= wordInfo.hashCode(); + } + return hashValue; } @Override diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 750706113..a7ea2a1c8 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -849,8 +849,9 @@ public final class RichInputConnection { /** * Try to get the text from the editor to expose lies the framework may have been - * telling us. Concretely, when the device rotates, the frameworks tells us about where the - * cursor used to be initially in the editor at the time it first received the focus; this + * telling us. Concretely, when the device rotates and when the keyboard reopens in the same + * text field after having been closed with the back key, the frameworks tells us about where + * the cursor used to be initially in the editor at the time it first received the focus; this * may be completely different from the place it is upon rotation. Since we don't have any * means to get the real value, try at least to ask the text view for some characters and * detect the most damaging cases: when the cursor position is declared to be much smaller @@ -859,7 +860,20 @@ public final class RichInputConnection { public void tryFixLyingCursorPosition() { final CharSequence textBeforeCursor = getTextBeforeCursor( Constants.EDITOR_CONTENTS_CACHE_SIZE, 0); - if (null == textBeforeCursor) { + final CharSequence selectedText = mIC.getSelectedText(0 /* flags */); + if (null == textBeforeCursor || + (!TextUtils.isEmpty(selectedText) && mExpectedSelEnd == mExpectedSelStart)) { + // If textBeforeCursor is null, we have no idea what kind of text field we have or if + // thinking about the "cursor position" actually makes any sense. In this case we + // remember a meaningless cursor position. Contrast this with an empty string, which is + // valid and should mean the cursor is at the start of the text. + // Also, if we expect we don't have a selection but we DO have non-empty selected text, + // then the framework lied to us about the cursor position. In this case, we should just + // revert to the most basic behavior possible for the next action (backspace in + // particular comes to mind), so we remember a meaningless cursor position which should + // result in degraded behavior from the next input. + // Interestingly, in either case, chances are any action the user takes next will result + // in a call to onUpdateSelection, which should set things right. mExpectedSelStart = mExpectedSelEnd = Constants.NOT_A_CURSOR_POSITION; } else { final int textLength = textBeforeCursor.length(); diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 27af1611a..b4a1c3e65 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -435,8 +435,7 @@ public final class InputLogic { // removed. mConnection.removeBackgroundColorFromHighlightedTextIfNecessary(); // We moved the cursor. If we are touching a word, we need to resume suggestion. - mLatinIME.mHandler.postResumeSuggestions(false /* shouldIncludeResumedWordInSuggestions */, - true /* shouldDelay */); + mLatinIME.mHandler.postResumeSuggestions(true /* shouldDelay */); // Stop the last recapitalization, if started. mRecapitalizeStatus.stop(); return true; @@ -1127,19 +1126,21 @@ public final class InputLogic { StatsUtils.onBackspaceSelectedText(numCharsDeleted); } else { // There is no selection, just delete one character. - if (Constants.NOT_A_CURSOR_POSITION == mConnection.getExpectedSelectionEnd()) { - // This should never happen. - Log.e(TAG, "Backspace when we don't know the selection position"); - } - if (inputTransaction.mSettingsValues.isBeforeJellyBean() || - inputTransaction.mSettingsValues.mInputAttributes.isTypeNull()) { - // There are two possible reasons to send a key event: either the field has + if (inputTransaction.mSettingsValues.isBeforeJellyBean() + || inputTransaction.mSettingsValues.mInputAttributes.isTypeNull() + || Constants.NOT_A_CURSOR_POSITION + == mConnection.getExpectedSelectionEnd()) { + // There are three possible reasons to send a key event: either the field has // type TYPE_NULL, in which case the keyboard should send events, or we are - // running in backward compatibility mode. Before Jelly bean, the keyboard - // would simulate a hardware keyboard event on pressing enter or delete. This - // is bad for many reasons (there are race conditions with commits) but some - // applications are relying on this behavior so we continue to support it for - // older apps, so we retain this behavior if the app has target SDK < JellyBean. + // running in backward compatibility mode, or we don't know the cursor position. + // Before Jelly bean, the keyboard would simulate a hardware keyboard event on + // pressing enter or delete. This is bad for many reasons (there are race + // conditions with commits) but some applications are relying on this behavior + // so we continue to support it for older apps, so we retain this behavior if + // the app has target SDK < JellyBean. + // As for the case where we don't know the cursor position, it can happen + // because of bugs in the framework. But the framework should know, so the next + // best thing is to leave it to whatever it thinks is best. sendDownUpKeyEvent(KeyEvent.KEYCODE_DEL); int totalDeletedLength = 1; if (mDeleteCount > Constants.DELETE_ACCELERATE_AT) { @@ -1184,7 +1185,7 @@ public final class InputLogic { && !mConnection.isCursorFollowedByWordCharacter( inputTransaction.mSettingsValues.mSpacingAndPunctuations)) { restartSuggestionsOnWordTouchedByCursor(inputTransaction.mSettingsValues, - true /* shouldIncludeResumedWordInSuggestions */, currentKeyboardScriptId); + currentKeyboardScriptId); } } } @@ -1440,12 +1441,10 @@ public final class InputLogic { * do nothing. * * @param settingsValues the current values of the settings. - * @param shouldIncludeResumedWordInSuggestions whether to include the word on which we resume * suggestions in the suggestion list. */ // TODO: make this private. public void restartSuggestionsOnWordTouchedByCursor(final SettingsValues settingsValues, - final boolean shouldIncludeResumedWordInSuggestions, // TODO: remove this argument, put it into settingsValues final int currentKeyboardScriptId) { // HACK: We may want to special-case some apps that exhibit bad behavior in case of @@ -1493,13 +1492,6 @@ public final class InputLogic { if (numberOfCharsInWordBeforeCursor > expectedCursorPosition) return; final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<>(); final String typedWord = range.mWord.toString(); - if (shouldIncludeResumedWordInSuggestions) { - suggestions.add(new SuggestedWordInfo(typedWord, - SuggestedWords.MAX_SUGGESTIONS + 1, - SuggestedWordInfo.KIND_TYPED, Dictionary.DICTIONARY_USER_TYPED, - SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, - SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */)); - } if (!isResumableWord(settingsValues, typedWord)) { mSuggestionStripViewAccessor.setNeutralSuggestionStrip(); return; @@ -1532,7 +1524,7 @@ public final class InputLogic { mConnection.maybeMoveTheCursorAroundAndRestoreToWorkaroundABug(); mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor, expectedCursorPosition + range.getNumberOfCharsInWordAfterCursor()); - if (suggestions.size() <= (shouldIncludeResumedWordInSuggestions ? 1 : 0)) { + if (suggestions.size() <= 0) { // If there weren't any suggestion spans on this word, suggestions#size() will be 1 // if shouldIncludeResumedWordInSuggestions is true, 0 otherwise. In this case, we // have no useful suggestions, so we will try to compute some for it instead. @@ -1542,8 +1534,7 @@ public final class InputLogic { public void onGetSuggestedWords( final SuggestedWords suggestedWordsIncludingTypedWord) { final SuggestedWords suggestedWords; - if (suggestedWordsIncludingTypedWord.size() > 1 - && !shouldIncludeResumedWordInSuggestions) { + if (suggestedWordsIncludingTypedWord.size() > 1) { // We were able to compute new suggestions for this word. // Remove the typed word, since we don't want to display it in this // case. The #getSuggestedWordsExcludingTypedWordForRecorrection() @@ -1591,6 +1582,10 @@ public final class InputLogic { final String committedWordString = committedWord.toString(); final int cancelLength = committedWord.length(); final String separatorString = mLastComposedWord.mSeparatorString; + // If our separator is a space, we won't actually commit it, + // but set the space state to PHANTOM so that a space will be inserted + // on the next keypress + final boolean usePhantomSpace = separatorString.equals(Constants.STRING_SPACE); // We want java chars, not codepoints for the following. final int separatorLength = separatorString.length(); // TODO: should we check our saved separator against the actual contents of the text view? @@ -1611,7 +1606,8 @@ public final class InputLogic { if (!TextUtils.isEmpty(committedWord)) { mDictionaryFacilitator.removeWordFromPersonalizedDicts(committedWordString); } - final String stringToCommit = originallyTypedWord + separatorString; + final String stringToCommit = originallyTypedWord + + (usePhantomSpace ? "" : separatorString); final SpannableString textToCommit = new SpannableString(stringToCommit); if (committedWord instanceof SpannableString) { final SpannableString committedWordWithSuggestionSpans = (SpannableString)committedWord; @@ -1644,8 +1640,10 @@ public final class InputLogic { } } // Add the suggestion list to the list of suggestions. - textToCommit.setSpan(new SuggestionSpan(inputTransaction.mSettingsValues.mLocale, - suggestions.toArray(new String[suggestions.size()]), 0 /* flags */), + textToCommit.setSpan(new SuggestionSpan(mLatinIME /* context */, + inputTransaction.mSettingsValues.mLocale, + suggestions.toArray(new String[suggestions.size()]), 0 /* flags */, + null /* notificationTargetClass */), 0 /* start */, lastCharIndex /* end */, 0 /* flags */); } @@ -1663,6 +1661,9 @@ public final class InputLogic { } else { mConnection.commitText(textToCommit, 1); } + if (usePhantomSpace) { + mSpaceState = SpaceState.PHANTOM; + } } else { // For languages without spaces, we revert the typed string but the cursor is flush // with the typed word, so we need to resume suggestions right away. @@ -2186,10 +2187,7 @@ public final class InputLogic { } mConnection.tryFixLyingCursorPosition(); if (tryResumeSuggestions) { - // This is triggered when starting input anew, so we want to include the resumed - // word in suggestions. - handler.postResumeSuggestions(true /* shouldIncludeResumedWordInSuggestions */, - true /* shouldDelay */); + handler.postResumeSuggestions(true /* shouldDelay */); } return true; } diff --git a/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java b/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java index df447fd75..3f9ffd285 100644 --- a/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java +++ b/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java @@ -47,6 +47,7 @@ public final class DictionaryHeader { public static final String MAX_UNIGRAM_COUNT_KEY = "MAX_UNIGRAM_COUNT"; public static final String MAX_BIGRAM_COUNT_KEY = "MAX_BIGRAM_COUNT"; public static final String ATTRIBUTE_VALUE_TRUE = "1"; + public static final String CODE_POINT_TABLE_KEY = "codePointTable"; public DictionaryHeader(final int headerSize, final DictionaryOptions dictionaryOptions, final FormatOptions formatOptions) throws UnsupportedFormatException { diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index ec3c6e291..2661d5d48 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -237,6 +237,8 @@ public final class FormatSpec { static final int UINT16_MAX = 0xFFFF; static final int UINT24_MAX = 0xFFFFFF; static final int MSB8 = 0x80; + static final int MINIMAL_ONE_BYTE_CHARACTER_VALUE = 0x20; + static final int MAXIMAL_ONE_BYTE_CHARACTER_VALUE = 0xFF; /** * Options about file format. diff --git a/java/src/com/android/inputmethod/latin/makedict/NgramProperty.java b/java/src/com/android/inputmethod/latin/makedict/NgramProperty.java new file mode 100644 index 000000000..99e0e273f --- /dev/null +++ b/java/src/com/android/inputmethod/latin/makedict/NgramProperty.java @@ -0,0 +1,26 @@ +package com.android.inputmethod.latin.makedict; + +import com.android.inputmethod.latin.NgramContext; + +public class NgramProperty { + public final WeightedString mTargetWord; + public final NgramContext mNgramContext; + + public NgramProperty(final WeightedString targetWord, final NgramContext ngramContext) { + mTargetWord = targetWord; + mNgramContext = ngramContext; + } + + @Override + public int hashCode() { + return mTargetWord.hashCode() ^ mNgramContext.hashCode(); + } + + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof NgramProperty)) return false; + final NgramProperty n = (NgramProperty)o; + return mTargetWord.equals(n.mTargetWord) && mNgramContext.equals(n.mNgramContext); + } +} diff --git a/java/src/com/android/inputmethod/latin/makedict/WordProperty.java b/java/src/com/android/inputmethod/latin/makedict/WordProperty.java index cd78e2235..46705f9db 100644 --- a/java/src/com/android/inputmethod/latin/makedict/WordProperty.java +++ b/java/src/com/android/inputmethod/latin/makedict/WordProperty.java @@ -18,6 +18,8 @@ package com.android.inputmethod.latin.makedict; import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.latin.BinaryDictionary; +import com.android.inputmethod.latin.NgramContext; +import com.android.inputmethod.latin.NgramContext.WordInfo; import com.android.inputmethod.latin.utils.CombinedFormatUtils; import com.android.inputmethod.latin.utils.StringUtils; @@ -33,16 +35,17 @@ public final class WordProperty implements Comparable<WordProperty> { public final String mWord; public final ProbabilityInfo mProbabilityInfo; public final ArrayList<WeightedString> mShortcutTargets; - public final ArrayList<WeightedString> mBigrams; + public final ArrayList<NgramProperty> mNgrams; // TODO: Support mIsBeginningOfSentence. public final boolean mIsBeginningOfSentence; public final boolean mIsNotAWord; public final boolean mIsBlacklistEntry; public final boolean mHasShortcuts; - public final boolean mHasBigrams; + public final boolean mHasNgrams; private int mHashCode = 0; + // TODO: Support n-gram. @UsedForTesting public WordProperty(final String word, final ProbabilityInfo probabilityInfo, final ArrayList<WeightedString> shortcutTargets, @@ -51,11 +54,17 @@ public final class WordProperty implements Comparable<WordProperty> { mWord = word; mProbabilityInfo = probabilityInfo; mShortcutTargets = shortcutTargets; - mBigrams = bigrams; + mNgrams = new ArrayList<>(); + final NgramContext ngramContext = new NgramContext(new WordInfo(mWord)); + if (bigrams != null) { + for (final WeightedString bigramTarget : bigrams) { + mNgrams.add(new NgramProperty(bigramTarget, ngramContext)); + } + } mIsBeginningOfSentence = false; mIsNotAWord = isNotAWord; mIsBlacklistEntry = isBlacklistEntry; - mHasBigrams = bigrams != null && !bigrams.isEmpty(); + mHasNgrams = bigrams != null && !bigrams.isEmpty(); mHasShortcuts = shortcutTargets != null && !shortcutTargets.isEmpty(); } @@ -78,19 +87,24 @@ public final class WordProperty implements Comparable<WordProperty> { mWord = StringUtils.getStringFromNullTerminatedCodePointArray(codePoints); mProbabilityInfo = createProbabilityInfoFromArray(probabilityInfo); mShortcutTargets = new ArrayList<>(); - mBigrams = new ArrayList<>(); + mNgrams = new ArrayList<>(); mIsBeginningOfSentence = isBeginningOfSentence; mIsNotAWord = isNotAWord; mIsBlacklistEntry = isBlacklisted; mHasShortcuts = hasShortcuts; - mHasBigrams = hasBigram; - - final int bigramTargetCount = bigramTargets.size(); - for (int i = 0; i < bigramTargetCount; i++) { - final String bigramTargetString = + mHasNgrams = hasBigram; + + final int relatedNgramCount = bigramTargets.size(); + final WordInfo currentWordInfo = + mIsBeginningOfSentence ? WordInfo.BEGINNING_OF_SENTENCE : new WordInfo(mWord); + final NgramContext ngramContext = new NgramContext(currentWordInfo); + for (int i = 0; i < relatedNgramCount; i++) { + final String ngramTargetString = StringUtils.getStringFromNullTerminatedCodePointArray(bigramTargets.get(i)); - mBigrams.add(new WeightedString(bigramTargetString, - createProbabilityInfoFromArray(bigramProbabilityInfo.get(i)))); + final WeightedString ngramTarget = new WeightedString(ngramTargetString, + createProbabilityInfoFromArray(bigramProbabilityInfo.get(i))); + // TODO: Support n-gram. + mNgrams.add(new NgramProperty(ngramTarget, ngramContext)); } final int shortcutTargetCount = shortcutTargets.size(); @@ -102,6 +116,17 @@ public final class WordProperty implements Comparable<WordProperty> { } } + // TODO: Remove + public ArrayList<WeightedString> getBigrams() { + final ArrayList<WeightedString> bigrams = new ArrayList<>(); + for (final NgramProperty ngram : mNgrams) { + if (ngram.mNgramContext.getPrevWordCount() == 1) { + bigrams.add(ngram.mTargetWord); + } + } + return bigrams; + } + public int getProbability() { return mProbabilityInfo.mProbability; } @@ -110,8 +135,8 @@ public final class WordProperty implements Comparable<WordProperty> { return Arrays.hashCode(new Object[] { word.mWord, word.mProbabilityInfo, - word.mShortcutTargets.hashCode(), - word.mBigrams.hashCode(), + word.mShortcutTargets, + word.mNgrams, word.mIsNotAWord, word.mIsBlacklistEntry }); @@ -142,9 +167,9 @@ public final class WordProperty implements Comparable<WordProperty> { if (!(o instanceof WordProperty)) return false; WordProperty w = (WordProperty)o; return mProbabilityInfo.equals(w.mProbabilityInfo) && mWord.equals(w.mWord) - && mShortcutTargets.equals(w.mShortcutTargets) && mBigrams.equals(w.mBigrams) + && mShortcutTargets.equals(w.mShortcutTargets) && mNgrams.equals(w.mNgrams) && mIsNotAWord == w.mIsNotAWord && mIsBlacklistEntry == w.mIsBlacklistEntry - && mHasBigrams == w.mHasBigrams && mHasShortcuts && w.mHasBigrams; + && mHasNgrams == w.mHasNgrams && mHasShortcuts && w.mHasNgrams; } @Override diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java index a171fc330..83adb1c55 100644 --- a/java/src/com/android/inputmethod/latin/settings/Settings.java +++ b/java/src/com/android/inputmethod/latin/settings/Settings.java @@ -32,6 +32,7 @@ import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils; import com.android.inputmethod.latin.utils.ResourceUtils; import com.android.inputmethod.latin.utils.RunInLocale; +import com.android.inputmethod.latin.utils.StatsUtils; import com.android.inputmethod.latin.utils.StringUtils; import java.util.Collections; @@ -169,6 +170,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang return; } loadSettings(mContext, mSettingsValues.mLocale, mSettingsValues.mInputAttributes); + StatsUtils.onLoadSettings(mSettingsValues); } finally { mSettingsValuesLock.unlock(); } diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java index 1e8df8986..839fce051 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java @@ -365,17 +365,21 @@ final class SuggestionStripLayoutHelper { (PunctuationSuggestions)suggestedWords, stripView); } + final boolean shouldShowUiToAcceptTypedWord = Settings.getInstance().getCurrent() + .mShouldShowUiToAcceptTypedWord; + final int suggestionsCount = suggestedWords.size() + - (shouldShowUiToAcceptTypedWord ? /* typed word */ 1 : 0); final int startIndexOfMoreSuggestions = setupWordViewsAndReturnStartIndexOfMoreSuggestions( suggestedWords, mSuggestionsCountInStrip); final TextView centerWordView = mWordViews.get(mCenterPositionInStrip); final int stripWidth = stripView.getWidth(); final int centerWidth = getSuggestionWidth(mCenterPositionInStrip, stripWidth); - if (suggestedWords.size() == 1 || getTextScaleX(centerWordView.getText(), centerWidth, + if (suggestionsCount == 1 || getTextScaleX(centerWordView.getText(), centerWidth, centerWordView.getPaint()) < MIN_TEXT_XSCALE) { // Layout only the most relevant suggested word at the center of the suggestion strip // by consolidating all slots in the strip. final int countInStrip = 1; - mMoreSuggestionsAvailable = (suggestedWords.size() > countInStrip); + mMoreSuggestionsAvailable = (suggestionsCount > countInStrip); layoutWord(mCenterPositionInStrip, stripWidth - mPadding); stripView.addView(centerWordView); setLayoutWeight(centerWordView, 1.0f, ViewGroup.LayoutParams.MATCH_PARENT); @@ -387,7 +391,7 @@ final class SuggestionStripLayoutHelper { } final int countInStrip = mSuggestionsCountInStrip; - mMoreSuggestionsAvailable = (suggestedWords.size() > countInStrip); + mMoreSuggestionsAvailable = (suggestionsCount > countInStrip); int x = 0; for (int positionInStrip = 0; positionInStrip < countInStrip; positionInStrip++) { if (positionInStrip != 0) { diff --git a/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java b/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java index 34f59e8bc..7e8e55990 100644 --- a/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java @@ -67,7 +67,7 @@ public class CombinedFormatUtils { builder.append("," + BLACKLISTED_TAG + "=true"); } builder.append("\n"); - if (wordProperty.mShortcutTargets != null) { + if (wordProperty.mHasShortcuts) { for (final WeightedString shortcutTarget : wordProperty.mShortcutTargets) { builder.append(" " + SHORTCUT_TAG + "=" + shortcutTarget.mWord); builder.append(","); @@ -75,8 +75,9 @@ public class CombinedFormatUtils { builder.append("\n"); } } - if (wordProperty.mBigrams != null) { - for (final WeightedString bigram : wordProperty.mBigrams) { + if (wordProperty.mHasNgrams) { + // TODO: Support ngram. + for (final WeightedString bigram : wordProperty.getBigrams()) { builder.append(" " + BIGRAM_TAG + "=" + bigram.mWord); builder.append(","); builder.append(formatProbabilityInfo(bigram.mProbabilityInfo)); |