From 65173aa6b27ad799e27c60635640976c2ca7e4b2 Mon Sep 17 00:00:00 2001 From: Aleksandras Kostarevas Date: Sat, 31 Aug 2024 17:40:46 +0300 Subject: [PATCH] Update tests to successfully compile again --- .../keyboard/internal/KeyboardIconsSet.java | 16 - .../keyboard/internal/KeyboardState.kt | 18 + .../keyboard/internal/KeyboardTextsTable.java | 2258 +++++++++-------- .../inputmethod/latin/LatinIMELegacy.java | 17 +- .../org/futo/inputmethod/latin/Subtypes.kt | 16 +- .../latin/utils/ImportantNoticeUtils.java | 118 - .../inputmethod/v2keyboard/LayoutEngine.kt | 8 +- tests/AndroidManifest.xml | 5 +- ...KeyboardLayoutSetNavigateMoreKeysBase.java | 34 +- .../keyboard/KeyboardLayoutSetTestsBase.java | 33 +- .../keyboard/KeyboardLayoutTest.kt | 121 +- .../keyboard/action/ActionTestsBase.java | 10 +- .../keyboard/action/KlpActionLabelTests.java | 14 +- .../internal/KeyboardStateTestsBase.java | 4 +- .../internal/MockKeyboardSwitcher.java | 65 +- .../MoreKeySpecStringReferenceTests.java | 14 +- .../layout/expected/AbstractLayoutBase.java | 50 +- .../expected/ActualKeyboardBuilder.java | 13 +- .../keyboard/layout/expected/ExpectedKey.java | 27 +- .../expected/ExpectedKeyboardBuilder.java | 6 +- .../layout/tests/LayoutTestsBase.java | 6 +- .../layout/tests/TestsDvorakEmail.java | 7 +- .../keyboard/layout/tests/TestsDvorakUrl.java | 7 +- .../layout/tests/TestsQwertyEmail.java | 7 +- .../keyboard/layout/tests/TestsQwertyUrl.java | 7 +- .../TestsSplitLayoutQwertyEnglishUS.java | 7 +- .../inputmethod/latin/InputTestsBase.java | 6 +- .../inputmethod/latin/PunctuationTests.java | 2 +- .../latin/RichInputMethodSubtypeTests.java | 30 +- .../utils/AdditionalSubtypeUtilsTests.java | 14 +- .../utils/ImportantNoticeUtilsTests.java | 135 - .../utils/LanguageOnSpacebarUtilsTests.java | 3 +- .../latin/utils/SubtypeLocaleUtilsTests.java | 58 +- 33 files changed, 1459 insertions(+), 1677 deletions(-) delete mode 100644 java/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtils.java delete mode 100644 tests/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtilsTests.java diff --git a/java/src/org/futo/inputmethod/keyboard/internal/KeyboardIconsSet.java b/java/src/org/futo/inputmethod/keyboard/internal/KeyboardIconsSet.java index d7c17b19f..df485d353 100644 --- a/java/src/org/futo/inputmethod/keyboard/internal/KeyboardIconsSet.java +++ b/java/src/org/futo/inputmethod/keyboard/internal/KeyboardIconsSet.java @@ -63,22 +63,6 @@ public final class KeyboardIconsSet { private DynamicThemeProvider provider; public void loadIcons(final TypedArray keyboardAttrs, @Nullable DynamicThemeProvider provider) { this.provider = provider; - /* - final int size = ATTR_ID_TO_ICON_ID.size(); - for (int index = 0; index < size; index++) { - final int attrId = ATTR_ID_TO_ICON_ID.keyAt(index); - try { - final Drawable icon = DynamicThemeProvider.Companion.getDrawableOrDefault(attrId, keyboardAttrs, provider); - setDefaultBounds(icon); - final Integer iconId = ATTR_ID_TO_ICON_ID.get(attrId); - mIcons[iconId] = icon; - } catch (Resources.NotFoundException e) { - Log.w(TAG, "Drawable resource for icon #" - + keyboardAttrs.getResources().getResourceEntryName(attrId) - + " not found"); - } - } - */ } @Nullable diff --git a/java/src/org/futo/inputmethod/keyboard/internal/KeyboardState.kt b/java/src/org/futo/inputmethod/keyboard/internal/KeyboardState.kt index c532bc78a..f1a98b678 100644 --- a/java/src/org/futo/inputmethod/keyboard/internal/KeyboardState.kt +++ b/java/src/org/futo/inputmethod/keyboard/internal/KeyboardState.kt @@ -53,6 +53,24 @@ data class KeyboardLayoutElement( KeyboardLayoutKind.Number -> KeyboardId.ELEMENT_NUMBER } + + companion object { + @JvmStatic + fun fromElementId(value: Int): KeyboardLayoutElement = + when(value) { + KeyboardId.ELEMENT_ALPHABET -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Alphabet, page = KeyboardLayoutPage.Base) + KeyboardId.ELEMENT_ALPHABET_MANUAL_SHIFTED -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Alphabet, page = KeyboardLayoutPage.Shifted) + KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Alphabet, page = KeyboardLayoutPage.Shifted) + KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCKED -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Alphabet, page = KeyboardLayoutPage.ShiftLocked) + KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCK_SHIFTED -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Alphabet, page = KeyboardLayoutPage.ShiftLocked) + KeyboardId.ELEMENT_SYMBOLS -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Symbols, page = KeyboardLayoutPage.Base) + KeyboardId.ELEMENT_SYMBOLS_SHIFTED -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Symbols, page = KeyboardLayoutPage.Shifted) + KeyboardId.ELEMENT_PHONE -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Phone, page = KeyboardLayoutPage.Base) + KeyboardId.ELEMENT_PHONE_SYMBOLS -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Phone, page = KeyboardLayoutPage.Shifted) + KeyboardId.ELEMENT_NUMBER -> KeyboardLayoutElement(kind = KeyboardLayoutKind.Number, page = KeyboardLayoutPage.Base) + else -> throw IllegalArgumentException("Invalid elementId $value") + } + } } interface SwitchActions { diff --git a/java/src/org/futo/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/org/futo/inputmethod/keyboard/internal/KeyboardTextsTable.java index 303ace6c0..d771b972a 100644 --- a/java/src/org/futo/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/java/src/org/futo/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -94,280 +94,280 @@ public final class KeyboardTextsTable { "morekeys_misc_u", "morekeys_misc_e", "morekeys_n", - "morekeys_z", "morekeys_misc_i", - "morekeys_misc_s", + "morekeys_z", "morekeys_misc_c", + "morekeys_misc_s", "double_angle_quotes", "single_angle_quotes", "morekeys_y", + "morekeys_misc_z", + "additional_morekeys_symbols_9", + "keyspec_symbols_9", + "morekeys_g", "additional_morekeys_symbols_3", "additional_morekeys_symbols_2", - "additional_morekeys_symbols_8", - "keyspec_symbols_3", - "keyspec_symbols_5", - "morekeys_d", - "keyspec_symbols_9", - "keyspec_symbols_8", - "additional_morekeys_symbols_4", "keyspec_symbols_0", - "keyspec_symbols_6", - "keyspec_symbols_4", + "additional_morekeys_symbols_7", + "additional_morekeys_symbols_0", + "additional_morekeys_symbols_8", + "keyspec_symbols_8", + "additional_morekeys_symbols_6", + "keyspec_symbols_3", "keyspec_symbols_2", "keyspec_symbols_7", - "morekeys_g", - "keyspec_symbols_1", - "morekeys_misc_z", - "additional_morekeys_symbols_6", - "additional_morekeys_symbols_5", - "additional_morekeys_symbols_0", - "additional_morekeys_symbols_9", - "additional_morekeys_symbols_7", + "keyspec_symbols_4", + "keyspec_symbols_6", "additional_morekeys_symbols_1", + "keyspec_symbols_5", + "additional_morekeys_symbols_4", + "additional_morekeys_symbols_5", + "morekeys_d", + "keyspec_symbols_1", + "keylabel_to_symbol", "morekeys_tablet_period", "morekeys_cyrillic_ie", - "keylabel_to_symbol", - "keyspec_east_slavic_row3_5", - "keyspec_nordic_row1_11", - "keyspec_east_slavic_row2_2", - "morekeys_t", "morekeys_period", - "keyspec_nordic_row2_11", - "keyspec_nordic_row2_10", - "keyspec_east_slavic_row2_11", + "keyspec_east_slavic_row3_5", + "keyspec_east_slavic_row2_2", "keyspec_tablet_comma", + "morekeys_t", "morekeys_nordic_row2_10", - "morekeys_cyrillic_soft_sign", + "keyspec_nordic_row2_11", "keyspec_east_slavic_row1_9", - "keyspec_period", "morekeys_misc_n", - "keyspec_less_than", - "morekeys_l", + "morekeys_cyrillic_soft_sign", + "keyspec_nordic_row2_10", + "keyspec_nordic_row1_11", + "keyspec_east_slavic_row2_11", + "keyspec_period", "morekeys_r", + "keyspec_left_parenthesis", + "keyspec_comma", + "morekeys_punctuation", + "morekeys_star", + "keyspec_less_than", + "keyspec_greater_than_equal", + "keyspec_right_square_bracket", + "morekeys_question", + "keyspec_right_parenthesis", + "keyspec_right_curly_bracket", + "keyspec_left_double_angle_quote", + "morekeys_l", + "morekeys_tablet_comma", + "keyhintlabel_period", + "keyspec_left_curly_bracket", + "keyspec_tablet_period", + "keyspec_right_single_angle_quote", + "morekeys_nordic_row2_11", + "keyspec_left_single_angle_quote", + "keyspec_greater_than", "keyspec_right_double_angle_quote", "keyspec_less_than_equal", - "morekeys_punctuation", - "keyspec_left_curly_bracket", - "keyspec_comma", - "morekeys_question", - "keyspec_left_double_angle_quote", - "keyspec_left_parenthesis", - "morekeys_nordic_row2_11", - "keyspec_greater_than", - "morekeys_tablet_comma", - "keyspec_right_square_bracket", - "morekeys_star", - "keyspec_left_single_angle_quote", - "keyspec_tablet_period", - "keyspec_right_parenthesis", - "keyspec_greater_than_equal", "keyspec_left_square_bracket", - "keyhintlabel_period", - "keyspec_right_single_angle_quote", - "keyspec_right_curly_bracket", - "keyhintlabel_tablet_period", - "keyspec_spanish_row2_10", - "morekeys_misc_y", - "morekeys_symbols_percent", - "morekeys_bullet", "keyspec_symbols_percent", - "keyhintlabel_tablet_comma", - "morekeys_right_parenthesis", - "keyspec_symbols_question", - "morekeys_symbols_semicolon", - "keyspec_swiss_row1_11", - "keyspec_symbols_semicolon", - "morekeys_swiss_row2_10", - "morekeys_arabic_diacritics", - "keyspec_swiss_row2_10", - "keyspec_swiss_row2_11", + "morekeys_misc_y", + "keyspec_spanish_row2_10", "morekeys_left_parenthesis", - "morekeys_swiss_row1_11", "morekeys_swiss_row2_11", - "morekeys_cyrillic_i", - "label_wait_key", - "morekeys_cyrillic_ghe", - "morekeys_cyrillic_en", + "keyspec_swiss_row1_11", + "morekeys_right_parenthesis", + "keyspec_swiss_row2_11", + "morekeys_swiss_row1_11", + "keyspec_symbols_question", + "keyhintlabel_tablet_period", + "keyhintlabel_tablet_comma", + "morekeys_symbols_percent", + "keyspec_swiss_row2_10", + "morekeys_bullet", + "morekeys_symbols_semicolon", + "keyspec_symbols_semicolon", + "morekeys_arabic_diacritics", + "morekeys_swiss_row2_10", "morekeys_cyrillic_u", - "keyspec_south_slavic_row3_1", - "keyspec_south_slavic_row3_8", - "label_search_key", - "morekeys_h", - "keyspec_south_slavic_row1_6", - "morekeys_misc_g", - "label_next_key", - "keyspec_south_slavic_row2_11", - "morekeys_k", + "label_pause_key", "morekeys_east_slavic_row2_2", "label_done_key", - "label_go_key", - "morekeys_tablet_punctuation", "morekeys_misc_l", - "morekeys_misc_r", - "label_pause_key", - "morekeys_cyrillic_o", + "label_wait_key", "label_send_key", + "morekeys_h", + "keyspec_south_slavic_row3_1", + "label_go_key", + "keyspec_south_slavic_row2_11", + "morekeys_k", "label_previous_key", - "morekeys_misc_h", - "morekeys_less_than", - "keyspec_y", - "keyspec_w", - "morekeys_currency_dollar", + "morekeys_cyrillic_i", + "keyspec_south_slavic_row3_8", + "morekeys_cyrillic_ghe", + "morekeys_misc_g", + "morekeys_cyrillic_en", + "label_search_key", + "keyspec_south_slavic_row1_6", + "morekeys_misc_r", + "morekeys_cyrillic_o", + "morekeys_tablet_punctuation", + "label_next_key", "morekeys_j", - "morekeys_plus", - "morekeys_east_slavic_row2_11", - "keyspec_x", + "morekeys_less_than", + "morekeys_w", "keyspec_q", "morekeys_cyrillic_a", - "morekeys_cyrillic_ka", - "morekeys_misc_t", - "morekeys_w", + "morekeys_misc_h", + "keyspec_y", "morekeys_greater_than", + "keyspec_w", + "morekeys_misc_t", + "morekeys_currency_dollar", + "morekeys_cyrillic_ka", + "morekeys_east_slavic_row2_11", + "keyspec_x", + "morekeys_plus", "morekeys_exclamation", - "number_1", - "qwertysyms_s", - "morekeys_p", - "actions_2", - "morekeys_f", - "morekeys_misc_j", - "actions_w", - "morekeys_symbols_6", - "qwertysyms_c", "qwertysyms_4", - "qwertysyms_u", - "qwertysyms_g", - "morekeys_am_pm", - "morekeys_x", "qwertysyms_w", - "morekeys_misc_k", - "actions_8", - "morekeys_misc_f", - "qwertysyms_a", - "actions_k", - "actions_o", - "actions_d", - "number_7", - "morekeys_misc_v", - "morekeys_misc_q", - "morekeys_misc_d", - "single_9qm_rqm", - "qwertysyms_h", - "actions_9", - "double_9qm_rqm", - "actions_a", - "actions_i", - "morekeys_double_quote", - "number_9", - "actions_e", - "number_0", - "actions_j", - "morekeys_currency_generic", - "actions_7", - "actions_z", - "qwertysyms_j", - "morekeys_v", - "qwertysyms_i", - "keylabel_to_phone_symbols", - "keyspec_emoji_action_key_navigation", - "qwertysyms_n", - "keyspecs_right_parenthesis_more_keys", - "qwertysyms_1", - "actions_u", - "actions_n", - "qwertysyms_d", - "morekeys_symbols_2", - "morekeys_symbols_5", - "morekeys_symbols_9", - "morekeys_misc_m", - "qwertysyms_f", - "single_9qm_lqm", - "qwertysyms_q", - "actions_l", - "actions_6", - "double_9qm_lqm", - "keylabel_tablet_to_more_symbol", - "qwertysyms_2", - "morekeys_symbols_7", - "qwertysyms_x", - "morekeys_m", - "morekeys_misc_p", - "morekeys_single_quote", - "actions_4", - "number_4", - "actions_y", - "double_lqm_rqm", - "qwertysyms_9", - "morekeys_misc_w", - "morekeys_symbols_0", - "double_raqm_laqm", - "actions_m", - "morekeys_misc_x", - "qwertysyms_3", - "actions_1", - "actions_r", - "qwertysyms_0", - "number_3", - "actions_s", - "morekeys_symbols_8", - "actions_t", - "morekeys_q", - "actions_c", - "qwertysyms_e", - "actions_b", - "actions_h", - "number_5", - "single_rqm_9qm", - "keyspecs_left_parenthesis_more_keys", - "keylabel_time_pm", - "qwertysyms_l", - "morekeys_symbols_4", - "morekeys_bottomrow_comma", - "qwertysyms_t", - "actions_f", - "keyspec_settings", - "qwertysyms_8", - "actions_5", - "double_rqm_9qm", - "keylabel_to_phone_numeric", - "qwertysyms_r", - "qwertysyms_y", - "qwertysyms_z", - "keyspec_action_next", - "qwertysyms_b", - "keylabel_time_am", - "number_6", - "actions_v", - "actions_q", - "number_8", - "single_raqm_laqm", - "morekeys_symbols_3", - "number_2", - "morekeys_popular_domain", - "qwertysyms_7", - "qwertysyms_k", - "keyspec_emoji_action_key", - "actions_x", "qwertysyms_6", - "qwertysyms_p", - "qwertysyms_v", - "actions_g", - "single_lqm_rqm", - "keyspec_popular_domain", - "keyspec_shortcut", + "number_1", + "qwertysyms_l", + "double_9qm_rqm", "actions_p", - "qwertysyms_5", - "qwertysyms_o", - "actions_0", - "morekeys_symbols_1", - "double_laqm_raqm", - "morekeys_misc_b", - "morekeys_tablet_double_quote", + "number_2", + "actions_i", + "actions_b", "keylabel_to_more_symbol", + "qwertysyms_b", + "actions_2", + "morekeys_double_quote", + "qwertysyms_f", + "actions_5", + "morekeys_misc_d", + "qwertysyms_i", + "morekeys_f", + "morekeys_m", + "morekeys_misc_j", + "morekeys_misc_b", + "morekeys_misc_q", + "morekeys_misc_x", + "qwertysyms_c", + "morekeys_misc_p", + "keyspec_popular_domain", + "morekeys_misc_m", + "qwertysyms_q", + "actions_j", + "double_rqm_9qm", + "actions_8", + "keylabel_tablet_to_more_symbol", + "single_rqm_9qm", + "number_9", + "actions_d", + "actions_x", + "morekeys_tablet_double_quote", + "morekeys_q", + "double_9qm_lqm", + "qwertysyms_3", + "morekeys_single_quote", + "morekeys_v", + "morekeys_symbols_4", + "morekeys_symbols_1", + "qwertysyms_8", + "keyspecs_left_parenthesis_more_keys", + "actions_4", + "number_6", + "qwertysyms_s", + "qwertysyms_x", + "number_7", + "keyspec_action_next", + "actions_l", + "morekeys_x", + "morekeys_symbols_0", + "qwertysyms_7", + "actions_7", + "actions_s", + "qwertysyms_2", + "actions_w", + "actions_f", + "single_raqm_laqm", + "morekeys_symbols_6", + "qwertysyms_1", + "qwertysyms_p", + "morekeys_currency_generic", + "qwertysyms_j", + "morekeys_symbols_8", + "keyspec_settings", + "qwertysyms_y", + "qwertysyms_h", + "qwertysyms_5", + "qwertysyms_t", + "qwertysyms_9", + "double_laqm_raqm", + "double_lqm_rqm", + "morekeys_symbols_7", + "qwertysyms_u", + "actions_1", + "single_9qm_rqm", + "actions_m", + "actions_r", + "single_lqm_rqm", + "qwertysyms_a", + "keylabel_time_am", + "morekeys_symbols_3", + "actions_v", + "actions_h", + "qwertysyms_0", + "morekeys_symbols_9", + "actions_6", + "actions_q", + "morekeys_p", "morekeys_b", - "qwertysyms_m", + "actions_a", + "actions_c", + "morekeys_am_pm", + "actions_u", + "qwertysyms_e", + "actions_t", + "single_9qm_lqm", + "keyspec_emoji_action_key", + "number_8", + "actions_0", + "morekeys_symbols_2", "single_laqm_raqm", + "morekeys_bottomrow_comma", + "number_3", + "qwertysyms_o", + "actions_n", + "morekeys_misc_w", + "number_5", + "qwertysyms_r", + "actions_k", + "actions_9", + "keylabel_time_pm", + "actions_e", + "actions_y", + "qwertysyms_g", "actions_3", - "keyspec_action_previous" + "actions_o", + "keyspec_emoji_action_key_navigation", + "morekeys_misc_v", + "actions_g", + "qwertysyms_v", + "qwertysyms_m", + "actions_z", + "keyspecs_right_parenthesis_more_keys", + "number_0", + "keyspec_action_previous", + "double_raqm_laqm", + "morekeys_symbols_5", + "keyspec_shortcut", + "number_4", + "morekeys_misc_f", + "keylabel_to_phone_symbols", + "qwertysyms_z", + "qwertysyms_n", + "morekeys_misc_k", + "qwertysyms_k", + "qwertysyms_d", + "keylabel_to_phone_numeric", + "morekeys_popular_domain" }; private static final String EMPTY = ""; @@ -390,7 +390,6 @@ public final class KeyboardTextsTable { "\u00fc,\u00f9,\u016b", "\u0119,\u0117,\u0113", null, - null, "\u012f,\u012b,\u0133" }; @@ -419,38 +418,33 @@ public final class KeyboardTextsTable { null, null, null, + null, + "9", + "\u0669", + null, "3", "2", - "8", - "\u0663", - "\u0665", - null, - "\u0669", - "\u0668", - "4", "\u0660", - "\u0666", - "\u0664", + "7", + "0,\u066b,\u066c", + "8", + "\u0668", + "6", + "\u0663", "\u0662", "\u0667", + "\u0664", + "\u0666", + "1", + "\u0665", + "4", + "5", null, "\u0661", - null, - "6", - "5", - "0,\u066b,\u066c", - "9", - "7", - "1", - "!text/morekeys_arabic_diacritics", - null, "\u0663\u0662\u0661\u061f", - null, - null, - null, - null, "!text/morekeys_arabic_diacritics", null, + "!text/morekeys_arabic_diacritics", null, null, "\u060c", @@ -459,47 +453,53 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, + null, + "(|)", + "\u060c", + null, + "\u2605,\u066d", "<|>", + "\u2265|\u2264", + "]|[", + "?,\u00bf", + ")|(", + "}|{", + "\u00ab|\u00bb", null, + "!fixedColumnOrder!4,:,!,\u061f,\u061b,-,\\\",\\'", + "\u0651", + "{|}", null, + "\u203a|\u2039", + null, + "\u2039|\u203a", + ">|<", "\u00bb|\u00ab", "\u2264|\u2265", - null, - "{|}", - "\u060c", - "?,\u00bf", - "\u00ab|\u00bb", - "(|)", - null, - ">|<", - "!fixedColumnOrder!4,:,!,\u061f,\u061b,-,\\\",\\'", - "]|[", - "\u2605,\u066d", - "\u2039|\u203a", - null, - ")|(", - "\u2265|\u2264", "[|]", - "\u0651", - "\u203a|\u2039", - "}|{", - "\u0651", - null, - null, - "\\%,\u2030", - "\u266a", "\u066a", - "\u061f", + null, + null, + "!fixedColumnOrder!4,\ufd3e|\ufd3f,!text/keyspecs_left_parenthesis_more_keys", + null, + null, "!fixedColumnOrder!4,\ufd3f|\ufd3e,!text/keyspecs_right_parenthesis_more_keys", + null, + null, "\u061f", + "\u0651", + "\u061f", + "\\%,\u2030", + null, + "\u266a", ";", - null, "\u061b", - null, - "!fixedColumnOrder!8, \u0654\u25cc|\u0654, \u0652\u25cc|\u0652, \u064d\u25cc|\u064d, \u064c\u25cc|\u064c, \u0651\u25cc|\u0651, \u064b\u25cc|\u064b,!text/keyspec_symbols_question,!, \u0656\u25cc|\u0656, \u0670\u25cc|\u0670, \u0653\u25cc|\u0653, \u0650\u25cc|\u0650, \u064f\u25cc|\u064f,\u0640, \u0655\u25cc|\u0655, \u064e\u25cc|\u064e", - null, - null, - "!fixedColumnOrder!4,\ufd3e|\ufd3f,!text/keyspecs_left_parenthesis_more_keys" + "!fixedColumnOrder!8, \u0654\u25cc|\u0654, \u0652\u25cc|\u0652, \u064d\u25cc|\u064d, \u064c\u25cc|\u064c, \u0651\u25cc|\u0651, \u064b\u25cc|\u064b,!text/keyspec_symbols_question,!, \u0656\u25cc|\u0656, \u0670\u25cc|\u0670, \u0653\u25cc|\u0653, \u0650\u25cc|\u0650, \u064f\u25cc|\u064f,\u0640, \u0655\u25cc|\u0655, \u064e\u25cc|\u064e" }; private static final String[] TEXTS_az = { @@ -520,27 +520,16 @@ public final class KeyboardTextsTable { null, null, "\u0148,\u00f1", + null, "\u017e", null, null, null, null, - null, "\u00fd", null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u011f" }; @@ -593,20 +582,21 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u0451", null, "\u0456", - null, "\u044b", null, null, null, null, - "\u044d", - null, + "\u045e", null, "\u044a", - "\u045e" + null, + null, + "\u044d" }; private static final String[] TEXTS_bg = { @@ -645,29 +635,29 @@ public final class KeyboardTextsTable { null, null, null, + null, + "9", + "\u09ef", + null, "3", "2", - "8", - "\u09e9", - "\u09eb", - null, - "\u09ef", - "\u09ee", - "4", "\u09e6", - "\u09ec", - "\u09ea", + "7", + "0", + "8", + "\u09ee", + "6", + "\u09e9", "\u09e8", "\u09ed", - null, - "\u09e7", - null, - "6", + "\u09ea", + "\u09ec", + "1", + "\u09eb", + "4", "5", - "0", - "9", - "7", - "1" + null, + "\u09e7" }; private static final String[] TEXTS_bn_IN = { @@ -702,7 +692,6 @@ public final class KeyboardTextsTable { "\u00f9,\u00fb,\u016b", "\u00eb,\u00ea,\u0119,\u0117,\u0113", null, - null, "\u00ec,\u00ee,\u012f,\u012b", null, "\u0107,\u010d", @@ -753,7 +742,6 @@ public final class KeyboardTextsTable { null, null, null, - null, "!autoColumnOrder!9,\\\\,?,!,\u00b7,#,),(,/,;,',@,:,-,\\\",+,\\%,&", null, null, @@ -774,6 +762,9 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, "\u00e7", null, null, @@ -809,6 +800,10 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, "!autoColumnOrder!8,\\\\,',\u00b7,#,),(,/,;,@,:,-,\\\",+,\\%,&" }; @@ -837,87 +832,88 @@ public final class KeyboardTextsTable { null, null, null, + null, + "9", + "\u0669", + null, "3", "2", - "8", - "\u0663", - "\u0665", - null, - "\u0669", - "\u0668", - "4", "\u0660", - "\u0666", - "\u0664", + "7", + "0,\u066b,\u066c", + "8", + "\u0668", + "6", + "\u0663", "\u0662", "\u0667", + "\u0664", + "\u0666", + "1", + "\u0665", + "4", + "5", null, "\u0661", - null, - "6", - "5", - "0,\u066b,\u066c", - "9", - "7", - "1", - "\u061f", - null, "\u0663\u0662\u0661\u061f", - null, - null, - null, - null, "\u061f", null, + "\u061f", null, null, "\u060c", null, null, null, + null, + null, + null, + null, + null, + null, ".", null, + "(|)", + "\u060c", + null, + "\u2605,\u066d", "<|>", + "\u2265|\u2264", + "]|[", + "?,\u00bf", + ")|(", + "}|{", + "\u00ab|\u00bb", null, + "!fixedColumnOrder!4,:,!,\u061f,\u061b,-,\\\",\\'", + "\u0651", + "{|}", null, + "\u203a|\u2039", + null, + "\u2039|\u203a", + ">|<", "\u00bb|\u00ab", "\u2264|\u2265", - null, - "{|}", - "\u060c", - "?,\u00bf", - "\u00ab|\u00bb", - "(|)", - null, - ">|<", - "!fixedColumnOrder!4,:,!,\u061f,\u061b,-,\\\",\\'", - "]|[", - "\u2605,\u066d", - "\u2039|\u203a", - null, - ")|(", - "\u2265|\u2264", "[|]", - "\u0651", - "\u203a|\u2039", - "}|{", - "\u0651", - null, - null, - "\\%,\u2030", - "\u266a", "\u066a", - "\u061f", + null, + null, + "!fixedColumnOrder!4,\ufd3e|\ufd3f,!text/keyspecs_left_parenthesis_more_keys", + null, + null, "!fixedColumnOrder!4,\ufd3f|\ufd3e,!text/keyspecs_right_parenthesis_more_keys", + null, + null, "\u061f", + "\u0651", + "\u061f", + "\\%,\u2030", + null, + "\u266a", ";", - null, "\u061b", - null, - "!fixedColumnOrder!7, \u0655\u25cc|\u0655, \u0654\u25cc|\u0654, \u0652\u25cc|\u0652, \u064d\u25cc|\u064d, \u064c\u25cc|\u064c, \u064b\u25cc|\u064b, \u0651\u25cc|\u0651, \u0656\u25cc|\u0656, \u0670\u25cc|\u0670, \u0653\u25cc|\u0653, \u0650\u25cc|\u0650, \u064f\u25cc|\u064f, \u064e\u25cc|\u064e,\u0640|\u0640", - null, - null, - "!fixedColumnOrder!4,\ufd3e|\ufd3f,!text/keyspecs_left_parenthesis_more_keys" + "!fixedColumnOrder!7, \u0655\u25cc|\u0655, \u0654\u25cc|\u0654, \u0652\u25cc|\u0652, \u064d\u25cc|\u064d, \u064c\u25cc|\u064c, \u064b\u25cc|\u064b, \u0651\u25cc|\u0651, \u0656\u25cc|\u0656, \u0670\u25cc|\u0670, \u0653\u25cc|\u0653, \u0650\u25cc|\u0650, \u064f\u25cc|\u064f, \u064e\u25cc|\u064e,\u0640|\u0640" }; private static final String[] TEXTS_cs = { @@ -938,13 +934,29 @@ public final class KeyboardTextsTable { "\u00fb,\u00fc,\u00f9,\u016b", "\u00e8,\u00ea,\u00eb,\u0119,\u0117,\u0113", "\u0148", - "\u017e", "\u00ee,\u00ef,\u00ec,\u012f,\u012b", - "\u00df,\u015b", + "\u017e", "\u00e7,\u0107", + "\u00df,\u015b", "!text/double_raqm_laqm", "!text/single_raqm_laqm", "\u00fd", + "\u017a,\u017c", + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, null, null, null, @@ -959,34 +971,16 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - "\u017a,\u017c", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u0165", null, null, null, - null, - null, - null, - null, - null, - null, "\u00f1,\u0144", null, null, + null, + null, + null, "\u0159", null, null, @@ -1011,6 +1005,7 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u00ff" }; @@ -1066,15 +1061,22 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + "\u00e4", + "\u00f8", + null, + null, + null, + "\u00e6", "\u00e5", null, null, null, - "\u00f8", - "\u00e6", null, null, - "\u00e4", null, null, null, @@ -1113,8 +1115,8 @@ public final class KeyboardTextsTable { null, null, null, - "\u015b,\u0161", null, + "\u015b,\u0161", "!text/double_raqm_laqm", "!text/single_raqm_laqm", null, @@ -1186,21 +1188,21 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, - null, + "\u00e0", "\u00fc", null, - "\u00e9", + "\u00e4", + "\u00e8", + null, + null, + null, null, "\u00f6", - "\u00e4", null, - "\u00e8", - "\u00e0" + null, + null, + null, + "\u00e9" }; private static final String[] TEXTS_el = { @@ -1232,19 +1234,8 @@ public final class KeyboardTextsTable { null, null, null, - "\u00df,\u0161,\u015b,\u0219,\u015f", "\u0107,\u010d,\u00e7,\u010b", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, + "\u00df,\u0161,\u015b,\u0219,\u015f", null, null, null, @@ -1302,6 +1293,18 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, "\u0135", null, null, @@ -1326,10 +1329,15 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, "\u0125", null, + null, + null, + null, + null, + null, + null, + null, "\u011f,\u0121,\u0123", null, null, @@ -1341,19 +1349,17 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, + "\u015d", null, "\u0127", - null, "\u016d", + null, "\u011d", null, null, null, null, - "\u0109", - "\u015d" + "\u0109" }; private static final String[] TEXTS_es = { @@ -1374,7 +1380,6 @@ public final class KeyboardTextsTable { "\u00f9,\u00fb,\u016b", "\u00e8,\u00eb,\u00ea,\u0119,\u0117,\u0113", "\u00f1", - null, "\u00ef,\u00ec,\u00ee,\u012f,\u012b", null, null, @@ -1416,16 +1421,15 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, "\u0144", null, null, null, null, null, + null, + null, + null, "!autoColumnOrder!9,\\\\,?,!,#,),(,/,;,\u00a1,',@,:,-,\\\",+,\\%,&,\u00bf" }; @@ -1447,29 +1451,13 @@ public final class KeyboardTextsTable { "\u016b,\u0173,\u00f9,\u00fa,\u00fb,\u016f,\u0171", null, null, + null, "\u017e", null, "\u00df,\u015b,\u015f", null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u017c,\u017a", null, null, @@ -1481,15 +1469,33 @@ public final class KeyboardTextsTable { null, null, null, - "\u00fc", null, null, null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + "\u00f5", "\u00e4", + null, + null, + null, "\u00f6", - null, - null, - "\u00f5" + "\u00fc" }; private static final String[] TEXTS_eu = { @@ -1537,38 +1543,33 @@ public final class KeyboardTextsTable { null, null, null, + null, + "9", + "\u06f9", + null, "3", "2", - "8", - "\u06f3", - "\u06f5", - null, - "\u06f9", - "\u06f8", - "4", "\u06f0", - "\u06f6", - "\u06f4", + "7", + "0,\u066b,\u066c", + "8", + "\u06f8", + "6", + "\u06f3", "\u06f2", "\u06f7", + "\u06f4", + "\u06f6", + "1", + "\u06f5", + "4", + "5", null, "\u06f1", - null, - "6", - "5", - "0,\u066b,\u066c", - "9", - "7", - "1", - "!text/morekeys_arabic_diacritics", - null, "\u06f3\u06f2\u06f1\u061f", - null, - null, - null, - null, "!text/morekeys_arabic_diacritics", null, + "!text/morekeys_arabic_diacritics", null, null, "\u060c", @@ -1577,49 +1578,54 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, + null, + "(|)", + "\u060c", + null, + "\u2605,\u066d", "<|>", + "\u2265|\u2264", + "]|[", + "?,\u00bf", + ")|(", + "}|{", + "\u00ab|\u00bb", null, + "!fixedColumnOrder!4,:,!,\u061f,\u061b,-,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", + "\u064b", + "{|}", null, + "\u203a|\u2039", + null, + "\u2039|\u203a", + ">|<", "\u00bb|\u00ab", "\u2264|\u2265", - null, - "{|}", - "\u060c", - "?,\u00bf", - "\u00ab|\u00bb", - "(|)", - null, - ">|<", - "!fixedColumnOrder!4,:,!,\u061f,\u061b,-,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", - "]|[", - "\u2605,\u066d", - "\u2039|\u203a", - null, - ")|(", - "\u2265|\u2264", "[|]", - "\u064b", - "\u203a|\u2039", - "}|{", - "\u064b", - null, - null, - "\\%,\u2030", - "\u266a", "\u066a", - "\u061f", - "!fixedColumnOrder!4,\ufd3f|\ufd3e,!text/keyspecs_right_parenthesis_more_keys", - "\u061f", - ";", - null, - "\u061b", - null, - "!fixedColumnOrder!8, \u0654\u25cc|\u0654, \u0652\u25cc|\u0652, \u064d\u25cc|\u064d, \u064c\u25cc|\u064c, \u0651\u25cc|\u0651, \u064b\u25cc|\u064b,!text/keyspec_symbols_question,!, \u0656\u25cc|\u0656, \u0670\u25cc|\u0670, \u0653\u25cc|\u0653, \u0650\u25cc|\u0650, \u064f\u25cc|\u064f,\u0640, \u0655\u25cc|\u0655, \u064e\u25cc|\u064e", null, null, "!fixedColumnOrder!4,\ufd3e|\ufd3f,!text/keyspecs_left_parenthesis_more_keys", null, null, + "!fixedColumnOrder!4,\ufd3f|\ufd3e,!text/keyspecs_right_parenthesis_more_keys", + null, + null, + "\u061f", + "\u064b", + "\u061f", + "\\%,\u2030", + null, + "\u266a", + ";", + "\u061b", + "!fixedColumnOrder!8, \u0654\u25cc|\u0654, \u0652\u25cc|\u0652, \u064d\u25cc|\u064d, \u064c\u25cc|\u064c, \u0651\u25cc|\u0651, \u064b\u25cc|\u064b,!text/keyspec_symbols_question,!, \u0656\u25cc|\u0656, \u0670\u25cc|\u0670, \u0653\u25cc|\u0653, \u0650\u25cc|\u0650, \u064f\u25cc|\u064f,\u0640, \u0655\u25cc|\u0655, \u064e\u25cc|\u064e", + null, null, null, null, @@ -1651,13 +1657,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, - null, - null, "!fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_greater_than" }; @@ -1679,29 +1678,13 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u017e", null, "\u00df,\u015b", null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u017a,\u017c", null, null, @@ -1713,15 +1696,38 @@ 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, + "\u00f8", + "\u00e4", + null, + null, + null, + "\u00f6", "\u00e5", null, null, null, - "\u00e4", - "\u00f6", null, null, - "\u00f8", null, null, null, @@ -1758,12 +1764,12 @@ public final class KeyboardTextsTable { "\u00fa,\u016b", "%,\u0119,\u0117,\u0113", null, - null, "\u00ec,\u00ed,\u012f,\u012b", null, "%,\u0107,\u010d", null, null, + null, "%,\u00ff", null, null, @@ -1833,21 +1839,21 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, - null, + "\u00e4", "\u00e8", null, - "\u00f6", + "\u00e0", + "\u00fc", + null, + null, + null, null, "\u00e9", - "\u00e0", null, - "\u00fc", - "\u00e4" + null, + null, + null, + "\u00f6" }; private static final String[] TEXTS_gl = { @@ -1895,35 +1901,31 @@ public final class KeyboardTextsTable { null, null, null, + null, + "9", + "\u096f", + null, "3", "2", - "8", - "\u0969", - "\u096b", - null, - "\u096f", - "\u096e", - "4", "\u0966", - "\u096c", - "\u096a", + "7", + "0", + "8", + "\u096e", + "6", + "\u0969", "\u0968", "\u096d", + "\u096a", + "\u096c", + "1", + "\u096b", + "4", + "5", null, "\u0967", - null, - "6", - "5", - "0", - "9", - "7", - "1", - "!autoColumnOrder!8,\\\\,.,',#,),(,/,;,@,:,-,\\\",+,\\%,&", - null, "?\u0967\u0968\u0969", - null, - null, - null, + "!autoColumnOrder!8,\\\\,.,',#,),(,/,;,@,:,-,\\\",+,\\%,&", null, "!autoColumnOrder!9,\\\\,.,?,!,#,),(,/,;,',@,:,-,\\\",+,\\%,&", null, @@ -1933,6 +1935,11 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, "\u0964", null, null, @@ -1950,8 +1957,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, "\u0964" }; @@ -2064,7 +2069,18 @@ public final class KeyboardTextsTable { null, null, null, + "Pause", + null, + "Done", + null, "Wait", + "Send", + null, + null, + "Go", + null, + null, + "Prev", null, null, null, @@ -2074,19 +2090,8 @@ public final class KeyboardTextsTable { null, null, null, - "Next", null, - null, - null, - "Done", - "Go", - null, - null, - null, - "Pause", - null, - "Send", - "Prev" + "Next" }; private static final String[] TEXTS_hr = { @@ -2107,19 +2112,14 @@ public final class KeyboardTextsTable { null, null, null, - "\u017e", null, - "\u015b,\u00df", + "\u017e", "\u00e7", + "\u015b,\u00df", "!text/double_raqm_laqm", "!text/single_raqm_laqm", null, - null, - null, - null, - null, - null, - "\u0111", + "\u017a,\u017c", null, null, null, @@ -2130,7 +2130,17 @@ public final class KeyboardTextsTable { null, null, null, - "\u017a,\u017c" + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + "\u0111" }; private static final String[] TEXTS_hu = { @@ -2151,10 +2161,10 @@ public final class KeyboardTextsTable { "\u00fb,\u00f9,\u016b", "\u00e8,\u00ea,\u00eb,\u0119,\u0117,\u0113", null, - null, "\u00ee,\u00ef,\u00ec,\u012f,\u012b", null, null, + null, "!text/double_raqm_laqm", "!text/single_raqm_laqm" }; @@ -2207,31 +2217,31 @@ public final class KeyboardTextsTable { null, null, null, + null, "!text/morekeys_punctuation", null, null, null, null, - null, - null, - null, - null, - null, - null, "\u055d", null, null, null, + null, + null, + null, + null, + null, + null, "\u0589", null, null, - null, - null, - null, - null, + "\u055d", "!autoColumnOrder!8,\\,,\u055e,\u055c,.,\u055a,\u0559,?,!,\u055d,\u055b,\u058a,\u00bb,\u00ab,\u055f,;,:", null, - "\u055d", + null, + null, + null, "\u055e,\u00bf", null, null, @@ -2240,7 +2250,6 @@ public final class KeyboardTextsTable { null, null, null, - null, "\u0589", null, null, @@ -2306,6 +2315,7 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u055c,\u00a1" }; @@ -2327,18 +2337,34 @@ public final class KeyboardTextsTable { "\u00fc,\u00fb,\u00f9,\u016b", "\u00eb,\u00e8,\u00ea,\u0119,\u0117,\u0113", null, - null, "\u00ef,\u00ee,\u00ec,\u012f,\u012b", null, null, null, null, + null, "\u00fd", null, null, null, null, null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, "\u00f0", null, null, @@ -2348,21 +2374,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u00fe", null, null, @@ -2398,8 +2409,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, "\u00ff" }; @@ -2421,7 +2430,6 @@ public final class KeyboardTextsTable { "\u00fa,\u00fb,\u00fc,\u016b", "\u00ea,\u00eb,\u0119,\u0117,\u0113", null, - null, "\u00ed,\u00ee,\u00ef,\u012f,\u012b", null, null, @@ -2497,20 +2505,21 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, + "\u00e0", "\u00fc", null, - "\u00e9", + "\u00e4", + "\u00e8", + null, + null, + null, null, "\u00f6", - "\u00e4", null, - "\u00e8", - "\u00e0" + null, + null, + null, + "\u00e9" }; private static final String[] TEXTS_iw = { @@ -2578,30 +2587,38 @@ public final class KeyboardTextsTable { null, null, null, + null, + "(|)", + null, + null, + "\u2605", "<|>", + "\u2265|\u2264", + "]|[", + null, + ")|(", + "}|{", + "\u00ab|\u00bb", null, null, - "\u00bb|\u00ab", - "\u2264|\u2265", null, "{|}", null, + "\u203a|\u2039", null, - "\u00ab|\u00bb", - "(|)", - null, - ">|<", - null, - "]|[", - "\u2605", "\u2039|\u203a", - null, - ")|(", - "\u2265|\u2264", + ">|<", + "\u00bb|\u00ab", + "\u2264|\u2265", "[|]", null, - "\u203a|\u2039", - "}|{", + null, + null, + null, + null, + null, + null, + null, null, null, null, @@ -2715,20 +2732,23 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u0451", null, "\u0438", - null, "\u044b", null, null, null, null, + "\u0449", + null, + "\u044a", + null, + null, "\u044d", null, null, - "\u044a", - "\u0449", null, null, null, @@ -2771,27 +2791,24 @@ public final class KeyboardTextsTable { null, null, null, + "\u04af,\u04b1", + null, + "\u0456", + null, + null, + null, + null, + null, + null, + null, null, null, null, null, null, "\u0493", + null, "\u04a3", - "\u04af,\u04b1", - null, - null, - null, - null, - null, - null, - null, - null, - null, - "\u0456", - null, - null, - null, null, null, null, @@ -2802,14 +2819,15 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - "\u04bb", - null, - null, "\u04d9", - "\u049b" + null, + null, + null, + null, + null, + null, + "\u049b", + "\u04bb" }; private static final String[] TEXTS_km = { @@ -2948,6 +2966,12 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, + null, "\u17db,\u00a2,\u00a3,\u20ac,\u00a5,\u20b1" }; @@ -3014,20 +3038,23 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u0451", null, "\u0438", - null, "\u044b", null, null, null, null, + "\u0449", + null, + "\u044a", + null, + null, "\u044d", null, null, - "\u044a", - "\u0449", null, null, null, @@ -3070,6 +3097,17 @@ public final class KeyboardTextsTable { null, null, null, + "\u04af", + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, null, null, null, @@ -3077,20 +3115,6 @@ public final class KeyboardTextsTable { null, null, "\u04a3", - "\u04af", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, null, null, null, @@ -3129,6 +3153,7 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u017e" }; @@ -3150,30 +3175,25 @@ public final class KeyboardTextsTable { "\u0173,\u00f9,\u00fa,\u00fb,\u00fc,\u016f,\u0171", "\u0117,\u00e8,\u00e9,\u00ea,\u00eb,\u0119,\u011b", "\u0146", - "\u017e", "\u012f,\u00ec,\u00ed,\u00ee,\u00ef,\u0131", - "\u00df,\u015b,\u015f", + "\u017e", "\u00e7,\u0107", + "\u00df,\u015b,\u015f", null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, + "\u017c,\u017a", null, null, "\u0123", null, - "\u017c,\u017a", + null, + null, + null, + null, + null, + null, + null, null, null, null, @@ -3198,7 +3218,10 @@ public final class KeyboardTextsTable { null, "\u00f1,\u0144", null, - "\u013c", + null, + null, + null, + null, "\u0157", null, null, @@ -3211,6 +3234,7 @@ public final class KeyboardTextsTable { null, null, null, + "\u013c", null, null, null, @@ -3245,20 +3269,22 @@ public final class KeyboardTextsTable { null, null, null, + "\u0142,\u013a,\u013e", null, null, null, null, null, - "\u011f", - null, null, "\u0137", null, null, null, null, - "\u0142,\u013a,\u013e", + "\u011f", + null, + null, + null, "\u0159,\u0155" }; @@ -3311,6 +3337,7 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u0450", null, null, @@ -3370,19 +3397,25 @@ public final class KeyboardTextsTable { null, null, null, - "\u045d", + null, + null, + null, null, null, null, null, "\u0437", + null, + "\u045c", + null, + null, + "\u045d", "\u0453", null, null, - "\u0455", null, null, - "\u045c" + "\u0455" }; private static final String[] TEXTS_ml = { @@ -3438,31 +3471,29 @@ public final class KeyboardTextsTable { null, null, null, + null, + "9", + "\u096f", + null, "3", "2", - "8", - "\u0969", - "\u096b", - null, - "\u096f", - "\u096e", - "4", "\u0966", - "\u096c", - "\u096a", + "7", + "0", + "8", + "\u096e", + "6", + "\u0969", "\u0968", "\u096d", + "\u096a", + "\u096c", + "1", + "\u096b", + "4", + "5", null, "\u0967", - null, - "6", - "5", - "0", - "9", - "7", - "1", - null, - null, "?\u0967\u0968\u0969" }; @@ -3520,22 +3551,20 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, "\u104a", null, null, null, + null, + null, + null, + null, + null, + null, "\u104b", null, null, null, - null, - null, - null, "!autoColumnOrder!9,\u104a,.,?,!,#,),(,/,;,...,',@,:,-,\\\",+,\\%,&", null, null, @@ -3544,15 +3573,22 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, "\\", - null, - null, + "\u104a", null, "\u104b", null, null, null, - "\u104a", + null, + null, + null, + null, + null, + null, + null, null, null, null, @@ -3646,15 +3682,22 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + "\u00f6", + "\u00e6", + null, + null, + null, + "\u00f8", "\u00e5", null, null, null, - "\u00e6", - "\u00f8", null, null, - "\u00f6", null, null, null, @@ -3698,35 +3741,31 @@ public final class KeyboardTextsTable { null, null, null, + null, + "9", + "\u096f", + null, "3", "2", - "8", - "\u0969", - "\u096b", - null, - "\u096f", - "\u096e", - "4", "\u0966", - "\u096c", - "\u096a", + "7", + "0", + "8", + "\u096e", + "6", + "\u0969", "\u0968", "\u096d", + "\u096a", + "\u096c", + "1", + "\u096b", + "4", + "5", null, "\u0967", - null, - "6", - "5", - "0", - "9", - "7", - "1", - "!autoColumnOrder!8,.,\\\\,',#,),(,/,;,@,:,-,\\\",+,\\%,&", - null, "?\u0967\u0968\u0969", - null, - null, - null, + "!autoColumnOrder!8,.,\\\\,',#,),(,/,;,@,:,-,\\\",+,\\%,&", null, "!autoColumnOrder!9,.,\\\\,?,!,#,),(,/,;,',@,:,-,\\\",+,\\%,&", null, @@ -3736,6 +3775,11 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, "\u0964", null, null, @@ -3753,8 +3797,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, "\u0964" }; @@ -3795,26 +3837,10 @@ public final class KeyboardTextsTable { null, "\u00e8,\u00e9,\u00ea,\u00eb,\u0117,\u0113", "\u0144", + null, "\u017c,\u017a", - null, - "\u00df,\u0161", "\u00e7,\u010d", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, + "\u00df,\u0161", null, null, null, @@ -3841,8 +3867,35 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, "\u00f1", null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, "\u0142" }; @@ -3864,7 +3917,6 @@ public final class KeyboardTextsTable { "\u00f9,\u00fb,\u016b", "\u00e8,\u0119,\u0117,\u0113,\u00eb", null, - null, "\u00ee,\u00ec,\u00ef,\u012f,\u012b", null, "\u010d,\u0107", @@ -3936,6 +3988,8 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, "\u00e7" }; @@ -3964,8 +4018,9 @@ public final class KeyboardTextsTable { null, null, null, - null, "\u00ef,\u00ec,\u00ed,\u012f,\u012b", + null, + null, "\u00df,\u015b,\u0161", null, null, @@ -4052,20 +4107,21 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u0451", null, "\u0438", - null, "\u044b", null, null, null, null, - "\u044d", - null, + "\u0449", null, "\u044a", - "\u0449" + null, + null, + "\u044d" }; private static final String[] TEXTS_si = { @@ -4100,13 +4156,29 @@ public final class KeyboardTextsTable { "\u016f,\u00fc,\u016b,\u0173,\u00f9,\u00fb,\u0171", "\u011b,\u0113,\u0117,\u00e8,\u00ea,\u00eb,\u0119", "\u0148", - "\u017e", "\u012b,\u012f,\u00ec,\u00ee,\u00ef,\u0131", - "\u00df,\u015b,\u015f", + "\u017e", "\u00e7,\u0107", + "\u00df,\u015b,\u015f", "!text/double_raqm_laqm", "!text/single_raqm_laqm", "\u00fd", + "\u017c,\u017a", + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, null, null, null, @@ -4121,34 +4193,16 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - "\u017c,\u017a", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u0165", null, null, null, - null, - null, - null, - null, - null, - null, "\u0146,\u00f1,\u0144", null, - "\u013e,\u013a", + null, + null, + null, + null, "\u0155", null, null, @@ -4161,6 +4215,7 @@ public final class KeyboardTextsTable { null, null, null, + "\u013e,\u013a", null, null, null, @@ -4195,20 +4250,22 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u013c,\u0142", + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, "\u0159,\u0157", null, null, @@ -4222,10 +4279,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, "\u0163" }; @@ -4247,10 +4300,10 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u017e", - null, - null, "\u0107", + null, "!text/double_raqm_laqm", "!text/single_raqm_laqm" }; @@ -4304,6 +4357,7 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u0450", null, null, @@ -4363,19 +4417,25 @@ public final class KeyboardTextsTable { null, null, null, - "\u045d", + null, + null, + null, null, null, null, null, "\u0455", + null, + "\u045b", + null, + null, + "\u045d", "\u0452", null, null, - "\u0437", null, null, - "\u045b" + "\u0437" }; private static final String[] TEXTS_sr_ZZ = { @@ -4396,6 +4456,7 @@ public final class KeyboardTextsTable { null, null, null, + null, "\u017e,%", null, null, @@ -4408,6 +4469,21 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, "\u0111,%", null, null, @@ -4471,23 +4547,18 @@ public final class KeyboardTextsTable { null, null, null, + "Pauza", null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, + "Gotov", null, "\u010cekaj", + "\u0160alji", + null, + null, + "Idi", + null, + null, + "Preth", null, null, null, @@ -4497,19 +4568,8 @@ public final class KeyboardTextsTable { null, null, null, - "Sled", null, - null, - null, - "Gotov", - "Idi", - null, - null, - null, - "Pauza", - null, - "\u0160alji", - "Preth" + "Sled" }; private static final String[] TEXTS_sv = { @@ -4564,15 +4624,22 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + "\u00f8,\u0153", + "\u00e4", + null, + null, + null, + "\u00f6", "\u00e5", null, null, null, - "\u00e4", - "\u00f6", null, null, - "\u00f8,\u0153", null, null, null, @@ -4619,17 +4686,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "g\\'" }; @@ -4732,21 +4788,10 @@ public final class KeyboardTextsTable { "\u00fb,\u00f9,\u00fa,\u016b", null, null, - null, "\u00ee,\u00ef,\u00ec,\u00ed,\u012f,\u012b", - "\u00df,\u015b,\u0161", + null, "\u0107,\u010d", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, + "\u00df,\u015b,\u0161", null, null, null, @@ -4807,18 +4852,21 @@ public final class KeyboardTextsTable { null, null, null, - "\u0438", null, + "\u0438", "\u0456", null, null, null, null, + "\u0449", + null, + "\u044a", + null, + null, "\u0454", null, null, - "\u044a", - "\u0449", null, null, null, @@ -4863,10 +4911,7 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, - "\u0491", + "\u0457", null, null, null, @@ -4878,7 +4923,8 @@ public final class KeyboardTextsTable { null, null, null, - "\u0457" + null, + "\u0491" }; private static final String[] TEXTS_uz = { @@ -4899,27 +4945,16 @@ public final class KeyboardTextsTable { null, null, "\u0148,\u00f1", + null, "\u017e", null, null, null, null, - null, "\u00fd", null, null, null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, "\u011f" }; @@ -4953,6 +4988,22 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, "\u0111" }; @@ -4994,27 +5045,16 @@ public final class KeyboardTextsTable { null, null, "\u00f1,\u0144,\u0146,\u0148,\u0149,\u014b", + null, "\u017a,\u017c,\u017e", null, null, null, null, - null, "\u00fd,\u0177,\u00ff,\u0133", null, null, null, - null, - null, - "\u010f,\u0111,\u00f0", - null, - null, - null, - null, - null, - null, - null, - null, "\u011d,\u011f,\u0121,\u0123", null, null, @@ -5030,6 +5070,18 @@ public final class KeyboardTextsTable { null, null, null, + null, + null, + null, + "\u010f,\u0111,\u00f0", + null, + null, + null, + null, + null, + null, + null, + null, "\u00fe,\u0163,\u0165,\u0167", null, null, @@ -5040,9 +5092,6 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - "\u013a,\u013c,\u013e,\u0140,\u0142", "\u0155,\u0157,\u0159", null, null, @@ -5055,6 +5104,7 @@ public final class KeyboardTextsTable { null, null, null, + "\u013a,\u013c,\u013e,\u0140,\u0142", null, null, null, @@ -5096,7 +5146,6 @@ public final class KeyboardTextsTable { null, null, null, - null, "\u0137,\u0138", null, null, @@ -5110,17 +5159,8 @@ public final class KeyboardTextsTable { null, null, null, - null, - null, - null, "\u0135", null, - null, - null, - null, - null, - null, - null, "\u0175" }; @@ -5142,98 +5182,109 @@ public final class KeyboardTextsTable { "\u00fa,\u00fb,\u00fc,\u00f9,\u016b", "\u00e9,\u00e8,\u00ea,\u00eb,\u0113", EMPTY, - EMPTY, "\u00ed,\u00ee,\u00ef,\u012b,\u00ec", - "\u00df", + EMPTY, "\u00e7", + "\u00df", "!text/double_laqm_raqm", "!text/single_laqm_raqm", EMPTY, EMPTY, EMPTY, - EMPTY, - "3", - "5", - EMPTY, "9", - "8", + EMPTY, + EMPTY, EMPTY, "0", - "6", - "4", + EMPTY, + EMPTY, + EMPTY, + "8", + EMPTY, + "3", "2", "7", + "4", + "6", + EMPTY, + "5", + EMPTY, + EMPTY, EMPTY, "1", - EMPTY, - EMPTY, - EMPTY, - EMPTY, - EMPTY, - EMPTY, - EMPTY, + "?123", "!text/morekeys_tablet_punctuation", EMPTY, - "?123", + "!text/morekeys_punctuation", EMPTY, + EMPTY, + ",", + EMPTY, + "\u00f8", + "\u00e4", + EMPTY, + "\u00f1", + EMPTY, + "\u00f6", "\u00e5", EMPTY, - EMPTY, - "!text/morekeys_punctuation", - "\u00e4", - "\u00f6", - EMPTY, - ",", - "\u00f8", - EMPTY, - EMPTY, ".", - "\u00f1", + EMPTY, + "(", + ",", + "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&", + "\u2020,\u2021,\u2605", "<", + "\u2265", + "]", + "\u00bf", + ")", + "}", + "\u00ab", EMPTY, EMPTY, + EMPTY, + "{", + ".", + "\u203a", + "\u00e6", + "\u2039", + ">", "\u00bb", "\u2264", - "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&", - "{", - ",", - "\u00bf", - "\u00ab", - "(", - "\u00e6", - ">", - EMPTY, - "]", - "\u2020,\u2021,\u2605", - "\u2039", - ".", - ")", - "\u2265", "[", - EMPTY, - "\u203a", - "}", - EMPTY, - "\u00f1", - EMPTY, - "\u2030", - "\u266a,\u2665,\u2660,\u2666,\u2663", "%", EMPTY, + "\u00f1", + "!autoColumnOrder!3,!text/keyspecs_left_parenthesis_more_keys", + EMPTY, + EMPTY, "!autoColumnOrder!3,!text/keyspecs_right_parenthesis_more_keys", + EMPTY, + EMPTY, "?", EMPTY, EMPTY, + "\u2030", + EMPTY, + "\u266a,\u2665,\u2660,\u2666,\u2663", + EMPTY, ";", EMPTY, EMPTY, EMPTY, + "!string/label_pause_key", EMPTY, - "!autoColumnOrder!3,!text/keyspecs_left_parenthesis_more_keys", - EMPTY, - EMPTY, + "!string/label_done_key", EMPTY, "!string/label_wait_key", + "!string/label_send_key", + EMPTY, + EMPTY, + "!string/label_go_key", + EMPTY, + EMPTY, + "!string/label_previous_key", EMPTY, EMPTY, EMPTY, @@ -5243,179 +5294,168 @@ public final class KeyboardTextsTable { EMPTY, EMPTY, EMPTY, + "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&", "!string/label_next_key", EMPTY, - EMPTY, - EMPTY, - "!string/label_done_key", - "!string/label_go_key", - "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&", - EMPTY, - EMPTY, - "!string/label_pause_key", - EMPTY, - "!string/label_send_key", - "!string/label_previous_key", - EMPTY, "!fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_left_double_angle_quote", - "y", - "w", - "\u00a2,\u00a3,\u20ac,\u00a5,\u20b1", EMPTY, - "\u00b1", - EMPTY, - "x", "q", EMPTY, EMPTY, - EMPTY, - EMPTY, + "y", "!fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_right_double_angle_quote", + "w", + EMPTY, + "\u00a2,\u00a3,\u20ac,\u00a5,\u20b1", + EMPTY, + EMPTY, + "x", + "\u00b1", "\u00a1,\u203d", - "1", - "#", - EMPTY, - EMPTY, - EMPTY, - EMPTY, - EMPTY, - "\u2076,\u2086", - "'", "$", - "<", - "&,|", - "!fixedColumnOrder!2,!hasLabels!,!text/keylabel_time_am,!text/keylabel_time_pm", - EMPTY, "\\\\", - EMPTY, - EMPTY, - EMPTY, - "@", - EMPTY, - EMPTY, - EMPTY, - "7", - EMPTY, - EMPTY, - EMPTY, - "\u2018,\u201a,\u2019", - "-,\u2013,\u2014,_", - EMPTY, + "^", + "1", + "),],},>", "\u201c,\u201e,\u201d", - "!icon/action_select_all|!code/action_select_all", + EMPTY, + "2", + EMPTY, + EMPTY, + "= \\\\ <", + ";", EMPTY, "!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes", - "9", + "\\%", EMPTY, - "0", - EMPTY, - "$,\u00a2,\u20ac,\u00a3,\u00a5,\u20b1", - EMPTY, - "!icon/action_undo|!code/action_undo", - "+,=", EMPTY, ">", - "\uff0a\uff03", - "!fixedColumnOrder!4,!needsDividers!,!icon/action_switch_language|!code/action_switch_language,!icon/action_text_edit|!code/action_text_edit,!icon/action_clipboard_history|!code/action_clipboard_history,!icon/action_emoji|!code/action_emoji,!icon/previous_key|!code/key_action_previous,!icon/next_key|!code/key_action_next,!icon/action_undo|!code/action_undo,!icon/action_redo|!code/action_redo", - "!", - "!text/keyspec_greater_than,!text/keyspec_right_curly_bracket,!text/keyspec_right_square_bracket", - "!", EMPTY, EMPTY, - "$,\u20ac,\u00a3,\u00a5,\u00a2", - "\u00b2,\u2082,\u2154", - "\u2075,\u2085,\u215d", - "\u2079,\u2089", + EMPTY, + EMPTY, + EMPTY, + EMPTY, + "'", + EMPTY, + ".com", EMPTY, "\\%", - "\u2019,\u201a,\u2018", - "\\%", EMPTY, + "\u201c,\u201d,\u201e", + EMPTY, + "~ [ <", + "\u2018,\u2019,\u201a", + "9", + EMPTY, + "!icon/action_cut|!code/action_cut", + "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes", EMPTY, "\u201d,\u201e,\u201c", - "~ [ <", - "@", - "\u2077,\u2087,\u215e", - "\"", - EMPTY, - EMPTY, + "#", "!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes", EMPTY, - "4", - "!icon/action_redo|!code/action_redo", - "\u201e,\u201c,\u201d", - "(", + "\u2074,\u2084", + "\u00b9,\u2081,\u00bd,\u2153,\u00bc,\u215b", + "*", + "!text/keyspec_less_than,!text/keyspec_left_curly_bracket,!text/keyspec_left_square_bracket", + EMPTY, + "6", + "#", + "\"", + "7", + "!hasLabels!,!text/label_next_key|!code/key_action_next", + EMPTY, EMPTY, "\u2070,\u2080,\u207f,\u2205", - "!text/keyspec_right_double_angle_quote,!text/keyspec_left_double_angle_quote", + "&", EMPTY, EMPTY, - "#", + "@", EMPTY, EMPTY, + "!text/keyspec_right_single_angle_quote,!text/keyspec_left_single_angle_quote", + "\u2076,\u2086", + "!", + "}", + "$,\u00a2,\u20ac,\u00a3,\u00a5,\u20b1", + "+,=", + "\u2078,\u2088", + "!icon/settings_key|!code/key_settings", + "]", + "-,\u2013,\u2014,_", + "%", + "[", + "(", + "!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", + "\u201e,\u201c,\u201d", + "\u2077,\u2087,\u215e", + "<", + EMPTY, + "\u2018,\u201a,\u2019", + EMPTY, + EMPTY, + "\u201a,\u2018,\u2019", + "@", + "AM", + "\u00b3,\u2083,\u00be,\u215c", + "!icon/action_paste|!code/action_paste", + EMPTY, ")", - "3", - EMPTY, - "\u2078,\u2088", + "\u2079,\u2089", EMPTY, EMPTY, + EMPTY, + EMPTY, + "!icon/action_select_all|!code/action_select_all", "!icon/action_copy|!code/action_copy", + "!fixedColumnOrder!2,!hasLabels!,!text/keylabel_time_am,!text/keylabel_time_pm", + EMPTY, "|", EMPTY, + "\u2019,\u201a,\u2018", + "!fixedColumnOrder!4,!needsDividers!,!icon/action_switch_language|!code/action_switch_language,!icon/action_text_edit|!code/action_text_edit,!icon/action_clipboard_history|!code/action_clipboard_history,!icon/action_emoji|!code/action_emoji,!icon/action_undo|!code/action_undo,!icon/action_redo|!code/action_redo", + "8", + EMPTY, + "\u00b2,\u2082,\u2154", + "!text/keyspec_left_single_angle_quote,!text/keyspec_right_single_angle_quote", + "!icon/action_settings|!code/action_settings", + "3", + "{", + EMPTY, EMPTY, "5", - "\u2018,\u2019,\u201a", - "!text/keyspec_less_than,!text/keyspec_left_curly_bracket,!text/keyspec_left_square_bracket", - "PM", - "),],},>", - "\u2074,\u2084", - "!icon/action_settings|!code/action_settings", - "[", - EMPTY, - "!icon/settings_key|!code/key_settings", - "*", - EMPTY, - "\u201c,\u201d,\u201e", - "123", "=", - "]", - "*", - "!hasLabels!,!text/label_next_key|!code/key_action_next", - ";", - "AM", - "6", - "!icon/action_paste|!code/action_paste", EMPTY, - "8", - "!text/keyspec_right_single_angle_quote,!text/keyspec_left_single_angle_quote", - "\u00b3,\u2083,\u00be,\u215c", - "2", - "!hasLabels!,.net,.org,.gov,.edu", - "&", - "(,[,{,<", - "!fixedColumnOrder!4,!needsDividers!,!icon/action_switch_language|!code/action_switch_language,!icon/action_text_edit|!code/action_text_edit,!icon/action_clipboard_history|!code/action_clipboard_history,!icon/action_emoji|!code/action_emoji,!icon/action_undo|!code/action_undo,!icon/action_redo|!code/action_redo", - "!icon/action_cut|!code/action_cut", - "^", - "}", + EMPTY, + "PM", + EMPTY, + "!icon/action_redo|!code/action_redo", + "&,|", + EMPTY, + EMPTY, + "!fixedColumnOrder!4,!needsDividers!,!icon/action_switch_language|!code/action_switch_language,!icon/action_text_edit|!code/action_text_edit,!icon/action_clipboard_history|!code/action_clipboard_history,!icon/action_emoji|!code/action_emoji,!icon/previous_key|!code/key_action_previous,!icon/next_key|!code/key_action_next,!icon/action_undo|!code/action_undo,!icon/action_redo|!code/action_redo", + EMPTY, + EMPTY, ":", - EMPTY, - "\u201a,\u2018,\u2019", - ".com", - "!icon/shortcut_key|!code/key_shortcut", - EMPTY, - "%", - "{", - EMPTY, - "\u00b9,\u2081,\u00bd,\u2153,\u00bc,\u215b", - "!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", - EMPTY, - "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes", - "= \\\\ <", - EMPTY, "?,/", - "!text/keyspec_left_single_angle_quote,!text/keyspec_right_single_angle_quote", + "!icon/action_undo|!code/action_undo", + "!text/keyspec_greater_than,!text/keyspec_right_curly_bracket,!text/keyspec_right_square_bracket", + "0", + "!hasLabels!,!text/label_previous_key|!code/key_action_previous", + "!text/keyspec_right_double_angle_quote,!text/keyspec_left_double_angle_quote", + "\u2075,\u2085,\u215d", + "!icon/shortcut_key|!code/key_shortcut", + "4", EMPTY, - "!hasLabels!,!text/label_previous_key|!code/key_action_previous" + "\uff0a\uff03", + "*", + "!", + EMPTY, + "(,[,{,<", + "$,\u20ac,\u00a3,\u00a5,\u00a2", + "123", + "!hasLabels!,.net,.org,.gov,.edu" }; diff --git a/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java b/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java index 6ace162e3..b45ff0a50 100644 --- a/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java +++ b/java/src/org/futo/inputmethod/latin/LatinIMELegacy.java @@ -88,7 +88,6 @@ import org.futo.inputmethod.latin.touchinputconsumer.GestureConsumer; import org.futo.inputmethod.latin.uix.settings.SettingsActivity; import org.futo.inputmethod.latin.utils.ApplicationUtils; import org.futo.inputmethod.latin.utils.DialogUtils; -import org.futo.inputmethod.latin.utils.ImportantNoticeUtils; import org.futo.inputmethod.latin.utils.IntentUtils; import org.futo.inputmethod.latin.utils.JniUtils; import org.futo.inputmethod.latin.utils.LeakGuardHandlerWrapper; @@ -1272,7 +1271,6 @@ public class LatinIMELegacy implements KeyboardActionListener, @Override public void onRequestPermissionsResult(boolean allGranted) { - ImportantNoticeUtils.updateContactsNoticeShown(mInputMethodService /* context */); setNeutralSuggestionStrip(); } @@ -1533,15 +1531,11 @@ public class LatinIMELegacy implements KeyboardActionListener, return; } - final boolean shouldShowImportantNotice = - ImportantNoticeUtils.shouldShowImportantNotice(mInputMethodService, currentSettingsValues); + final boolean shouldShowImportantNotice = false; final boolean shouldShowSuggestionCandidates = currentSettingsValues.mInputAttributes.mShouldShowSuggestions && currentSettingsValues.isSuggestionsEnabledPerUserSettings(); - final boolean shouldShowSuggestionsStripUnlessPassword = shouldShowImportantNotice - || currentSettingsValues.mShowsVoiceInputKey - || shouldShowSuggestionCandidates - || currentSettingsValues.isApplicationSpecifiedCompletionsOn(); + final boolean shouldShowSuggestionsStripUnlessPassword = currentSettingsValues.mShowsVoiceInputKey || shouldShowSuggestionCandidates || currentSettingsValues.isApplicationSpecifiedCompletionsOn(); final boolean shouldShowSuggestionsStrip = shouldShowSuggestionsStripUnlessPassword && !currentSettingsValues.mInputAttributes.mIsPasswordField; mSuggestionStripController.updateVisibility(shouldShowSuggestionsStrip, mInputMethodService.isFullscreenMode()); @@ -1557,13 +1551,6 @@ public class LatinIMELegacy implements KeyboardActionListener, || isEmptyApplicationSpecifiedCompletions; final boolean isBeginningOfSentencePrediction = (suggestedWords.mInputStyle == SuggestedWords.INPUT_STYLE_BEGINNING_OF_SENTENCE_PREDICTION); - final boolean noSuggestionsToOverrideImportantNotice = noSuggestionsFromDictionaries - || isBeginningOfSentencePrediction; - if (shouldShowImportantNotice && noSuggestionsToOverrideImportantNotice) { - if (mSuggestionStripController.maybeShowImportantNoticeTitle()) { - return; - } - } if (currentSettingsValues.isSuggestionsEnabledPerUserSettings() || currentSettingsValues.isApplicationSpecifiedCompletionsOn() diff --git a/java/src/org/futo/inputmethod/latin/Subtypes.kt b/java/src/org/futo/inputmethod/latin/Subtypes.kt index 76ce3a633..d198a485d 100644 --- a/java/src/org/futo/inputmethod/latin/Subtypes.kt +++ b/java/src/org/futo/inputmethod/latin/Subtypes.kt @@ -180,13 +180,17 @@ object Subtypes { } } + fun makeSubtype(locale: String, layout: String): InputMethodSubtype = + InputMethodSubtypeBuilder() + .setSubtypeLocale(locale) + .setSubtypeExtraValue("KeyboardLayoutSet=$layout") + .build() + fun addLanguage(context: Context, language: Locale, layout: String) { - val value = subtypeToString( - InputMethodSubtypeBuilder() - .setSubtypeLocale(language.stripExtensionsIfNeeded().toString()) - .setSubtypeExtraValue("KeyboardLayoutSet=$layout") - .build() - ) + val value = subtypeToString(makeSubtype( + language.stripExtensionsIfNeeded().toString(), layout + )) + val currentSetting = context.getSettingBlocking(SubtypesSetting) context.setSettingBlocking(SubtypesSetting.key, currentSetting + setOf(value)) diff --git a/java/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtils.java b/java/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtils.java deleted file mode 100644 index 88def87fb..000000000 --- a/java/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtils.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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 org.futo.inputmethod.latin.utils; - -import android.Manifest; -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 org.futo.inputmethod.annotations.UsedForTesting; -import org.futo.inputmethod.latin.R; -import org.futo.inputmethod.latin.permissions.PermissionsUtil; -import org.futo.inputmethod.latin.settings.SettingsValues; - -import java.util.concurrent.TimeUnit; - -public final class ImportantNoticeUtils { - private static final String TAG = ImportantNoticeUtils.class.getSimpleName(); - - // {@link SharedPreferences} name to save the last important notice version that has been - // displayed to users. - private static final String PREFERENCE_NAME = "important_notice_pref"; - - private static final String KEY_SUGGEST_CONTACTS_NOTICE = "important_notice_suggest_contacts"; - - @UsedForTesting - static final String KEY_TIMESTAMP_OF_CONTACTS_NOTICE = "timestamp_of_suggest_contacts_notice"; - - @UsedForTesting - static final long TIMEOUT_OF_IMPORTANT_NOTICE = TimeUnit.HOURS.toMillis(23); - - // Copy of the hidden {@link Settings.Secure#USER_SETUP_COMPLETE} settings key. - // The value is zero until each multiuser completes system setup wizard. - // Caveat: This is a hidden API. - private static final String Settings_Secure_USER_SETUP_COMPLETE = "user_setup_complete"; - private static final int USER_SETUP_IS_NOT_COMPLETE = 0; - - private ImportantNoticeUtils() { - // This utility class is not publicly instantiable. - } - - @UsedForTesting - static boolean isInSystemSetupWizard(final Context context) { - try { - final int userSetupComplete = Settings.Secure.getInt( - context.getContentResolver(), Settings_Secure_USER_SETUP_COMPLETE); - return userSetupComplete == USER_SETUP_IS_NOT_COMPLETE; - } catch (final SettingNotFoundException e) { - Log.w(TAG, "Can't find settings in Settings.Secure: key=" - + Settings_Secure_USER_SETUP_COMPLETE); - return false; - } - } - - public static boolean shouldShowImportantNotice(final Context context, - final SettingsValues settingsValues) { - // Check to see whether "Use Contacts" is enabled by the user. - /* - if (!settingsValues.mUseContactsDict) { - return false; - } - - if (hasContactsNoticeShown(context)) { - return false; - } - - // Don't show the dialog if we have all the permissions. - if (PermissionsUtil.checkAllPermissionsGranted( - context, Manifest.permission.READ_CONTACTS)) { - return false; - } - - final String importantNoticeTitle = getSuggestContactsNoticeTitle(context); - if (TextUtils.isEmpty(importantNoticeTitle)) { - return false; - } - if (isInSystemSetupWizard(context)) { - return false; - } - if (hasContactsNoticeTimeoutPassed(context, System.currentTimeMillis())) { - updateContactsNoticeShown(context); - return false; - }*/ - return false; - } - - public static String getSuggestContactsNoticeTitle(final Context context) { - return context.getResources().getString(R.string.important_notice_suggest_contact_names); - } - - @UsedForTesting - static boolean hasContactsNoticeTimeoutPassed( - final Context context, final long currentTimeInMillis) { - - return false; - } - - public static void updateContactsNoticeShown(final Context context) { - - } -} diff --git a/java/src/org/futo/inputmethod/v2keyboard/LayoutEngine.kt b/java/src/org/futo/inputmethod/v2keyboard/LayoutEngine.kt index d0da20332..ae2240962 100644 --- a/java/src/org/futo/inputmethod/v2keyboard/LayoutEngine.kt +++ b/java/src/org/futo/inputmethod/v2keyboard/LayoutEngine.kt @@ -575,9 +575,13 @@ data class LayoutEngine( params.mBaseHeight = totalKeyboardHeight params.mDefaultRowHeight = rowHeightPx.roundToInt() - val provider = DynamicThemeProvider.obtainFromContext(context) + try { + val provider = DynamicThemeProvider.obtainFromContext(context) + params.mIconsSet.loadIcons(null, provider) + } catch(_: IllegalArgumentException) { + // May fail during test because provider is unavailable + } - params.mIconsSet.loadIcons(null, provider) params.mThemeId = 3 params.mTextsSet.setLocale(params.mId.locale, context) diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml index 6763275a8..15ef54ec9 100644 --- a/tests/AndroidManifest.xml +++ b/tests/AndroidManifest.xml @@ -14,8 +14,7 @@ limitations under the License. --> - + @@ -28,7 +27,7 @@ diff --git a/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysBase.java b/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysBase.java index 873a2d9ac..36fe282d2 100644 --- a/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysBase.java +++ b/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysBase.java @@ -21,13 +21,17 @@ import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodSubtype; import org.futo.inputmethod.keyboard.internal.KeyboardIconsSet; +import org.futo.inputmethod.keyboard.internal.KeyboardLayoutElement; import org.futo.inputmethod.keyboard.internal.MoreKeySpec; import org.futo.inputmethod.latin.R; import org.futo.inputmethod.latin.RichInputMethodManager; +import org.futo.inputmethod.latin.Subtypes; import org.futo.inputmethod.latin.common.Constants; import org.futo.inputmethod.latin.utils.SubtypeLocaleUtils; +import org.futo.inputmethod.v2keyboard.KeyboardLayoutSetV2; import java.util.Arrays; +import java.util.List; import java.util.Locale; abstract class KeyboardLayoutSetNavigateMoreKeysBase extends KeyboardLayoutSetTestsBase { @@ -82,38 +86,38 @@ abstract class KeyboardLayoutSetNavigateMoreKeysBase extends KeyboardLayoutSetTe final EditorInfo editorInfo = new EditorInfo(); editorInfo.inputType = inputType; editorInfo.imeOptions = imeOptions; - final KeyboardLayoutSet layoutSet = createKeyboardLayoutSet(subtype, editorInfo); - final Keyboard keyboard = layoutSet.getKeyboard(elementId); + final KeyboardLayoutSetV2 layoutSet = createKeyboardLayoutSet(subtype, editorInfo); + final Keyboard keyboard = layoutSet.getKeyboard(KeyboardLayoutElement.fromElementId(elementId)); final Key actualKey = keyboard.getKey(code); - final MoreKeySpec[] actualMoreKeys = actualKey.getMoreKeys(); - final String tag = actualKey.toString() + " moreKeys=" + Arrays.toString(actualMoreKeys); + final List actualMoreKeys = actualKey.getMoreKeys(); + final String tag = actualKey.toString() + " moreKeys=" + actualMoreKeys.toString(); if (expectedMoreKeys.length == 0) { - assertEquals(tag, null, actualMoreKeys); + assertEquals(tag, 0, actualMoreKeys.size()); return; } if (expectedMoreKeys.length == 1) { - assertEquals(tag + " fixedOrder", false, actualKey.isMoreKeysFixedOrder()); - assertEquals(tag + " fixedColumn", false, actualKey.isMoreKeysFixedColumn()); + assertFalse(tag + " fixedOrder", actualKey.isMoreKeysFixedOrder()); + assertFalse(tag + " fixedColumn", actualKey.isMoreKeysFixedColumn()); } else { - assertEquals(tag + " fixedOrder", true, actualKey.isMoreKeysFixedOrder()); - assertEquals(tag + " fixedColumn", true, actualKey.isMoreKeysFixedColumn()); + assertTrue(tag + " fixedOrder", actualKey.isMoreKeysFixedOrder()); + assertTrue(tag + " fixedColumn", actualKey.isMoreKeysFixedColumn()); // TODO: Can't handle multiple rows of more keys. assertEquals(tag + " column", expectedMoreKeys.length, actualKey.getMoreKeysColumnNumber()); } assertNotNull(tag + " moreKeys", actualMoreKeys); - assertEquals(tag, expectedMoreKeys.length, actualMoreKeys.length); - for (int index = 0; index < actualMoreKeys.length; index++) { + assertEquals(tag, expectedMoreKeys.length, actualMoreKeys.size()); + for (int index = 0; index < actualMoreKeys.size(); index++) { final int expectedLabelResId = expectedMoreKeys[index].mLabelResId; if (expectedLabelResId == ExpectedMoreKey.NO_LABEL) { - assertEquals(tag + " label " + index, null, actualMoreKeys[index].mLabel); + assertEquals(tag + " label " + index, null, actualMoreKeys.get(index).mLabel); } else { final CharSequence expectedLabel = getContext().getText(expectedLabelResId); - assertEquals(tag + " label " + index, expectedLabel, actualMoreKeys[index].mLabel); + assertEquals(tag + " label " + index, expectedLabel, actualMoreKeys.get(index).mLabel); } final String expectedIconId = expectedMoreKeys[index].mIconId; - assertEquals(tag + " icon " + index, expectedIconId, actualMoreKeys[index].mIconId); + assertEquals(tag + " icon " + index, expectedIconId, actualMoreKeys.get(index).mIconId); } } @@ -282,7 +286,7 @@ abstract class KeyboardLayoutSetNavigateMoreKeysBase extends KeyboardLayoutSetTe public void testMoreKeysOfEnterKey() { final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); - final InputMethodSubtype subtype = richImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype subtype = Subtypes.INSTANCE.makeSubtype( Locale.US.toString(), SubtypeLocaleUtils.QWERTY); // Password field. diff --git a/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java b/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java index 3e537b1e2..d71b884c0 100644 --- a/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java +++ b/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java @@ -33,6 +33,8 @@ import org.futo.inputmethod.latin.settings.Settings; import org.futo.inputmethod.latin.utils.AdditionalSubtypeUtils; import org.futo.inputmethod.latin.utils.ResourceUtils; import org.futo.inputmethod.latin.utils.SubtypeLocaleUtils; +import org.futo.inputmethod.v2keyboard.KeyboardLayoutSetV2; +import org.futo.inputmethod.v2keyboard.KeyboardLayoutSetV2Params; import java.util.ArrayList; import java.util.Locale; @@ -79,12 +81,12 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase { AdditionalSubtypeUtils.createAdditionalSubtypesArray( AdditionalSubtypeUtils.createPrefSubtypes( res.getStringArray(R.array.predefined_subtypes))); - mRichImm.setAdditionalInputMethodSubtypes(predefinedAdditionalSubtypes); + //mRichImm.setAdditionalInputMethodSubtypes(predefinedAdditionalSubtypes); final KeyboardTheme keyboardTheme = KeyboardTheme.searchKeyboardThemeById( getKeyboardThemeForTests(), KeyboardTheme.KEYBOARD_THEMES); setContext(new ContextThemeWrapper(getContext(), keyboardTheme.mStyleId)); - KeyboardLayoutSet.onKeyboardThemeChanged(); + KeyboardLayoutSetV2.onKeyboardThemeChanged(); mScreenMetrics = Settings.readScreenMetrics(res); @@ -98,7 +100,7 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase { @Override protected void tearDown() throws Exception { // Restore additional subtypes preference. - mRichImm.setAdditionalInputMethodSubtypes(mSavedAdditionalSubtypes); + //mRichImm.setAdditionalInputMethodSubtypes(mSavedAdditionalSubtypes); super.tearDown(); } @@ -143,25 +145,32 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase { "Unknown subtype: locale=" + locale + " keyboardLayout=" + keyboardLayout); } - protected KeyboardLayoutSet createKeyboardLayoutSet(final InputMethodSubtype subtype, + protected KeyboardLayoutSetV2 createKeyboardLayoutSet(final InputMethodSubtype subtype, final EditorInfo editorInfo) { return createKeyboardLayoutSet(subtype, editorInfo, false /* voiceInputKeyEnabled */, false /* languageSwitchKeyEnabled */, false /* splitLayoutEnabled */); } - protected KeyboardLayoutSet createKeyboardLayoutSet(final InputMethodSubtype subtype, + protected KeyboardLayoutSetV2 createKeyboardLayoutSet(final InputMethodSubtype subtype, final EditorInfo editorInfo, final boolean voiceInputKeyEnabled, final boolean languageSwitchKeyEnabled, final boolean splitLayoutEnabled) { final Context context = getContext(); final Resources res = context.getResources(); final int keyboardWidth = ResourceUtils.getDefaultKeyboardWidth(res); final int keyboardHeight = ResourceUtils.getDefaultKeyboardHeight(res); - final Builder builder = new Builder(context, editorInfo); - builder.setKeyboardGeometry(keyboardWidth, keyboardHeight) - .setSubtype(RichInputMethodSubtype.getRichInputMethodSubtype(subtype)) - .setVoiceInputKeyEnabled(voiceInputKeyEnabled) - .setBottomEmojiKeyEnabled(languageSwitchKeyEnabled) - .setSplitLayoutEnabledByUser(splitLayoutEnabled); - return builder.build(); + + final RichInputMethodSubtype richInputMethodSubtype = RichInputMethodSubtype.getRichInputMethodSubtype(subtype); + + return new KeyboardLayoutSetV2( + context, + new KeyboardLayoutSetV2Params( + keyboardWidth, keyboardHeight, + richInputMethodSubtype.getKeyboardLayoutSetName(), + richInputMethodSubtype.getLocale(), + editorInfo, false, + 4.0f, splitLayoutEnabled, + languageSwitchKeyEnabled ? 1 : null + ) + ); } } diff --git a/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutTest.kt b/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutTest.kt index e78f97431..88705cd30 100644 --- a/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutTest.kt +++ b/tests/src/org/futo/inputmethod/keyboard/KeyboardLayoutTest.kt @@ -13,69 +13,94 @@ * See the License for the specific language governing permissions and * limitations under the License */ +package org.futo.inputmethod.keyboard -package org.futo.inputmethod.keyboard; - -import static org.junit.Assert.assertEquals; - -import androidx.test.filters.SmallTest; -import androidx.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import java.util.ArrayList; +import androidx.test.filters.SmallTest +import androidx.test.runner.AndroidJUnit4 +import org.futo.inputmethod.v2keyboard.KeyVisualStyle +import org.junit.Assert +import org.junit.Test +import org.junit.runner.RunWith @SmallTest -@RunWith(AndroidJUnit4.class) -public class KeyboardLayoutTest { +@RunWith(AndroidJUnit4::class) +class KeyboardLayoutTest { @Test - public void testNewKeyboardLayout() { - KeyboardLayout keyboardLayout = KeyboardLayout - .newKeyboardLayout(new ArrayList(), 11, 12, 13, 14); + fun testNewKeyboardLayout() { + var keyboardLayout = KeyboardLayout + .newKeyboardLayout(ArrayList(), 11, 12, 13, 14) - assertEquals(11, keyboardLayout.mMostCommonKeyWidth); - assertEquals(12, keyboardLayout.mMostCommonKeyHeight); - assertEquals(13, keyboardLayout.mKeyboardWidth); - assertEquals(14, keyboardLayout.mKeyboardHeight); + Assert.assertEquals(11, keyboardLayout.mMostCommonKeyWidth.toLong()) + Assert.assertEquals(12, keyboardLayout.mMostCommonKeyHeight.toLong()) + Assert.assertEquals(13, keyboardLayout.mKeyboardWidth.toLong()) + Assert.assertEquals(14, keyboardLayout.mKeyboardHeight.toLong()) - assertEquals(0, keyboardLayout.getKeyCodes().length); - assertEquals(0, keyboardLayout.getKeyWidths().length); - assertEquals(0, keyboardLayout.getKeyHeights().length); - assertEquals(0, keyboardLayout.getKeyXCoordinates().length); - assertEquals(0, keyboardLayout.getKeyYCoordinates().length); + Assert.assertEquals(0, keyboardLayout.keyCodes.size.toLong()) + Assert.assertEquals(0, keyboardLayout.keyWidths.size.toLong()) + Assert.assertEquals(0, keyboardLayout.keyHeights.size.toLong()) + Assert.assertEquals(0, keyboardLayout.keyXCoordinates.size.toLong()) + Assert.assertEquals(0, keyboardLayout.keyYCoordinates.size.toLong()) - Key key1 = new Key("label1", 101, 102, "101", "101hint", 103, 104, 105, 106, 1100, 1101, - 10, 10); - Key key2 = new Key("label2", 201, 103, "201", "201hint", 203, 204, 205, 206, 2100, 2101, - 10, 10); + val key1 = Key( + code = 101, + label = "label1", + hintLabel = "101hint", + width = 1100, + height = 1101, + horizontalGap = 10, + verticalGap = 10, + actionFlags = 102, + labelFlags = 103, + visualStyle = KeyVisualStyle.Normal, + x = 105, + y = 106 + ) - ArrayList sortedKeys = new ArrayList<>(2); - sortedKeys.add(key1); - sortedKeys.add(key2); - keyboardLayout = KeyboardLayout.newKeyboardLayout(sortedKeys, 11, 12, 13, 14); - assertEquals(2, keyboardLayout.getKeyCodes().length); - assertEquals(2, keyboardLayout.getKeyWidths().length); - assertEquals(2, keyboardLayout.getKeyHeights().length); - assertEquals(2, keyboardLayout.getKeyXCoordinates().length); - assertEquals(2, keyboardLayout.getKeyYCoordinates().length); + val key2 = Key( + code = 201, + label = "label2", + hintLabel = "201hint", + width = 2100, + height = 2101, + horizontalGap = 10, + verticalGap = 10, + actionFlags = 202, + labelFlags = 203, + visualStyle = KeyVisualStyle.Normal, + x = 205, + y = 206 + ) - assertEquals(102, keyboardLayout.getKeyCodes()[0]); + //Key key1 = new Key("label1", 101, 102, "101", "101hint", 103, 104, 105, 106, 1100, 1101, + // 10, 10); + //Key key2 = new Key("label2", 201, 103, "201", "201hint", 203, 204, 205, 206, 2100, 2101, + // 10, 10); + val sortedKeys = ArrayList(2) + sortedKeys.add(key1) + sortedKeys.add(key2) + keyboardLayout = KeyboardLayout.newKeyboardLayout(sortedKeys, 11, 12, 13, 14) + Assert.assertEquals(2, keyboardLayout.keyCodes.size.toLong()) + Assert.assertEquals(2, keyboardLayout.keyWidths.size.toLong()) + Assert.assertEquals(2, keyboardLayout.keyHeights.size.toLong()) + Assert.assertEquals(2, keyboardLayout.keyXCoordinates.size.toLong()) + Assert.assertEquals(2, keyboardLayout.keyYCoordinates.size.toLong()) + + Assert.assertEquals(102, keyboardLayout.keyCodes[0].toLong()) // xCo + horizontalGap/2 - assertEquals(105 + 5, keyboardLayout.getKeyXCoordinates()[0]); - assertEquals(106, keyboardLayout.getKeyYCoordinates()[0]); + Assert.assertEquals((105 + 5).toLong(), keyboardLayout.keyXCoordinates[0].toLong()) + Assert.assertEquals(106, keyboardLayout.keyYCoordinates[0].toLong()) // width - horizontalGap - assertEquals(1100 - 10, keyboardLayout.getKeyWidths()[0]); + Assert.assertEquals((1100 - 10).toLong(), keyboardLayout.keyWidths[0].toLong()) // height - verticalGap - assertEquals(1101 - 10, keyboardLayout.getKeyHeights()[0]); + Assert.assertEquals((1101 - 10).toLong(), keyboardLayout.keyHeights[0].toLong()) - assertEquals(103, keyboardLayout.getKeyCodes()[1]); + Assert.assertEquals(103, keyboardLayout.keyCodes[1].toLong()) // xCo + horizontalGap/2 - assertEquals(205 + 5, keyboardLayout.getKeyXCoordinates()[1]); - assertEquals(206, keyboardLayout.getKeyYCoordinates()[1]); + Assert.assertEquals((205 + 5).toLong(), keyboardLayout.keyXCoordinates[1].toLong()) + Assert.assertEquals(206, keyboardLayout.keyYCoordinates[1].toLong()) // width - horizontalGap - assertEquals(2100 - 10, keyboardLayout.getKeyWidths()[1]); + Assert.assertEquals((2100 - 10).toLong(), keyboardLayout.keyWidths[1].toLong()) // height - verticalGap - assertEquals(2101 - 10, keyboardLayout.getKeyHeights()[1]); + Assert.assertEquals((2101 - 10).toLong(), keyboardLayout.keyHeights[1].toLong()) } } diff --git a/tests/src/org/futo/inputmethod/keyboard/action/ActionTestsBase.java b/tests/src/org/futo/inputmethod/keyboard/action/ActionTestsBase.java index 96200155f..fb3cb674c 100644 --- a/tests/src/org/futo/inputmethod/keyboard/action/ActionTestsBase.java +++ b/tests/src/org/futo/inputmethod/keyboard/action/ActionTestsBase.java @@ -26,11 +26,13 @@ import org.futo.inputmethod.keyboard.Key; import org.futo.inputmethod.keyboard.Keyboard; import org.futo.inputmethod.keyboard.KeyboardId; import org.futo.inputmethod.keyboard.KeyboardLayoutSetTestsBase; +import org.futo.inputmethod.keyboard.internal.KeyboardLayoutElement; import org.futo.inputmethod.keyboard.layout.expected.ExpectedKeyVisual; import org.futo.inputmethod.latin.common.Constants; import org.futo.inputmethod.latin.common.LocaleUtils; import org.futo.inputmethod.latin.utils.RunInLocale; import org.futo.inputmethod.latin.utils.SubtypeLocaleUtils; +import org.futo.inputmethod.v2keyboard.KeyboardLayoutSetV2; import java.util.Locale; @@ -74,9 +76,9 @@ abstract class ActionTestsBase extends KeyboardLayoutSetTestsBase { return LocaleUtils.constructLocaleFromString(localeString); } - private static void assertActionKey(final String tag, final KeyboardLayoutSet layoutSet, + private static void assertActionKey(final String tag, final KeyboardLayoutSetV2 layoutSet, final int elementId, final ExpectedActionKey expectedKey) { - final Keyboard keyboard = layoutSet.getKeyboard(elementId); + final Keyboard keyboard = layoutSet.getKeyboard(KeyboardLayoutElement.fromElementId(elementId)); final Key actualKey = keyboard.getKey(Constants.CODE_ENTER); assertNotNull(tag + " enter key on " + keyboard.mId, actualKey); assertEquals(tag + " label " + expectedKey, expectedKey.getLabel(), actualKey.getLabel()); @@ -94,7 +96,7 @@ abstract class ActionTestsBase extends KeyboardLayoutSetTestsBase { final EditorInfo editorInfo, final ExpectedActionKey expectedKey) { // Test text layouts. editorInfo.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL; - final KeyboardLayoutSet layoutSet = createKeyboardLayoutSet(subtype, editorInfo); + final KeyboardLayoutSetV2 layoutSet = createKeyboardLayoutSet(subtype, editorInfo); assertActionKey(tag, layoutSet, KeyboardId.ELEMENT_ALPHABET, expectedKey); assertActionKey(tag, layoutSet, KeyboardId.ELEMENT_SYMBOLS, expectedKey); assertActionKey(tag, layoutSet, KeyboardId.ELEMENT_SYMBOLS_SHIFTED, expectedKey); @@ -106,7 +108,7 @@ abstract class ActionTestsBase extends KeyboardLayoutSetTestsBase { // Test number password layout. editorInfo.inputType = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD; - final KeyboardLayoutSet passwordSet = createKeyboardLayoutSet(subtype, editorInfo); + final KeyboardLayoutSetV2 passwordSet = createKeyboardLayoutSet(subtype, editorInfo); assertActionKey(tag, passwordSet, KeyboardId.ELEMENT_NUMBER, expectedKey); } } diff --git a/tests/src/org/futo/inputmethod/keyboard/action/KlpActionLabelTests.java b/tests/src/org/futo/inputmethod/keyboard/action/KlpActionLabelTests.java index b35fd71d9..8bcb0e08a 100644 --- a/tests/src/org/futo/inputmethod/keyboard/action/KlpActionLabelTests.java +++ b/tests/src/org/futo/inputmethod/keyboard/action/KlpActionLabelTests.java @@ -25,8 +25,10 @@ import org.futo.inputmethod.keyboard.internal.KeyboardIconsSet; import org.futo.inputmethod.keyboard.internal.KeyboardTextsSet; import org.futo.inputmethod.latin.R; import org.futo.inputmethod.latin.RichInputMethodManager; +import org.futo.inputmethod.latin.Subtypes; import org.futo.inputmethod.latin.utils.RunInLocale; import org.futo.inputmethod.latin.utils.SubtypeLocaleUtils; +import org.futo.inputmethod.v2keyboard.KeyboardLayoutSetV2; import java.util.Locale; @@ -55,7 +57,7 @@ public class KlpActionLabelTests extends KlpActionTestsBase { final Locale labelLocale, final Locale systemLocale) { // Simulate system locale changing, see {@link SystemBroadcastReceiver}. if (!systemLocale.equals(mSystemLocale)) { - KeyboardLayoutSet.onSystemLocaleChanged(); + KeyboardLayoutSetV2.onSystemLocaleChanged(); mSystemLocale = systemLocale; } final ExpectedActionKey enterKey = ExpectedActionKey.newIconKey( @@ -87,7 +89,7 @@ public class KlpActionLabelTests extends KlpActionTestsBase { public void testActionLabelInOtherLocale() { final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); - final InputMethodSubtype italian = richImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype italian = Subtypes.INSTANCE.makeSubtype( Locale.ITALIAN.toString(), SubtypeLocaleUtils.QWERTY); // An action label should be displayed in subtype's locale regardless of the system locale. doTestActionKeysInLocaleWithStringResources(italian, Locale.ITALIAN, Locale.US); @@ -98,7 +100,7 @@ public class KlpActionLabelTests extends KlpActionTestsBase { public void testNoLanguageSubtypeActionLabel() { final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); - final InputMethodSubtype noLanguage = richImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype noLanguage = Subtypes.INSTANCE.makeSubtype( SubtypeLocaleUtils.NO_LANGUAGE, SubtypeLocaleUtils.QWERTY); // An action label of no language keyboard should be displayed in the system locale. doTestActionKeysInLocaleWithStringResources(noLanguage, Locale.US, Locale.US); @@ -111,7 +113,7 @@ public class KlpActionLabelTests extends KlpActionTestsBase { final Locale labelLocale, final Locale systemLocale) { // Simulate system locale changing, see {@link SystemBroadcastReceiver}. if (!systemLocale.equals(mSystemLocale)) { - KeyboardLayoutSet.onSystemLocaleChanged(); + KeyboardLayoutSetV2.onSystemLocaleChanged(); mSystemLocale = systemLocale; } final KeyboardTextsSet textsSet = new KeyboardTextsSet(); @@ -146,7 +148,7 @@ public class KlpActionLabelTests extends KlpActionTestsBase { public void testHinglishActionLabel() { final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); final Locale hi_ZZ = new Locale("hi", "ZZ"); - final InputMethodSubtype hiLatn = richImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype hiLatn = Subtypes.INSTANCE.makeSubtype( hi_ZZ.toString(), SubtypeLocaleUtils.QWERTY); // This is a preliminary subtype and may not exist. if (hiLatn == null) { @@ -163,7 +165,7 @@ public class KlpActionLabelTests extends KlpActionTestsBase { public void testSerbianLatinActionLabel() { final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); final Locale sr_ZZ = new Locale("sr", "ZZ"); - final InputMethodSubtype srLatn = richImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype srLatn = Subtypes.INSTANCE.makeSubtype( sr_ZZ.toString(), "serbian_qwertz"); // This is a preliminary subtype and may not exist. if (srLatn == null) { diff --git a/tests/src/org/futo/inputmethod/keyboard/internal/KeyboardStateTestsBase.java b/tests/src/org/futo/inputmethod/keyboard/internal/KeyboardStateTestsBase.java index c2a7d317e..071276f0c 100644 --- a/tests/src/org/futo/inputmethod/keyboard/internal/KeyboardStateTestsBase.java +++ b/tests/src/org/futo/inputmethod/keyboard/internal/KeyboardStateTestsBase.java @@ -94,7 +94,7 @@ public class KeyboardStateTestsBase extends AndroidTestCase * @param afterPress the keyboard state after pressing the key. */ public void pressKey(final int code, final int afterPress) { - mSwitcher.expireDoubleTapTimeout(); + //mSwitcher.expireDoubleTapTimeout(); pressKeyWithoutTimerExpire(code, true, afterPress); } @@ -129,7 +129,7 @@ public class KeyboardStateTestsBase extends AndroidTestCase * @param afterPress the keyboard state after pressing chording key. */ public void chordingPressKey(final int code, final int afterPress) { - mSwitcher.expireDoubleTapTimeout(); + //mSwitcher.expireDoubleTapTimeout(); pressKeyWithoutTimerExpire(code, false, afterPress); } diff --git a/tests/src/org/futo/inputmethod/keyboard/internal/MockKeyboardSwitcher.java b/tests/src/org/futo/inputmethod/keyboard/internal/MockKeyboardSwitcher.java index 2dc2b2868..8b28dfa01 100644 --- a/tests/src/org/futo/inputmethod/keyboard/internal/MockKeyboardSwitcher.java +++ b/tests/src/org/futo/inputmethod/keyboard/internal/MockKeyboardSwitcher.java @@ -18,11 +18,13 @@ package org.futo.inputmethod.keyboard.internal; import android.text.TextUtils; +import androidx.annotation.NonNull; + import org.futo.inputmethod.event.Event; import org.futo.inputmethod.latin.common.Constants; import org.futo.inputmethod.latin.utils.RecapitalizeStatus; -public class MockKeyboardSwitcher implements KeyboardState.SwitchActions { +public class MockKeyboardSwitcher implements SwitchActions { public interface MockConstants { // Argument for {@link KeyboardState#onPressKey} and {@link KeyboardState#onReleaseKey}. public static final boolean NOT_SLIDING = false; @@ -54,7 +56,6 @@ public class MockKeyboardSwitcher implements KeyboardState.SwitchActions { // Following InputConnection's behavior. Simulating InputType.TYPE_TEXT_FLAG_CAP_WORDS. private int mAutoCapsState = MockConstants.CAP_MODE_OFF; - private boolean mIsInDoubleTapShiftKeyTimeout; private int mLongPressTimeoutCode; private final KeyboardState mState = new KeyboardState(this); @@ -81,48 +82,9 @@ public class MockKeyboardSwitcher implements KeyboardState.SwitchActions { mAutoCapsState = autoCaps; } - public void expireDoubleTapTimeout() { - mIsInDoubleTapShiftKeyTimeout = false; - } - @Override - public void setAlphabetKeyboard() { - mLayout = MockConstants.ALPHABET_UNSHIFTED; - } - - @Override - public void setAlphabetManualShiftedKeyboard() { - mLayout = MockConstants.ALPHABET_MANUAL_SHIFTED; - } - - @Override - public void setAlphabetAutomaticShiftedKeyboard() { - mLayout = MockConstants.ALPHABET_AUTOMATIC_SHIFTED; - } - - @Override - public void setAlphabetShiftLockedKeyboard() { - mLayout = MockConstants.ALPHABET_SHIFT_LOCKED; - } - - @Override - public void setAlphabetShiftLockShiftedKeyboard() { - mLayout = MockConstants.ALPHABET_SHIFT_LOCK_SHIFTED; - } - - @Override - public void setSymbolsKeyboard() { - mLayout = MockConstants.SYMBOLS_UNSHIFTED; - } - - @Override - public void setSymbolsShiftedKeyboard() { - mLayout = MockConstants.SYMBOLS_SHIFTED; - } - - @Override - public void setEmojiKeyboard() { - // Just ignore. + public void setKeyboard(@NonNull KeyboardLayoutElement element) { + mLayout = element.getElementId(); } @Override @@ -131,27 +93,12 @@ public class MockKeyboardSwitcher implements KeyboardState.SwitchActions { mState.onUpdateShiftState(currentAutoCapsState, currentRecapitalizeState); } - @Override - public void startDoubleTapShiftKeyTimer() { - mIsInDoubleTapShiftKeyTimeout = true; - } - - @Override - public void cancelDoubleTapShiftKeyTimer() { - mIsInDoubleTapShiftKeyTimeout = false; - } - - @Override - public boolean isInDoubleTapShiftKeyTimeout() { - return mIsInDoubleTapShiftKeyTimeout; - } - public void updateShiftState() { mState.onUpdateShiftState(mAutoCapsState, RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE); } public void loadKeyboard() { - mState.onLoadKeyboard(mAutoCapsState, RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE); + mState.onLoadKeyboard(null, mAutoCapsState, RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE); } public void saveKeyboardState() { diff --git a/tests/src/org/futo/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java b/tests/src/org/futo/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java index 3f6c5d930..fe6dd412b 100644 --- a/tests/src/org/futo/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java +++ b/tests/src/org/futo/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java @@ -17,6 +17,7 @@ package org.futo.inputmethod.keyboard.internal; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import android.app.Instrumentation; @@ -27,8 +28,7 @@ import androidx.test.InstrumentationRegistry; import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; -import org.futo.inputmethod.latin.tests.R; - +//import org.futo.inputmethod.latin.tests.R; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -46,8 +46,8 @@ public class MoreKeySpecStringReferenceTests { final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); final Context testContext = instrumentation.getContext(); final Resources testRes = testContext.getResources(); - final String testPackageName = testRes.getResourcePackageName(R.string.empty_string); - mTextsSet.setLocale(TEST_LOCALE, testRes, testPackageName); + //final String testPackageName = testRes.getResourcePackageName(R.string.empty_string); + mTextsSet.setLocale(TEST_LOCALE, testContext);//, testPackageName); } private void assertTextArray(final String message, final String value, @@ -69,14 +69,12 @@ public class MoreKeySpecStringReferenceTests { @Test public void testResolveNullText() { - assertEquals("resolve null", - mTextsSet.resolveTextReference(null), null); + assertNull("resolve null", mTextsSet.resolveTextReference(null)); } @Test public void testResolveEmptyText() { - assertEquals("resolve empty text", - mTextsSet.resolveTextReference("!string/empty_string"), null); + assertNull("resolve empty text", mTextsSet.resolveTextReference("!string/empty_string")); } @Test diff --git a/tests/src/org/futo/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java b/tests/src/org/futo/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java index 8274266fc..160e14f4a 100644 --- a/tests/src/org/futo/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java +++ b/tests/src/org/futo/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java @@ -29,31 +29,31 @@ public abstract class AbstractLayoutBase { // Helper method to create an {@link ExpectedKey} object that has the label. public static ExpectedKey key(final String label, final ExpectedKey ... moreKeys) { - return ExpectedKey.newInstance(label, moreKeys); + return ExpectedKey.newLabelInstance(label, moreKeys); } // Helper method to create an {@link ExpectedKey} object that has the label and the output text. public static ExpectedKey key(final String label, final String outputText, final ExpectedKey ... moreKeys) { - return ExpectedKey.newInstance(label, outputText, moreKeys); + return ExpectedKey.newLabelInstance(label, outputText, moreKeys); } // Helper method to create an {@link ExpectedKey} object that has the label and the output code. public static ExpectedKey key(final String label, final int code, final ExpectedKey ... moreKeys) { - return ExpectedKey.newInstance(label, code, moreKeys); + return ExpectedKey.newLabelInstance(label, code, moreKeys); } // Helper method to create an {@link ExpectedKey} object that has the icon and the output text. - public static ExpectedKey key(final int iconId, final String outputText, + public static ExpectedKey iconKey(final String iconId, final String outputText, final ExpectedKey ... moreKeys) { - return ExpectedKey.newInstance(iconId, outputText, moreKeys); + return ExpectedKey.newIconInstance(iconId, outputText, moreKeys); } // Helper method to create an {@link ExpectedKey} object that has the icon and the output code. - public static ExpectedKey key(final int iconId, final int code, + public static ExpectedKey iconKey(final String iconId, final int code, final ExpectedKey ... moreKeys) { - return ExpectedKey.newInstance(iconId, code, moreKeys); + return ExpectedKey.newIconInstance(iconId, code, moreKeys); } // Helper method to create an {@link ExpectedKey} object that has new "more keys". @@ -72,25 +72,25 @@ public abstract class AbstractLayoutBase { // Helper method to create an {@link ExpectedKey} object for a "more key" that has the label. public static ExpectedKey moreKey(final String label) { - return ExpectedKey.newInstance(label); + return ExpectedKey.newLabelInstance(label); } // Helper method to create an {@link ExpectedKey} object for a "more key" that has the label // and the output text. public static ExpectedKey moreKey(final String label, final String outputText) { - return ExpectedKey.newInstance(label, outputText); + return ExpectedKey.newLabelInstance(label, outputText); } // Helper method to create an {@link ExpectedKey} object for a "more key" that has the label // and the output code. public static ExpectedKey moreKey(final String label, final int code) { - return ExpectedKey.newInstance(label, code); + return ExpectedKey.newLabelInstance(label, code); } // Helper method to create an {@link ExpectedKey} object for a "more key" that has the icon // and the output text. - public static ExpectedKey moreKey(final int iconId, final String outputText) { - return ExpectedKey.newInstance(iconId, outputText); + public static ExpectedKey moreIconKey(final String iconId, final String outputText) { + return ExpectedKey.newIconInstance(iconId, outputText); } // Helper method to create {@link ExpectedKey} array by joining {@link ExpectedKey}, @@ -121,20 +121,20 @@ public abstract class AbstractLayoutBase { private static final String ICON_ZWJ = KeyboardIconsSet.NAME_ZWJ_KEY; // Functional keys. - protected static final ExpectedKey DELETE_KEY = key(ICON_DELETE, Constants.CODE_DELETE); - protected static final ExpectedKey TAB_KEY = key(ICON_TAB, Constants.CODE_TAB); - protected static final ExpectedKey SHORTCUT_KEY = key(ICON_SHORTCUT, Constants.CODE_SHORTCUT); - protected static final ExpectedKey SETTINGS_KEY = key(ICON_SETTINGS, Constants.CODE_SETTINGS); - protected static final ExpectedKey LANGUAGE_SWITCH_KEY = key( + protected static final ExpectedKey DELETE_KEY = iconKey(ICON_DELETE, Constants.CODE_DELETE); + protected static final ExpectedKey TAB_KEY = iconKey(ICON_TAB, Constants.CODE_TAB); + protected static final ExpectedKey SHORTCUT_KEY = iconKey(ICON_SHORTCUT, Constants.CODE_SHORTCUT); + protected static final ExpectedKey SETTINGS_KEY = iconKey(ICON_SETTINGS, Constants.CODE_SETTINGS); + protected static final ExpectedKey LANGUAGE_SWITCH_KEY = iconKey( ICON_LANGUAGE_SWITCH, Constants.CODE_LANGUAGE_SWITCH); - protected static final ExpectedKey ENTER_KEY = key(ICON_ENTER, Constants.CODE_ENTER); - protected static final ExpectedKey EMOJI_ACTION_KEY = key(ICON_EMOJI_ACTION, Constants.CODE_EMOJI); - protected static final ExpectedKey EMOJI_NORMAL_KEY = key(ICON_EMOJI_NORMAL, Constants.CODE_EMOJI); - protected static final ExpectedKey SPACE_KEY = key(ICON_SPACE, Constants.CODE_SPACE); + protected static final ExpectedKey ENTER_KEY = iconKey(ICON_ENTER, Constants.CODE_ENTER); + protected static final ExpectedKey EMOJI_ACTION_KEY = iconKey(ICON_EMOJI_ACTION, Constants.CODE_EMOJI); + protected static final ExpectedKey EMOJI_NORMAL_KEY = iconKey(ICON_EMOJI_NORMAL, Constants.CODE_EMOJI); + protected static final ExpectedKey SPACE_KEY = iconKey(ICON_SPACE, Constants.CODE_SPACE); protected static final ExpectedKey CAPSLOCK_MORE_KEY = key(" ", Constants.CODE_CAPSLOCK); - protected static final ExpectedKey SHIFT_KEY = key(ICON_SHIFT, + protected static final ExpectedKey SHIFT_KEY = iconKey(ICON_SHIFT, Constants.CODE_SHIFT, CAPSLOCK_MORE_KEY); - protected static final ExpectedKey SHIFTED_SHIFT_KEY = key(ICON_SHIFTED_SHIFT, + protected static final ExpectedKey SHIFTED_SHIFT_KEY = iconKey(ICON_SHIFTED_SHIFT, Constants.CODE_SHIFT, CAPSLOCK_MORE_KEY); protected static final ExpectedKey ALPHABET_KEY = key("ABC", Constants.CODE_SWITCH_ALPHA_SYMBOL); protected static final ExpectedKey SYMBOLS_KEY = key("?123", Constants.CODE_SWITCH_ALPHA_SYMBOL); @@ -148,8 +148,8 @@ public abstract class AbstractLayoutBase { key("!", moreKey("\u00A1")), key("?", moreKey("\u00BF"))); // U+200C: ZERO WIDTH NON-JOINER // U+200D: ZERO WIDTH JOINER - protected static final ExpectedKey ZWNJ_KEY = key(ICON_ZWNJ, "\u200C"); - protected static final ExpectedKey ZWJ_KEY = key(ICON_ZWJ, "\u200D"); + protected static final ExpectedKey ZWNJ_KEY = iconKey(ICON_ZWNJ, "\u200C"); + protected static final ExpectedKey ZWJ_KEY = iconKey(ICON_ZWJ, "\u200D"); // Domain key protected static final ExpectedKey DOMAIN_KEY = key(".com", joinMoreKeys(".net", ".org", ".gov", ".edu")).preserveCase(); diff --git a/tests/src/org/futo/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java b/tests/src/org/futo/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java index 9397fec58..4ba25dc93 100644 --- a/tests/src/org/futo/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java +++ b/tests/src/org/futo/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java @@ -24,6 +24,7 @@ import org.futo.inputmethod.latin.common.StringUtils; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -108,10 +109,10 @@ public final class ActualKeyboardBuilder extends AbstractKeyboardBuilder { } @Nonnull - static String toString(final String label, final int iconId, final String outputText, + static String toString(final String label, final String iconId, final String outputText, final int code) { - final String visual = (iconId != KeyboardIconsSet.ICON_UNDEFINED) - ? KeyboardIconsSet.getIconName(iconId) : label; + final String visual = (!Objects.equals(iconId, KeyboardIconsSet.ICON_UNDEFINED)) + ? iconId : label; final String output; if (code == Constants.CODE_OUTPUT_TEXT) { output = outputText; @@ -142,12 +143,12 @@ public final class ActualKeyboardBuilder extends AbstractKeyboardBuilder { final StringBuilder sb = new StringBuilder(); sb.append(MoreKeySpecStringizer.toString( key.getLabel(), key.getIconId(), key.getOutputText(), key.getCode())); - final MoreKeySpec[] moreKeys = key.getMoreKeys(); - if (moreKeys == null) { + final List moreKeys = key.getMoreKeys(); + if (moreKeys.isEmpty()) { return sb.toString(); } sb.append("^"); - sb.append(MoreKeySpecStringizer.STRINGIZER.join(moreKeys)); + sb.append(MoreKeySpecStringizer.STRINGIZER.join(moreKeys.toArray(new MoreKeySpec[0]))); return sb.toString(); } } diff --git a/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKey.java b/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKey.java index 8261a5b7c..9692cce6c 100644 --- a/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKey.java +++ b/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKey.java @@ -21,44 +21,45 @@ import org.futo.inputmethod.keyboard.internal.MoreKeySpec; import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import java.util.Locale; /** * This class represents an expected key. */ public class ExpectedKey { - static ExpectedKey EMPTY_KEY = newInstance(""); + static ExpectedKey EMPTY_KEY = newLabelInstance(""); // A key that has a string label and may have "more keys". - static ExpectedKey newInstance(final String label, final ExpectedKey... moreKeys) { - return newInstance(label, label, moreKeys); + static ExpectedKey newLabelInstance(final String label, final ExpectedKey... moreKeys) { + return newLabelInstance(label, label, moreKeys); } // A key that has a string label and a different output text and may have "more keys". - static ExpectedKey newInstance(final String label, final String outputText, + static ExpectedKey newLabelInstance(final String label, final String outputText, final ExpectedKey... moreKeys) { return newInstance(ExpectedKeyVisual.newInstance(label), ExpectedKeyOutput.newInstance(outputText), moreKeys); } // A key that has a string label and a code point output and may have "more keys". - static ExpectedKey newInstance(final String label, final int code, + static ExpectedKey newLabelInstance(final String label, final int code, final ExpectedKey... moreKeys) { return newInstance(ExpectedKeyVisual.newInstance(label), ExpectedKeyOutput.newInstance(code), moreKeys); } // A key that has an icon and an output text and may have "more keys". - static ExpectedKey newInstance(final int iconId, final String outputText, + static ExpectedKey newIconInstance(final String iconId, final String outputText, final ExpectedKey... moreKeys) { - return newInstance(ExpectedKeyVisual.newInstance(iconId), + return newInstance(ExpectedKeyVisual.newIconInstance(iconId), ExpectedKeyOutput.newInstance(outputText), moreKeys); } // A key that has an icon and a code point output and may have "more keys". - static ExpectedKey newInstance(final int iconId, final int code, + static ExpectedKey newIconInstance(final String iconId, final int code, final ExpectedKey... moreKeys) { - return newInstance(ExpectedKeyVisual.newInstance(iconId), + return newInstance(ExpectedKeyVisual.newIconInstance(iconId), ExpectedKeyOutput.newInstance(code), moreKeys); } @@ -276,14 +277,14 @@ public class ExpectedKey { @Override public boolean equalsTo(final Key key) { if (getVisual().hasSameKeyVisual(key) && getOutput().hasSameKeyOutput(key)) { - final MoreKeySpec[] moreKeySpecs = key.getMoreKeys(); + final List moreKeySpecs = key.getMoreKeys(); final ExpectedKey[] moreKeys = getMoreKeys(); // This key should have at least one "more key". - if (moreKeySpecs == null || moreKeySpecs.length != moreKeys.length) { + if (moreKeySpecs == null || moreKeySpecs.size() != moreKeys.length) { return false; } - for (int index = 0; index < moreKeySpecs.length; index++) { - if (!moreKeys[index].equalsTo(moreKeySpecs[index])) { + for (int index = 0; index < moreKeySpecs.size(); index++) { + if (!moreKeys[index].equalsTo(moreKeySpecs.get(index))) { return false; } } diff --git a/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java b/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java index dc83e0424..7f6c2c658 100644 --- a/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java +++ b/tests/src/org/futo/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java @@ -121,7 +121,7 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder { private static final String TYPE_TEST = "test"; private static final PhonyDictionary DICTIONARY_TEST = new PhonyDictionary(TYPE_TEST); + protected LatinIME mLatinIME; protected LatinIMELegacy mLatinIMELegacy; protected Keyboard mKeyboard; protected MyEditText mEditText; @@ -84,6 +85,9 @@ public class InputTestsBase extends ServiceTestCase { public InputTestsBase(Class serviceClass) { super(serviceClass); } + public InputTestsBase() { + super(LatinIME.class); + } // A helper class to ease span tests public static class SpanGetter { @@ -380,7 +384,7 @@ public class InputTestsBase extends ServiceTestCase { // TODO: Use {@link InputMethodSubtype.InputMethodSubtypeBuilder} directly or indirectly so // that {@link InputMethodSubtype#isAsciiCapable} can return the correct value. final String EXTRA_VALUE_FOR_TEST = - "KeyboardLayoutSet=" + SubtypeLocaleUtils.QWERTY + "KeyboardLayoutSetV2=" + SubtypeLocaleUtils.QWERTY + "," + Constants.Subtype.ExtraValue.ASCII_CAPABLE + "," + Constants.Subtype.ExtraValue.ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE + "," + Constants.Subtype.ExtraValue.EMOJI_CAPABLE diff --git a/tests/src/org/futo/inputmethod/latin/PunctuationTests.java b/tests/src/org/futo/inputmethod/latin/PunctuationTests.java index 8093909e9..204e55bd2 100644 --- a/tests/src/org/futo/inputmethod/latin/PunctuationTests.java +++ b/tests/src/org/futo/inputmethod/latin/PunctuationTests.java @@ -29,7 +29,7 @@ public class PunctuationTests extends InputTestsBase { final String PUNCTUATION_FROM_STRIP = "!"; final String EXPECTED_RESULT = "this!! "; final boolean defaultNextWordPredictionOption = - mLatinIMELegacy.getResources().getBoolean(R.bool.config_default_next_word_prediction); + mLatinIME.getResources().getBoolean(R.bool.config_default_next_word_prediction); final boolean previousNextWordPredictionOption = setBooleanPreference(NEXT_WORD_PREDICTION_OPTION, false, defaultNextWordPredictionOption); diff --git a/tests/src/org/futo/inputmethod/latin/RichInputMethodSubtypeTests.java b/tests/src/org/futo/inputmethod/latin/RichInputMethodSubtypeTests.java index a82f76aa2..fbdbac797 100644 --- a/tests/src/org/futo/inputmethod/latin/RichInputMethodSubtypeTests.java +++ b/tests/src/org/futo/inputmethod/latin/RichInputMethodSubtypeTests.java @@ -93,7 +93,7 @@ public class RichInputMethodSubtypeTests { AdditionalSubtypeUtils.createAdditionalSubtypesArray( AdditionalSubtypeUtils.createPrefSubtypes( mRes.getStringArray(R.array.predefined_subtypes))); - mRichImm.setAdditionalInputMethodSubtypes(predefinedAddtionalSubtypes); + //mRichImm.setAdditionalInputMethodSubtypes(predefinedAddtionalSubtypes); final InputMethodInfo imi = mRichImm.getInputMethodInfoOfThisIme(); final int subtypeCount = imi.getSubtypeCount(); @@ -102,27 +102,27 @@ public class RichInputMethodSubtypeTests { mSubtypesList.add(new RichInputMethodSubtype(subtype)); } - EN_US = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + EN_US = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( Locale.US.toString(), "qwerty")); - EN_GB = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + EN_GB = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( Locale.UK.toString(), "qwerty")); - ES_US = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + ES_US = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( "es_US", "spanish")); - FR = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + FR = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( Locale.FRENCH.toString(), "azerty")); - FR_CA = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + FR_CA = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( Locale.CANADA_FRENCH.toString(), "qwerty")); - FR_CH = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + FR_CH = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( "fr_CH", "swiss")); - DE = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + DE = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( Locale.GERMAN.toString(), "qwertz")); - DE_CH = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + DE_CH = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( "de_CH", "swiss")); - HI = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + HI = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( "hi", "hindi")); - SR = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + SR = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( "sr", "south_slavic")); - ZZ = new RichInputMethodSubtype(mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + ZZ = new RichInputMethodSubtype(Subtypes.INSTANCE.makeSubtype( SubtypeLocaleUtils.NO_LANGUAGE, "qwerty")); DE_QWERTY = new RichInputMethodSubtype( AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( @@ -146,7 +146,7 @@ public class RichInputMethodSubtypeTests { AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( SubtypeLocaleUtils.NO_LANGUAGE, "pcqwerty")); - final InputMethodSubtype hiLatn = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype hiLatn = Subtypes.INSTANCE.makeSubtype( "hi_ZZ", "qwerty"); if (hiLatn != null) { HI_LATN = new RichInputMethodSubtype(hiLatn); @@ -154,7 +154,7 @@ public class RichInputMethodSubtypeTests { AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( "hi_ZZ", "dvorak")); } - final InputMethodSubtype srLatn = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype srLatn = Subtypes.INSTANCE.makeSubtype( "sr_ZZ", "serbian_qwertz"); if (srLatn != null) { SR_LATN = new RichInputMethodSubtype(srLatn); @@ -167,7 +167,7 @@ public class RichInputMethodSubtypeTests { @After public void tearDown() throws Exception { // Restore additional subtypes. - mRichImm.setAdditionalInputMethodSubtypes(mSavedAddtionalSubtypes); + //mRichImm.setAdditionalInputMethodSubtypes(mSavedAddtionalSubtypes); } @Test diff --git a/tests/src/org/futo/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java b/tests/src/org/futo/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java index 4c0dbc967..5f358ca02 100644 --- a/tests/src/org/futo/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java +++ b/tests/src/org/futo/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java @@ -56,7 +56,7 @@ public class AdditionalSubtypeUtilsTests { * final int SUBTYPE_ID_EN_US_DVORAK = Arrays.hashCode(new Object[] { * "en_US", * "keyboard", - * "KeyboardLayoutSet=dvorak" + * "KeyboardLayoutSetV2=dvorak" * + ",AsciiCapable" * + ",UntranslatableReplacementStringInSubtypeName=Dvorak" * + ",EmojiCapable" @@ -67,16 +67,16 @@ public class AdditionalSubtypeUtilsTests { */ private static int SUBTYPE_ID_EN_US_DVORAK = 0xb3c0cc56; private static String EXTRA_VALUE_EN_US_DVORAK_ICS = - "KeyboardLayoutSet=dvorak" + + "KeyboardLayoutSetV2=dvorak" + ",AsciiCapable" + ",isAdditionalSubtype"; private static String EXTRA_VALUE_EN_US_DVORAK_JELLY_BEAN = - "KeyboardLayoutSet=dvorak" + + "KeyboardLayoutSetV2=dvorak" + ",AsciiCapable" + ",UntranslatableReplacementStringInSubtypeName=Dvorak" + ",isAdditionalSubtype"; private static String EXTRA_VALUE_EN_US_DVORAK_KITKAT = - "KeyboardLayoutSet=dvorak" + + "KeyboardLayoutSetV2=dvorak" + ",AsciiCapable" + ",UntranslatableReplacementStringInSubtypeName=Dvorak" + ",EmojiCapable" + @@ -90,7 +90,7 @@ public class AdditionalSubtypeUtilsTests { * final int SUBTYPE_ID_ZZ_AZERTY = Arrays.hashCode(new Object[] { * "zz", * "keyboard", - * "KeyboardLayoutSet=azerty" + * "KeyboardLayoutSetV2=azerty" * + ",AsciiCapable" * + ",EmojiCapable" * + ",isAdditionalSubtype", @@ -100,11 +100,11 @@ public class AdditionalSubtypeUtilsTests { */ private static int SUBTYPE_ID_ZZ_AZERTY = 0x5b6be697; private static String EXTRA_VALUE_ZZ_AZERTY_ICS = - "KeyboardLayoutSet=azerty" + + "KeyboardLayoutSetV2=azerty" + ",AsciiCapable" + ",isAdditionalSubtype"; private static String EXTRA_VALUE_ZZ_AZERTY_KITKAT = - "KeyboardLayoutSet=azerty" + + "KeyboardLayoutSetV2=azerty" + ",AsciiCapable" + ",EmojiCapable" + ",isAdditionalSubtype"; diff --git a/tests/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtilsTests.java b/tests/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtilsTests.java deleted file mode 100644 index 687d230d9..000000000 --- a/tests/src/org/futo/inputmethod/latin/utils/ImportantNoticeUtilsTests.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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 org.futo.inputmethod.latin.utils; - -import static org.futo.inputmethod.latin.utils.ImportantNoticeUtils.KEY_TIMESTAMP_OF_CONTACTS_NOTICE; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.when; - -import android.content.Context; -import android.content.SharedPreferences; - -import androidx.test.InstrumentationRegistry; -import androidx.test.filters.MediumTest; -import androidx.test.runner.AndroidJUnit4; - -import org.futo.inputmethod.latin.settings.SettingsValues; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; - -@MediumTest -@RunWith(AndroidJUnit4.class) -public class ImportantNoticeUtilsTests { - - private ImportantNoticePreferences mImportantNoticePreferences; - - @Mock private SettingsValues mMockSettingsValues; - - private Context getContext() { - return InstrumentationRegistry.getTargetContext(); - } - - private static class ImportantNoticePreferences { - private final SharedPreferences mPref; - - private Long mLastTime; - - public ImportantNoticePreferences(final Context context) { - mPref = ImportantNoticeUtils.getImportantNoticePreferences(context); - } - - private Integer getInt(final String key) { - if (mPref.contains(key)) { - return mPref.getInt(key, 0); - } - return null; - } - - public Long getLong(final String key) { - if (mPref.contains(key)) { - return mPref.getLong(key, 0); - } - return null; - } - - private void putInt(final String key, final Integer value) { - if (value == null) { - removePreference(key); - } else { - mPref.edit().putInt(key, value).apply(); - } - } - - private void putLong(final String key, final Long value) { - if (value == null) { - removePreference(key); - } else { - mPref.edit().putLong(key, value).apply(); - } - } - - private void removePreference(final String key) { - mPref.edit().remove(key).apply(); - } - - public void save() { - mLastTime = getLong(KEY_TIMESTAMP_OF_CONTACTS_NOTICE); - } - - public void restore() { - putLong(KEY_TIMESTAMP_OF_CONTACTS_NOTICE, mLastTime); - } - - public void clear() { - removePreference(KEY_TIMESTAMP_OF_CONTACTS_NOTICE); - } - } - - @Before - public void setUp() throws Exception { - MockitoAnnotations.initMocks(this); - mImportantNoticePreferences = new ImportantNoticePreferences(getContext()); - mImportantNoticePreferences.save(); - when(mMockSettingsValues.isPersonalizationEnabled()).thenReturn(true); - } - - @After - public void tearDown() throws Exception { - mImportantNoticePreferences.restore(); - } - - @Test - public void testPersonalizationSetting() { - mImportantNoticePreferences.clear(); - - // Personalization enabled. - when(mMockSettingsValues.isPersonalizationEnabled()).thenReturn(true); - assertEquals("Current boolean with personalization enabled", true, - ImportantNoticeUtils.shouldShowImportantNotice(getContext(), mMockSettingsValues)); - - // Personalization disabled. - when(mMockSettingsValues.isPersonalizationEnabled()).thenReturn(false); - assertEquals("Current boolean with personalization disabled", false, - ImportantNoticeUtils.shouldShowImportantNotice(getContext(), mMockSettingsValues)); - } -} diff --git a/tests/src/org/futo/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java b/tests/src/org/futo/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java index 4705455a3..e64c4eb56 100644 --- a/tests/src/org/futo/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java +++ b/tests/src/org/futo/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java @@ -31,6 +31,7 @@ import androidx.test.runner.AndroidJUnit4; import org.futo.inputmethod.latin.RichInputMethodManager; import org.futo.inputmethod.latin.RichInputMethodSubtype; +import org.futo.inputmethod.latin.Subtypes; import org.futo.inputmethod.latin.utils.AdditionalSubtypeUtils; import org.futo.inputmethod.latin.utils.LanguageOnSpacebarUtils; import org.futo.inputmethod.latin.utils.SubtypeLocaleUtils; @@ -81,7 +82,7 @@ public class LanguageOnSpacebarUtilsTests { @Nonnull private RichInputMethodSubtype findSubtypeOf(final String localeString, final String keyboardLayoutSetName) { - final InputMethodSubtype subtype = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + final InputMethodSubtype subtype = Subtypes.INSTANCE.makeSubtype( localeString, keyboardLayoutSetName); if (subtype == null) { throw new RuntimeException("Can't find subtype of " + localeString + " with " diff --git a/tests/src/org/futo/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java b/tests/src/org/futo/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java index 4af58b6e6..a85e19e83 100644 --- a/tests/src/org/futo/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java +++ b/tests/src/org/futo/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java @@ -34,6 +34,7 @@ import org.futo.inputmethod.latin.R; import org.futo.inputmethod.latin.RichInputMethodManager; import org.futo.inputmethod.latin.RichInputMethodSubtype; +import org.futo.inputmethod.latin.Subtypes; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -90,7 +91,7 @@ public class SubtypeLocaleUtilsTests { AdditionalSubtypeUtils.createAdditionalSubtypesArray( AdditionalSubtypeUtils.createPrefSubtypes( mRes.getStringArray(R.array.predefined_subtypes))); - mRichImm.setAdditionalInputMethodSubtypes(predefinedAddtionalSubtypes); + //mRichImm.setAdditionalInputMethodSubtypes(predefinedAddtionalSubtypes); final InputMethodInfo imi = mRichImm.getInputMethodInfoOfThisIme(); final int subtypeCount = imi.getSubtypeCount(); @@ -99,51 +100,51 @@ public class SubtypeLocaleUtilsTests { mSubtypesList.add(new RichInputMethodSubtype(subtype)); } - EN_US = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + EN_US = Subtypes.INSTANCE.makeSubtype( Locale.US.toString(), "qwerty"); - EN_GB = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + EN_GB = Subtypes.INSTANCE.makeSubtype( Locale.UK.toString(), "qwerty"); - ES_US = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + ES_US = Subtypes.INSTANCE.makeSubtype( "es_US", "spanish"); - FR = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + FR = Subtypes.INSTANCE.makeSubtype( Locale.FRENCH.toString(), "azerty"); - FR_CA = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + FR_CA = Subtypes.INSTANCE.makeSubtype( Locale.CANADA_FRENCH.toString(), "qwerty"); - FR_CH = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + FR_CH = Subtypes.INSTANCE.makeSubtype( "fr_CH", "swiss"); - DE = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + DE = Subtypes.INSTANCE.makeSubtype( Locale.GERMAN.toString(), "qwertz"); - DE_CH = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + DE_CH = Subtypes.INSTANCE.makeSubtype( "de_CH", "swiss"); - HI = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + HI = Subtypes.INSTANCE.makeSubtype( "hi", "hindi"); - SR = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + SR = Subtypes.INSTANCE.makeSubtype( "sr", "south_slavic"); - ZZ = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet( + ZZ = Subtypes.INSTANCE.makeSubtype( SubtypeLocaleUtils.NO_LANGUAGE, "qwerty"); - DE_QWERTY = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + DE_QWERTY = Subtypes.INSTANCE.makeSubtype( Locale.GERMAN.toString(), "qwerty"); - FR_QWERTZ = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + FR_QWERTZ = Subtypes.INSTANCE.makeSubtype( Locale.FRENCH.toString(), "qwertz"); - EN_US_AZERTY = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + EN_US_AZERTY = Subtypes.INSTANCE.makeSubtype( Locale.US.toString(), "azerty"); - EN_UK_DVORAK = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + EN_UK_DVORAK = Subtypes.INSTANCE.makeSubtype( Locale.UK.toString(), "dvorak"); - ES_US_COLEMAK = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + ES_US_COLEMAK = Subtypes.INSTANCE.makeSubtype( "es_US", "colemak"); - ZZ_AZERTY = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + ZZ_AZERTY = Subtypes.INSTANCE.makeSubtype( SubtypeLocaleUtils.NO_LANGUAGE, "azerty"); - ZZ_PC = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + ZZ_PC = Subtypes.INSTANCE.makeSubtype( SubtypeLocaleUtils.NO_LANGUAGE, "pcqwerty"); - HI_LATN = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet("hi_ZZ", "qwerty"); + HI_LATN = Subtypes.INSTANCE.makeSubtype("hi_ZZ", "qwerty"); if (HI_LATN != null) { - HI_LATN_DVORAK = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + HI_LATN_DVORAK = Subtypes.INSTANCE.makeSubtype( "hi_ZZ", "dvorak"); } - SR_LATN = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet("sr_ZZ", "serbian_qwertz"); + SR_LATN = Subtypes.INSTANCE.makeSubtype("sr_ZZ", "serbian_qwertz"); if (SR_LATN != null) { - SR_LATN_QWERTY = AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype( + SR_LATN_QWERTY = Subtypes.INSTANCE.makeSubtype( "sr_ZZ", "qwerty"); } } @@ -151,7 +152,7 @@ public class SubtypeLocaleUtilsTests { @After public void tearDown() throws Exception { // Restore additional subtypes. - mRichImm.setAdditionalInputMethodSubtypes(mSavedAddtionalSubtypes); + //mRichImm.setAdditionalInputMethodSubtypes(mSavedAddtionalSubtypes); } @Test @@ -473,14 +474,11 @@ public class SubtypeLocaleUtilsTests { @Test public void testIsRtlLanguage() { // Known Right-to-Left language subtypes. - final InputMethodSubtype ARABIC = mRichImm - .findSubtypeByLocaleAndKeyboardLayoutSet("ar", "arabic"); + final InputMethodSubtype ARABIC = Subtypes.INSTANCE.makeSubtype("ar", "arabic"); assertNotNull("Arabic", ARABIC); - final InputMethodSubtype FARSI = mRichImm - .findSubtypeByLocaleAndKeyboardLayoutSet("fa", "farsi"); + final InputMethodSubtype FARSI = Subtypes.INSTANCE.makeSubtype("fa", "farsi"); assertNotNull("Farsi", FARSI); - final InputMethodSubtype HEBREW = mRichImm - .findSubtypeByLocaleAndKeyboardLayoutSet("iw", "hebrew"); + final InputMethodSubtype HEBREW = Subtypes.INSTANCE.makeSubtype("iw", "hebrew"); assertNotNull("Hebrew", HEBREW); for (final RichInputMethodSubtype subtype : mSubtypesList) {