From e9a0e66716dab4dd3184d009d8920de1961efdfa Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Mon, 16 Dec 2024 21:45:41 -0500 Subject: Rename to Kelar Keyboard (org.kelar.inputmethod.latin) --- Android.bp | 28 +- build.gradle | 7 +- .../annotations/ExternallyReferenced.java | 24 - .../inputmethod/annotations/UsedForTesting.java | 24 - .../inputmethod/latin/common/CodePointUtils.java | 117 - .../inputmethod/latin/common/CollectionUtils.java | 77 - .../inputmethod/latin/common/ComposedData.java | 66 - .../inputmethod/latin/common/Constants.java | 335 -- .../inputmethod/latin/common/CoordinateUtils.java | 94 - .../inputmethod/latin/common/FileUtils.java | 61 - .../inputmethod/latin/common/InputPointers.java | 166 - .../inputmethod/latin/common/LocaleUtils.java | 210 - .../latin/common/NativeSuggestOptions.java | 63 - .../latin/common/ResizableIntArray.java | 162 - .../inputmethod/latin/common/StringUtils.java | 704 ---- .../inputmethod/latin/common/UnicodeSurrogate.java | 38 - .../annotations/ExternallyReferenced.java | 24 + .../inputmethod/annotations/UsedForTesting.java | 24 + .../inputmethod/latin/common/CodePointUtils.java | 117 + .../inputmethod/latin/common/CollectionUtils.java | 77 + .../inputmethod/latin/common/ComposedData.java | 66 + .../kelar/inputmethod/latin/common/Constants.java | 339 ++ .../inputmethod/latin/common/CoordinateUtils.java | 94 + .../kelar/inputmethod/latin/common/FileUtils.java | 61 + .../inputmethod/latin/common/InputPointers.java | 166 + .../inputmethod/latin/common/LocaleUtils.java | 210 + .../latin/common/NativeSuggestOptions.java | 63 + .../latin/common/ResizableIntArray.java | 162 + .../inputmethod/latin/common/StringUtils.java | 704 ++++ .../inputmethod/latin/common/UnicodeSurrogate.java | 38 + java/AndroidManifest.xml | 32 +- java/AndroidManifest_SdkVersion.xml | 2 +- java/lint-baseline.xml | 14 +- java/proguard.flags | 20 +- java/res/drawable/keyboard_key_feedback_ics.xml | 2 +- java/res/drawable/keyboard_key_feedback_klp.xml | 2 +- .../drawable/keyboard_key_feedback_lxx_dark.xml | 2 +- .../drawable/keyboard_key_feedback_lxx_light.xml | 2 +- java/res/layout/dictionary_line.xml | 6 +- java/res/layout/emoji_keyboard_page.xml | 2 +- java/res/layout/emoji_palettes_view.xml | 6 +- java/res/layout/input_view.xml | 4 +- java/res/layout/main_keyboard_frame.xml | 4 +- java/res/layout/more_keys_keyboard.xml | 2 +- .../layout/more_keys_keyboard_for_action_lxx.xml | 2 +- java/res/layout/more_suggestions.xml | 4 +- java/res/layout/setup_start_indicator_label.xml | 4 +- java/res/layout/setup_steps_cards.xml | 2 +- java/res/layout/setup_welcome_video.xml | 2 +- java/res/values-en-rAU/strings-appname.xml | 8 +- java/res/values-en-rCA/strings-appname.xml | 8 +- java/res/values-en-rGB/strings-appname.xml | 8 +- java/res/values-en-rIN/strings-appname.xml | 8 +- java/res/values-en-rXC/strings-appname.xml | 8 +- java/res/values-fa/strings-appname.xml | 8 +- .../values-sw600dp/touch-position-correction.xml | 6 +- java/res/values-tl/strings-appname.xml | 8 +- java/res/values/attrs.xml | 30 +- java/res/values/dictionary-pack.xml | 6 +- java/res/values/donottranslate-debug-settings.xml | 4 +- java/res/values/donottranslate.xml | 2 +- java/res/values/keyboard-themes.xml | 2 +- .../phantom-sudden-move-event-device-list.xml | 2 +- java/res/values/strings-appname.xml | 16 +- java/res/values/strings.xml | 18 +- java/res/values/themes-common.xml | 6 +- java/res/values/themes-ics.xml | 6 +- java/res/values/themes-klp.xml | 6 +- java/res/values/themes-lxx-dark.xml | 6 +- java/res/values/themes-lxx-light.xml | 6 +- java/res/values/touch-position-correction.xml | 4 +- java/res/xml-land/kbd_number.xml | 2 +- java/res/xml-land/kbd_phone.xml | 2 +- java/res/xml-land/kbd_phone_symbols.xml | 2 +- .../kbd_more_keys_keyboard_template.xml | 2 +- java/res/xml-sw600dp-land/kbd_number.xml | 2 +- java/res/xml-sw600dp-land/kbd_phone.xml | 2 +- java/res/xml-sw600dp-land/kbd_phone_symbols.xml | 2 +- java/res/xml-sw600dp-land/key_space_3kw.xml | 2 +- java/res/xml-sw600dp-land/row_qwerty4.xml | 2 +- java/res/xml-sw600dp-land/rows_qwerty.xml | 2 +- .../kbd_more_keys_keyboard_template.xml | 2 +- java/res/xml-sw600dp/kbd_number.xml | 2 +- java/res/xml-sw600dp/kbd_phone.xml | 2 +- java/res/xml-sw600dp/kbd_phone_symbols.xml | 2 +- java/res/xml-sw600dp/key_comma.xml | 2 +- java/res/xml-sw600dp/key_period.xml | 2 +- java/res/xml-sw600dp/key_settings.xml | 2 +- java/res/xml-sw600dp/key_space_3kw.xml | 2 +- java/res/xml-sw600dp/key_space_7kw.xml | 2 +- java/res/xml-sw600dp/key_space_symbols.xml | 2 +- java/res/xml-sw600dp/key_styles_common.xml | 2 +- java/res/xml-sw600dp/key_styles_enter.xml | 2 +- java/res/xml-sw600dp/keys_arabic3_left.xml | 2 +- java/res/xml-sw600dp/keys_dvorak_123.xml | 2 +- java/res/xml-sw600dp/keys_exclamation_question.xml | 2 +- java/res/xml-sw600dp/keys_farsi3_right.xml | 2 +- java/res/xml-sw600dp/keys_pcqwerty2_right3.xml | 2 +- java/res/xml-sw600dp/keys_pcqwerty3_right2.xml | 2 +- java/res/xml-sw600dp/keys_pcqwerty4_right3.xml | 2 +- java/res/xml-sw600dp/row_pcqwerty5.xml | 2 +- java/res/xml-sw600dp/row_qwerty4.xml | 2 +- java/res/xml-sw600dp/rowkeys_dvorak3.xml | 2 +- java/res/xml-sw600dp/rowkeys_pcqwerty1.xml | 2 +- java/res/xml-sw600dp/rows_arabic.xml | 2 +- java/res/xml-sw600dp/rows_armenian_phonetic.xml | 2 +- java/res/xml-sw600dp/rows_azerty.xml | 2 +- java/res/xml-sw600dp/rows_bengali.xml | 2 +- java/res/xml-sw600dp/rows_bengali_akkhor.xml | 2 +- java/res/xml-sw600dp/rows_bulgarian.xml | 2 +- java/res/xml-sw600dp/rows_bulgarian_bds.xml | 2 +- java/res/xml-sw600dp/rows_colemak.xml | 2 +- java/res/xml-sw600dp/rows_dvorak.xml | 2 +- java/res/xml-sw600dp/rows_east_slavic.xml | 2 +- java/res/xml-sw600dp/rows_farsi.xml | 2 +- java/res/xml-sw600dp/rows_georgian.xml | 2 +- java/res/xml-sw600dp/rows_greek.xml | 2 +- java/res/xml-sw600dp/rows_hebrew.xml | 2 +- java/res/xml-sw600dp/rows_hindi.xml | 2 +- java/res/xml-sw600dp/rows_hindi_compact.xml | 2 +- java/res/xml-sw600dp/rows_kannada.xml | 2 +- java/res/xml-sw600dp/rows_khmer.xml | 2 +- java/res/xml-sw600dp/rows_lao.xml | 2 +- java/res/xml-sw600dp/rows_malayalam.xml | 2 +- java/res/xml-sw600dp/rows_marathi.xml | 2 +- java/res/xml-sw600dp/rows_mongolian.xml | 2 +- java/res/xml-sw600dp/rows_nepali_romanized.xml | 2 +- java/res/xml-sw600dp/rows_nepali_traditional.xml | 2 +- java/res/xml-sw600dp/rows_nordic.xml | 2 +- java/res/xml-sw600dp/rows_number_normal.xml | 2 +- java/res/xml-sw600dp/rows_number_password.xml | 2 +- java/res/xml-sw600dp/rows_pcqwerty.xml | 2 +- java/res/xml-sw600dp/rows_phone.xml | 2 +- java/res/xml-sw600dp/rows_qwerty.xml | 2 +- java/res/xml-sw600dp/rows_qwertz.xml | 2 +- java/res/xml-sw600dp/rows_serbian_qwertz.xml | 2 +- java/res/xml-sw600dp/rows_sinhala.xml | 2 +- java/res/xml-sw600dp/rows_south_slavic.xml | 2 +- java/res/xml-sw600dp/rows_spanish.xml | 2 +- java/res/xml-sw600dp/rows_swiss.xml | 2 +- java/res/xml-sw600dp/rows_symbols.xml | 2 +- java/res/xml-sw600dp/rows_symbols_shift.xml | 2 +- java/res/xml-sw600dp/rows_tamil.xml | 2 +- java/res/xml-sw600dp/rows_telugu.xml | 2 +- java/res/xml-sw600dp/rows_thai.xml | 2 +- java/res/xml-sw600dp/rows_uzbek.xml | 2 +- .../xml-v16/keystyle_devanagari_sign_anusvara.xml | 2 +- .../keystyle_devanagari_sign_candrabindu.xml | 2 +- .../res/xml-v16/keystyle_devanagari_sign_nukta.xml | 2 +- .../xml-v16/keystyle_devanagari_sign_virama.xml | 2 +- .../xml-v16/keystyle_devanagari_sign_visarga.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_aa.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_ai.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_au.xml | 2 +- .../keystyle_devanagari_vowel_sign_candra_e.xml | 2 +- .../keystyle_devanagari_vowel_sign_candra_o.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_e.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_i.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_ii.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_o.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_u.xml | 2 +- .../xml-v16/keystyle_devanagari_vowel_sign_uu.xml | 2 +- .../keystyle_devanagari_vowel_sign_vocalic_r.xml | 2 +- java/res/xml/kbd_arabic.xml | 2 +- java/res/xml/kbd_armenian_phonetic.xml | 2 +- java/res/xml/kbd_azerty.xml | 2 +- java/res/xml/kbd_bengali.xml | 2 +- java/res/xml/kbd_bengali_akkhor.xml | 2 +- java/res/xml/kbd_bulgarian.xml | 2 +- java/res/xml/kbd_bulgarian_bds.xml | 2 +- java/res/xml/kbd_colemak.xml | 2 +- java/res/xml/kbd_dvorak.xml | 2 +- java/res/xml/kbd_east_slavic.xml | 2 +- java/res/xml/kbd_emoji_category1.xml | 2 +- java/res/xml/kbd_emoji_category10.xml | 2 +- java/res/xml/kbd_emoji_category11.xml | 2 +- java/res/xml/kbd_emoji_category12.xml | 2 +- java/res/xml/kbd_emoji_category13.xml | 2 +- java/res/xml/kbd_emoji_category14.xml | 2 +- java/res/xml/kbd_emoji_category15.xml | 2 +- java/res/xml/kbd_emoji_category16.xml | 2 +- java/res/xml/kbd_emoji_category2.xml | 2 +- java/res/xml/kbd_emoji_category3.xml | 2 +- java/res/xml/kbd_emoji_category4.xml | 2 +- java/res/xml/kbd_emoji_category5.xml | 2 +- java/res/xml/kbd_emoji_category6.xml | 2 +- java/res/xml/kbd_emoji_category7.xml | 2 +- java/res/xml/kbd_emoji_category8.xml | 2 +- java/res/xml/kbd_emoji_category9.xml | 2 +- java/res/xml/kbd_emoji_recents.xml | 2 +- java/res/xml/kbd_farsi.xml | 2 +- java/res/xml/kbd_georgian.xml | 2 +- java/res/xml/kbd_greek.xml | 2 +- java/res/xml/kbd_hebrew.xml | 2 +- java/res/xml/kbd_hindi.xml | 2 +- java/res/xml/kbd_hindi_compact.xml | 2 +- java/res/xml/kbd_kannada.xml | 2 +- java/res/xml/kbd_khmer.xml | 2 +- java/res/xml/kbd_lao.xml | 2 +- java/res/xml/kbd_malayalam.xml | 2 +- java/res/xml/kbd_marathi.xml | 2 +- java/res/xml/kbd_mongolian.xml | 2 +- java/res/xml/kbd_more_keys_keyboard_template.xml | 2 +- java/res/xml/kbd_nepali_romanized.xml | 2 +- java/res/xml/kbd_nepali_traditional.xml | 2 +- java/res/xml/kbd_nordic.xml | 2 +- java/res/xml/kbd_number.xml | 2 +- java/res/xml/kbd_pcqwerty.xml | 2 +- java/res/xml/kbd_phone.xml | 2 +- java/res/xml/kbd_phone_symbols.xml | 2 +- java/res/xml/kbd_qwerty.xml | 2 +- java/res/xml/kbd_qwertz.xml | 2 +- java/res/xml/kbd_serbian_qwertz.xml | 2 +- java/res/xml/kbd_sinhala.xml | 2 +- java/res/xml/kbd_south_slavic.xml | 2 +- java/res/xml/kbd_spanish.xml | 2 +- java/res/xml/kbd_suggestions_pane_template.xml | 2 +- java/res/xml/kbd_swiss.xml | 2 +- java/res/xml/kbd_symbols.xml | 2 +- java/res/xml/kbd_symbols_shift.xml | 2 +- java/res/xml/kbd_tamil.xml | 2 +- java/res/xml/kbd_telugu.xml | 2 +- java/res/xml/kbd_thai.xml | 2 +- java/res/xml/kbd_uzbek.xml | 2 +- java/res/xml/key_armenian_sha.xml | 2 +- java/res/xml/key_armenian_xeh.xml | 2 +- java/res/xml/key_comma.xml | 2 +- java/res/xml/key_emoji.xml | 2 +- java/res/xml/key_period.xml | 2 +- java/res/xml/key_space_5kw.xml | 2 +- java/res/xml/key_space_symbols.xml | 2 +- java/res/xml/key_styles_actions.xml | 2 +- java/res/xml/key_styles_common.xml | 2 +- java/res/xml/key_styles_currency.xml | 2 +- java/res/xml/key_styles_currency_dollar.xml | 2 +- java/res/xml/key_styles_currency_euro.xml | 2 +- java/res/xml/key_styles_currency_generic.xml | 2 +- java/res/xml/key_styles_enter.xml | 2 +- java/res/xml/key_styles_less_greater.xml | 2 +- java/res/xml/key_styles_navigate_more_keys.xml | 2 +- java/res/xml/key_styles_number.xml | 2 +- java/res/xml/key_styles_settings.xml | 2 +- java/res/xml/key_thai_kho_khuat.xml | 2 +- java/res/xml/keyboard_layout_set_arabic.xml | 2 +- .../xml/keyboard_layout_set_armenian_phonetic.xml | 2 +- java/res/xml/keyboard_layout_set_azerty.xml | 2 +- java/res/xml/keyboard_layout_set_bengali.xml | 2 +- .../res/xml/keyboard_layout_set_bengali_akkhor.xml | 2 +- java/res/xml/keyboard_layout_set_bulgarian.xml | 2 +- java/res/xml/keyboard_layout_set_bulgarian_bds.xml | 2 +- java/res/xml/keyboard_layout_set_colemak.xml | 2 +- java/res/xml/keyboard_layout_set_dvorak.xml | 2 +- java/res/xml/keyboard_layout_set_east_slavic.xml | 2 +- java/res/xml/keyboard_layout_set_emoji.xml | 2 +- java/res/xml/keyboard_layout_set_farsi.xml | 2 +- java/res/xml/keyboard_layout_set_georgian.xml | 2 +- java/res/xml/keyboard_layout_set_greek.xml | 2 +- java/res/xml/keyboard_layout_set_hebrew.xml | 2 +- java/res/xml/keyboard_layout_set_hindi.xml | 2 +- java/res/xml/keyboard_layout_set_hindi_compact.xml | 2 +- java/res/xml/keyboard_layout_set_kannada.xml | 2 +- java/res/xml/keyboard_layout_set_khmer.xml | 2 +- java/res/xml/keyboard_layout_set_lao.xml | 2 +- java/res/xml/keyboard_layout_set_malayalam.xml | 2 +- java/res/xml/keyboard_layout_set_marathi.xml | 2 +- java/res/xml/keyboard_layout_set_mongolian.xml | 2 +- .../xml/keyboard_layout_set_nepali_romanized.xml | 2 +- .../xml/keyboard_layout_set_nepali_traditional.xml | 2 +- java/res/xml/keyboard_layout_set_nordic.xml | 2 +- java/res/xml/keyboard_layout_set_pcqwerty.xml | 2 +- java/res/xml/keyboard_layout_set_qwerty.xml | 2 +- java/res/xml/keyboard_layout_set_qwertz.xml | 2 +- .../res/xml/keyboard_layout_set_serbian_qwertz.xml | 2 +- java/res/xml/keyboard_layout_set_sinhala.xml | 2 +- java/res/xml/keyboard_layout_set_south_slavic.xml | 2 +- java/res/xml/keyboard_layout_set_spanish.xml | 2 +- java/res/xml/keyboard_layout_set_swiss.xml | 2 +- java/res/xml/keyboard_layout_set_tamil.xml | 2 +- java/res/xml/keyboard_layout_set_telugu.xml | 2 +- java/res/xml/keyboard_layout_set_thai.xml | 2 +- java/res/xml/keyboard_layout_set_uzbek.xml | 2 +- java/res/xml/keys_arabic3_left.xml | 2 +- java/res/xml/keys_curly_brackets.xml | 2 +- java/res/xml/keys_dvorak_123.xml | 2 +- java/res/xml/keys_farsi3_right.xml | 2 +- java/res/xml/keys_parentheses.xml | 2 +- java/res/xml/keys_pcqwerty2_right3.xml | 2 +- java/res/xml/keys_pcqwerty3_right2.xml | 2 +- java/res/xml/keys_pcqwerty4_right3.xml | 2 +- java/res/xml/keys_square_brackets.xml | 2 +- java/res/xml/keystyle_devanagari_sign_anusvara.xml | 2 +- .../xml/keystyle_devanagari_sign_candrabindu.xml | 2 +- java/res/xml/keystyle_devanagari_sign_nukta.xml | 2 +- java/res/xml/keystyle_devanagari_sign_virama.xml | 2 +- java/res/xml/keystyle_devanagari_sign_visarga.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_aa.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_ai.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_au.xml | 2 +- .../keystyle_devanagari_vowel_sign_candra_e.xml | 2 +- .../keystyle_devanagari_vowel_sign_candra_o.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_e.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_i.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_ii.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_o.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_u.xml | 2 +- java/res/xml/keystyle_devanagari_vowel_sign_uu.xml | 2 +- .../keystyle_devanagari_vowel_sign_vocalic_r.xml | 2 +- java/res/xml/method.xml | 2 +- java/res/xml/prefs.xml | 14 +- java/res/xml/prefs_screen_accounts.xml | 2 +- java/res/xml/prefs_screen_advanced.xml | 10 +- java/res/xml/prefs_screen_appearance.xml | 4 +- java/res/xml/prefs_screen_correction.xml | 2 +- java/res/xml/prefs_screen_debug.xml | 16 +- java/res/xml/prefs_screen_preferences.xml | 2 +- java/res/xml/prefs_screen_theme.xml | 2 +- java/res/xml/row_pcqwerty5.xml | 2 +- java/res/xml/row_qwerty4.xml | 2 +- java/res/xml/row_symbols4.xml | 2 +- java/res/xml/row_symbols_shift4.xml | 2 +- java/res/xml/rowkeys_arabic1.xml | 2 +- java/res/xml/rowkeys_arabic2.xml | 2 +- java/res/xml/rowkeys_arabic3.xml | 2 +- java/res/xml/rowkeys_armenian_phonetic1.xml | 2 +- java/res/xml/rowkeys_armenian_phonetic2.xml | 2 +- java/res/xml/rowkeys_armenian_phonetic3.xml | 2 +- java/res/xml/rowkeys_armenian_phonetic4.xml | 2 +- java/res/xml/rowkeys_azerty1.xml | 2 +- java/res/xml/rowkeys_azerty2.xml | 2 +- java/res/xml/rowkeys_azerty3.xml | 2 +- java/res/xml/rowkeys_bengali1.xml | 2 +- java/res/xml/rowkeys_bengali2.xml | 2 +- java/res/xml/rowkeys_bengali3.xml | 2 +- java/res/xml/rowkeys_bengali_akkhor1.xml | 2 +- java/res/xml/rowkeys_bengali_akkhor2.xml | 2 +- java/res/xml/rowkeys_bengali_akkhor3.xml | 2 +- java/res/xml/rowkeys_bulgarian1.xml | 2 +- java/res/xml/rowkeys_bulgarian2.xml | 2 +- java/res/xml/rowkeys_bulgarian3.xml | 2 +- java/res/xml/rowkeys_bulgarian_bds1.xml | 2 +- java/res/xml/rowkeys_bulgarian_bds2.xml | 2 +- java/res/xml/rowkeys_bulgarian_bds3.xml | 2 +- java/res/xml/rowkeys_colemak1.xml | 2 +- java/res/xml/rowkeys_colemak2.xml | 2 +- java/res/xml/rowkeys_colemak3.xml | 2 +- java/res/xml/rowkeys_dvorak1.xml | 2 +- java/res/xml/rowkeys_dvorak2.xml | 2 +- java/res/xml/rowkeys_dvorak3.xml | 2 +- java/res/xml/rowkeys_east_slavic1.xml | 2 +- java/res/xml/rowkeys_east_slavic2.xml | 2 +- java/res/xml/rowkeys_east_slavic3.xml | 2 +- java/res/xml/rowkeys_farsi1.xml | 2 +- java/res/xml/rowkeys_farsi2.xml | 2 +- java/res/xml/rowkeys_farsi3.xml | 2 +- java/res/xml/rowkeys_georgian1.xml | 2 +- java/res/xml/rowkeys_georgian2.xml | 2 +- java/res/xml/rowkeys_georgian3.xml | 2 +- java/res/xml/rowkeys_greek1.xml | 2 +- java/res/xml/rowkeys_greek2.xml | 2 +- java/res/xml/rowkeys_greek3.xml | 2 +- java/res/xml/rowkeys_hebrew1.xml | 2 +- java/res/xml/rowkeys_hebrew2.xml | 2 +- java/res/xml/rowkeys_hebrew3.xml | 2 +- java/res/xml/rowkeys_hindi1.xml | 2 +- java/res/xml/rowkeys_hindi2.xml | 2 +- java/res/xml/rowkeys_hindi3.xml | 2 +- java/res/xml/rowkeys_hindi_compact1.xml | 2 +- java/res/xml/rowkeys_hindi_compact2.xml | 2 +- java/res/xml/rowkeys_hindi_compact3.xml | 2 +- java/res/xml/rowkeys_kannada1.xml | 2 +- java/res/xml/rowkeys_kannada2.xml | 2 +- java/res/xml/rowkeys_kannada3.xml | 2 +- java/res/xml/rowkeys_khmer1.xml | 2 +- java/res/xml/rowkeys_khmer2.xml | 2 +- java/res/xml/rowkeys_khmer3.xml | 2 +- java/res/xml/rowkeys_khmer4.xml | 2 +- java/res/xml/rowkeys_lao1.xml | 2 +- java/res/xml/rowkeys_lao2.xml | 2 +- java/res/xml/rowkeys_lao3.xml | 2 +- java/res/xml/rowkeys_lao4.xml | 2 +- java/res/xml/rowkeys_malayalam1.xml | 2 +- java/res/xml/rowkeys_malayalam2.xml | 2 +- java/res/xml/rowkeys_malayalam3.xml | 2 +- java/res/xml/rowkeys_marathi1.xml | 2 +- java/res/xml/rowkeys_marathi2.xml | 2 +- java/res/xml/rowkeys_marathi3.xml | 2 +- java/res/xml/rowkeys_mongolian1.xml | 2 +- java/res/xml/rowkeys_mongolian2.xml | 2 +- java/res/xml/rowkeys_mongolian3.xml | 2 +- java/res/xml/rowkeys_nepali_romanized1.xml | 2 +- java/res/xml/rowkeys_nepali_romanized2.xml | 2 +- java/res/xml/rowkeys_nepali_romanized3.xml | 2 +- java/res/xml/rowkeys_nepali_traditional1.xml | 2 +- java/res/xml/rowkeys_nepali_traditional2.xml | 2 +- java/res/xml/rowkeys_nepali_traditional3.xml | 2 +- java/res/xml/rowkeys_nordic1.xml | 2 +- java/res/xml/rowkeys_nordic2.xml | 2 +- java/res/xml/rowkeys_pcqwerty1.xml | 2 +- java/res/xml/rowkeys_pcqwerty1_shift.xml | 2 +- java/res/xml/rowkeys_pcqwerty2.xml | 2 +- java/res/xml/rowkeys_pcqwerty3.xml | 2 +- java/res/xml/rowkeys_pcqwerty4.xml | 2 +- java/res/xml/rowkeys_qwerty1.xml | 2 +- java/res/xml/rowkeys_qwerty1_left5.xml | 2 +- java/res/xml/rowkeys_qwerty1_right5.xml | 2 +- java/res/xml/rowkeys_qwerty2.xml | 2 +- java/res/xml/rowkeys_qwerty2_left5.xml | 2 +- java/res/xml/rowkeys_qwerty2_right4.xml | 2 +- java/res/xml/rowkeys_qwerty3.xml | 2 +- java/res/xml/rowkeys_qwerty3_left4.xml | 2 +- java/res/xml/rowkeys_qwerty3_right3.xml | 2 +- java/res/xml/rowkeys_qwertz1.xml | 2 +- java/res/xml/rowkeys_qwertz3.xml | 2 +- java/res/xml/rowkeys_serbian_qwertz1.xml | 2 +- java/res/xml/rowkeys_serbian_qwertz2.xml | 2 +- java/res/xml/rowkeys_serbian_qwertz3.xml | 2 +- java/res/xml/rowkeys_sinhala1.xml | 2 +- java/res/xml/rowkeys_sinhala2.xml | 2 +- java/res/xml/rowkeys_sinhala3.xml | 2 +- java/res/xml/rowkeys_south_slavic1.xml | 2 +- java/res/xml/rowkeys_south_slavic2.xml | 2 +- java/res/xml/rowkeys_south_slavic3.xml | 2 +- java/res/xml/rowkeys_spanish2.xml | 2 +- java/res/xml/rowkeys_swiss1.xml | 2 +- java/res/xml/rowkeys_swiss2.xml | 2 +- java/res/xml/rowkeys_symbols1.xml | 2 +- java/res/xml/rowkeys_symbols2.xml | 2 +- java/res/xml/rowkeys_symbols3.xml | 2 +- java/res/xml/rowkeys_symbols_shift1.xml | 2 +- java/res/xml/rowkeys_symbols_shift2.xml | 2 +- java/res/xml/rowkeys_symbols_shift3.xml | 2 +- java/res/xml/rowkeys_tamil1.xml | 2 +- java/res/xml/rowkeys_tamil2.xml | 2 +- java/res/xml/rowkeys_tamil3.xml | 2 +- java/res/xml/rowkeys_telugu1.xml | 2 +- java/res/xml/rowkeys_telugu2.xml | 2 +- java/res/xml/rowkeys_telugu3.xml | 2 +- java/res/xml/rowkeys_thai1.xml | 2 +- java/res/xml/rowkeys_thai2.xml | 2 +- java/res/xml/rowkeys_thai3.xml | 2 +- java/res/xml/rowkeys_thai4.xml | 2 +- java/res/xml/rowkeys_uzbek1.xml | 2 +- java/res/xml/rowkeys_uzbek2.xml | 2 +- java/res/xml/rows_arabic.xml | 2 +- java/res/xml/rows_armenian_phonetic.xml | 2 +- java/res/xml/rows_azerty.xml | 2 +- java/res/xml/rows_bengali.xml | 2 +- java/res/xml/rows_bengali_akkhor.xml | 2 +- java/res/xml/rows_bulgarian.xml | 2 +- java/res/xml/rows_bulgarian_bds.xml | 2 +- java/res/xml/rows_colemak.xml | 2 +- java/res/xml/rows_dvorak.xml | 2 +- java/res/xml/rows_east_slavic.xml | 2 +- java/res/xml/rows_farsi.xml | 2 +- java/res/xml/rows_georgian.xml | 2 +- java/res/xml/rows_greek.xml | 2 +- java/res/xml/rows_hebrew.xml | 2 +- java/res/xml/rows_hindi.xml | 2 +- java/res/xml/rows_hindi_compact.xml | 2 +- java/res/xml/rows_kannada.xml | 2 +- java/res/xml/rows_khmer.xml | 2 +- java/res/xml/rows_lao.xml | 2 +- java/res/xml/rows_malayalam.xml | 2 +- java/res/xml/rows_marathi.xml | 2 +- java/res/xml/rows_mongolian.xml | 2 +- java/res/xml/rows_nepali_romanized.xml | 2 +- java/res/xml/rows_nepali_traditional.xml | 2 +- java/res/xml/rows_nordic.xml | 2 +- java/res/xml/rows_number.xml | 2 +- java/res/xml/rows_number_normal.xml | 2 +- java/res/xml/rows_number_password.xml | 2 +- java/res/xml/rows_pcqwerty.xml | 2 +- java/res/xml/rows_phone.xml | 2 +- java/res/xml/rows_phone_symbols.xml | 2 +- java/res/xml/rows_qwerty.xml | 2 +- java/res/xml/rows_qwertz.xml | 2 +- java/res/xml/rows_serbian_qwertz.xml | 2 +- java/res/xml/rows_sinhala.xml | 2 +- java/res/xml/rows_south_slavic.xml | 2 +- java/res/xml/rows_spanish.xml | 2 +- java/res/xml/rows_swiss.xml | 2 +- java/res/xml/rows_symbols.xml | 2 +- java/res/xml/rows_symbols_shift.xml | 2 +- java/res/xml/rows_tamil.xml | 2 +- java/res/xml/rows_telugu.xml | 2 +- java/res/xml/rows_thai.xml | 2 +- java/res/xml/rows_uzbek.xml | 2 +- java/res/xml/spellchecker.xml | 2 +- .../accessibility/AccessibilityLongPressTimer.java | 67 - .../accessibility/AccessibilityUtils.java | 266 -- .../accessibility/KeyCodeDescriptionMapper.java | 365 -- .../KeyboardAccessibilityDelegate.java | 326 -- .../KeyboardAccessibilityNodeProvider.java | 339 -- .../MainKeyboardAccessibilityDelegate.java | 293 -- .../MoreKeysKeyboardAccessibilityDelegate.java | 120 - .../compat/ActivityManagerCompatUtils.java | 46 - .../inputmethod/compat/AppWorkaroundsHelper.java | 30 - .../inputmethod/compat/AppWorkaroundsUtils.java | 60 - .../inputmethod/compat/BuildCompatUtils.java | 36 - .../inputmethod/compat/CharacterCompat.java | 47 - .../android/inputmethod/compat/CompatUtils.java | 218 - .../compat/ConnectivityManagerCompatUtils.java | 36 - .../compat/CursorAnchorInfoCompatWrapper.java | 185 - .../inputmethod/compat/EditorInfoCompatUtils.java | 98 - .../compat/InputConnectionCompatUtils.java | 64 - .../compat/InputMethodManagerCompatWrapper.java | 52 - .../compat/InputMethodServiceCompatUtils.java | 37 - .../compat/InputMethodSubtypeCompatUtils.java | 103 - .../inputmethod/compat/IntentCompatUtils.java | 35 - .../inputmethod/compat/LocaleListCompatUtils.java | 40 - .../inputmethod/compat/LocaleSpanCompatUtils.java | 218 - .../inputmethod/compat/LooperCompatUtils.java | 42 - .../compat/NotificationCompatUtils.java | 83 - .../compat/SettingsSecureCompatUtils.java | 36 - .../inputmethod/compat/SuggestionSpanUtils.java | 121 - .../compat/SuggestionsInfoCompatUtils.java | 47 - .../inputmethod/compat/TextInfoCompatUtils.java | 67 - .../inputmethod/compat/TextViewCompatUtils.java | 44 - .../compat/UserDictionaryCompatUtils.java | 49 - .../inputmethod/compat/UserManagerCompatUtils.java | 80 - .../inputmethod/compat/ViewCompatUtils.java | 70 - .../compat/ViewOutlineProviderCompatUtils.java | 43 - .../compat/ViewOutlineProviderCompatUtilsLXX.java | 72 - .../inputmethod/dictionarypack/ActionBatch.java | 625 --- .../dictionarypack/AssetFileAddress.java | 66 - .../dictionarypack/BadFormatException.java | 30 - .../inputmethod/dictionarypack/ButtonSwitcher.java | 170 - .../dictionarypack/CommonPreferences.java | 40 - .../dictionarypack/CompletedDownloadInfo.java | 36 - .../DictionaryDownloadProgressBar.java | 173 - .../DictionaryListInterfaceState.java | 85 - .../dictionarypack/DictionaryPackConstants.java | 72 - .../dictionarypack/DictionaryProvider.java | 541 --- .../dictionarypack/DictionaryService.java | 280 -- .../dictionarypack/DictionarySettingsActivity.java | 54 - .../dictionarypack/DictionarySettingsFragment.java | 438 -- .../dictionarypack/DownloadIdAndStartDate.java | 29 - .../dictionarypack/DownloadManagerWrapper.java | 112 - .../dictionarypack/DownloadOverMeteredDialog.java | 86 - .../inputmethod/dictionarypack/DownloadRecord.java | 37 - .../inputmethod/dictionarypack/EventHandler.java | 46 - .../dictionarypack/LogProblemReporter.java | 35 - .../inputmethod/dictionarypack/MD5Calculator.java | 46 - .../dictionarypack/MetadataDbHelper.java | 1155 ------ .../dictionarypack/MetadataHandler.java | 173 - .../inputmethod/dictionarypack/MetadataParser.java | 114 - .../dictionarypack/MetadataUriGetter.java | 29 - .../inputmethod/dictionarypack/PrivateLog.java | 102 - .../dictionarypack/ProblemReporter.java | 24 - .../inputmethod/dictionarypack/UpdateHandler.java | 1083 ----- .../dictionarypack/WordListMetadata.java | 135 - .../dictionarypack/WordListPreference.java | 310 -- .../com/android/inputmethod/event/Combiner.java | 51 - .../android/inputmethod/event/CombinerChain.java | 137 - .../android/inputmethod/event/DeadKeyCombiner.java | 303 -- java/src/com/android/inputmethod/event/Event.java | 319 -- .../android/inputmethod/event/EventDecoder.java | 24 - .../inputmethod/event/HardwareEventDecoder.java | 26 - .../event/HardwareKeyboardEventDecoder.java | 81 - .../inputmethod/event/InputTransaction.java | 116 - java/src/com/android/inputmethod/keyboard/Key.java | 1022 ----- .../android/inputmethod/keyboard/KeyDetector.java | 116 - .../com/android/inputmethod/keyboard/Keyboard.java | 261 -- .../keyboard/KeyboardActionListener.java | 132 - .../android/inputmethod/keyboard/KeyboardId.java | 271 -- .../inputmethod/keyboard/KeyboardLayout.java | 124 - .../inputmethod/keyboard/KeyboardLayoutSet.java | 508 --- .../inputmethod/keyboard/KeyboardSwitcher.java | 508 --- .../inputmethod/keyboard/KeyboardTheme.java | 215 - .../android/inputmethod/keyboard/KeyboardView.java | 590 --- .../inputmethod/keyboard/MainKeyboardView.java | 895 ----- .../inputmethod/keyboard/MoreKeysDetector.java | 55 - .../inputmethod/keyboard/MoreKeysKeyboard.java | 369 -- .../inputmethod/keyboard/MoreKeysKeyboardView.java | 320 -- .../inputmethod/keyboard/MoreKeysPanel.java | 136 - .../inputmethod/keyboard/PointerTracker.java | 1198 ------ .../inputmethod/keyboard/ProximityInfo.java | 405 -- .../keyboard/emoji/DynamicGridKeyboard.java | 264 -- .../inputmethod/keyboard/emoji/EmojiCategory.java | 470 --- .../emoji/EmojiCategoryPageIndicatorView.java | 70 - .../keyboard/emoji/EmojiLayoutParams.java | 94 - .../keyboard/emoji/EmojiPageKeyboardView.java | 233 -- .../keyboard/emoji/EmojiPalettesAdapter.java | 149 - .../keyboard/emoji/EmojiPalettesView.java | 486 --- .../keyboard/internal/AbstractDrawingPreview.java | 84 - .../keyboard/internal/AlphabetShiftState.java | 131 - .../keyboard/internal/BatchInputArbiter.java | 181 - .../keyboard/internal/BogusMoveEventDetector.java | 115 - .../keyboard/internal/CodesArrayParser.java | 107 - .../internal/DrawingPreviewPlacerView.java | 88 - .../keyboard/internal/DrawingProxy.java | 79 - .../keyboard/internal/GestureEnabler.java | 54 - .../GestureFloatingTextDrawingPreview.java | 184 - .../internal/GestureStrokeDrawingParams.java | 58 - .../internal/GestureStrokeDrawingPoints.java | 197 - .../internal/GestureStrokeRecognitionParams.java | 109 - .../internal/GestureStrokeRecognitionPoints.java | 334 -- .../internal/GestureTrailDrawingParams.java | 79 - .../internal/GestureTrailDrawingPoints.java | 276 -- .../internal/GestureTrailsDrawingPreview.java | 174 - .../keyboard/internal/HermiteInterpolator.java | 161 - .../keyboard/internal/KeyDrawParams.java | 167 - .../keyboard/internal/KeyPreviewChoreographer.java | 209 - .../keyboard/internal/KeyPreviewDrawParams.java | 188 - .../keyboard/internal/KeyPreviewView.java | 139 - .../keyboard/internal/KeySpecParser.java | 258 -- .../inputmethod/keyboard/internal/KeyStyle.java | 52 - .../keyboard/internal/KeyStylesSet.java | 230 -- .../keyboard/internal/KeyVisualAttributes.java | 148 - .../keyboard/internal/KeyboardBuilder.java | 889 ----- .../keyboard/internal/KeyboardCodesSet.java | 83 - .../keyboard/internal/KeyboardIconsSet.java | 167 - .../keyboard/internal/KeyboardParams.java | 193 - .../inputmethod/keyboard/internal/KeyboardRow.java | 187 - .../keyboard/internal/KeyboardState.java | 711 ---- .../keyboard/internal/KeyboardTextsSet.java | 151 - .../keyboard/internal/KeyboardTextsTable.java | 4198 -------------------- .../inputmethod/keyboard/internal/MatrixUtils.java | 166 - .../keyboard/internal/ModifierKeyState.java | 83 - .../inputmethod/keyboard/internal/MoreKeySpec.java | 355 -- .../internal/NonDistinctMultitouchHelper.java | 115 - .../keyboard/internal/PointerTrackerQueue.java | 238 -- .../inputmethod/keyboard/internal/RoundedLine.java | 113 - .../keyboard/internal/ShiftKeyState.java | 69 - .../internal/SlidingKeyInputDrawingPreview.java | 106 - .../keyboard/internal/SmoothingUtils.java | 102 - .../keyboard/internal/TimerHandler.java | 234 -- .../inputmethod/keyboard/internal/TimerProxy.java | 133 - .../keyboard/internal/TouchPositionCorrection.java | 97 - .../keyboard/internal/TypingTimeRecorder.java | 72 - .../keyboard/internal/UniqueKeysCache.java | 81 - .../inputmethod/latin/AssetFileAddress.java | 70 - .../latin/AudioAndHapticFeedbackManager.java | 134 - .../com/android/inputmethod/latin/BackupAgent.java | 57 - .../inputmethod/latin/BinaryDictionary.java | 669 ---- .../latin/BinaryDictionaryFileDumper.java | 569 --- .../inputmethod/latin/BinaryDictionaryGetter.java | 291 -- .../latin/ContactsBinaryDictionary.java | 176 - .../inputmethod/latin/ContactsContentObserver.java | 136 - .../latin/ContactsDictionaryConstants.java | 52 - .../inputmethod/latin/ContactsDictionaryUtils.java | 55 - .../android/inputmethod/latin/ContactsManager.java | 245 -- .../inputmethod/latin/DicTraverseSession.java | 98 - .../com/android/inputmethod/latin/Dictionary.java | 216 - .../inputmethod/latin/DictionaryCollection.java | 140 - .../latin/DictionaryDumpBroadcastReceiver.java | 50 - .../inputmethod/latin/DictionaryFacilitator.java | 176 - .../latin/DictionaryFacilitatorImpl.java | 736 ---- .../latin/DictionaryFacilitatorLruCache.java | 106 - .../latin/DictionaryFacilitatorProvider.java | 26 - .../inputmethod/latin/DictionaryFactory.java | 161 - .../DictionaryPackInstallBroadcastReceiver.java | 141 - .../android/inputmethod/latin/DictionaryStats.java | 103 - .../latin/EmojiAltPhysicalKeyDetector.java | 207 - .../latin/ExpandableBinaryDictionary.java | 757 ---- .../android/inputmethod/latin/InputAttributes.java | 303 -- .../com/android/inputmethod/latin/InputView.java | 252 -- .../inputmethod/latin/LastComposedWord.java | 93 - .../com/android/inputmethod/latin/LatinIME.java | 2033 ---------- .../android/inputmethod/latin/NgramContext.java | 291 -- .../inputmethod/latin/PunctuationSuggestions.java | 124 - .../latin/ReadOnlyBinaryDictionary.java | 127 - .../inputmethod/latin/RichInputConnection.java | 1033 ----- .../inputmethod/latin/RichInputMethodManager.java | 612 --- .../inputmethod/latin/RichInputMethodSubtype.java | 250 -- .../src/com/android/inputmethod/latin/Suggest.java | 434 -- .../android/inputmethod/latin/SuggestedWords.java | 448 --- .../inputmethod/latin/SystemBroadcastReceiver.java | 159 - .../inputmethod/latin/UserBinaryDictionary.java | 216 - .../android/inputmethod/latin/WordComposer.java | 481 --- .../android/inputmethod/latin/WordListInfo.java | 31 - .../inputmethod/latin/about/AboutPreferences.java | 28 - .../accounts/AccountStateChangedListener.java | 75 - .../latin/accounts/AccountsChangedReceiver.java | 81 - .../inputmethod/latin/accounts/AuthUtils.java | 67 - .../latin/accounts/LoginAccountUtils.java | 47 - .../inputmethod/latin/define/DebugFlags.java | 31 - .../latin/define/DecoderSpecificConstants.java | 38 - .../inputmethod/latin/define/JniLibName.java | 25 - .../inputmethod/latin/define/ProductionFlags.java | 58 - .../inputmethod/latin/inputlogic/InputLogic.java | 2353 ----------- .../latin/inputlogic/InputLogicHandler.java | 221 -- .../latin/inputlogic/PrivateCommandPerformer.java | 40 - .../inputmethod/latin/inputlogic/SpaceState.java | 54 - .../latin/makedict/DictionaryHeader.java | 91 - .../inputmethod/latin/makedict/FormatSpec.java | 310 -- .../inputmethod/latin/makedict/NgramProperty.java | 42 - .../latin/makedict/ProbabilityInfo.java | 87 - .../latin/makedict/UnsupportedFormatException.java | 26 - .../inputmethod/latin/makedict/WeightedString.java | 62 - .../inputmethod/latin/makedict/WordProperty.java | 201 - .../inputmethod/latin/network/AuthException.java | 35 - .../latin/network/BlockingHttpClient.java | 97 - .../inputmethod/latin/network/HttpException.java | 46 - .../latin/network/HttpUrlConnectionBuilder.java | 229 -- .../latin/permissions/PermissionsActivity.java | 97 - .../latin/permissions/PermissionsManager.java | 91 - .../latin/permissions/PermissionsUtil.java | 93 - .../latin/personalization/AccountUtils.java | 66 - .../personalization/PersonalizationHelper.java | 108 - .../personalization/UserHistoryDictionary.java | 136 - .../latin/settings/AccountsSettingsFragment.java | 508 --- .../settings/AdditionalFeaturesSettingUtils.java | 57 - .../latin/settings/AdvancedSettingsFragment.java | 264 -- .../latin/settings/AppearanceSettingsFragment.java | 46 - .../latin/settings/CorrectionSettingsFragment.java | 152 - .../latin/settings/CustomInputStylePreference.java | 341 -- .../settings/CustomInputStyleSettingsFragment.java | 318 -- .../inputmethod/latin/settings/DebugSettings.java | 53 - .../latin/settings/DebugSettingsFragment.java | 288 -- .../latin/settings/GestureSettingsFragment.java | 38 - .../latin/settings/LocalSettingsConstants.java | 61 - .../settings/PreferencesSettingsFragment.java | 104 - .../latin/settings/RadioButtonPreference.java | 97 - .../latin/settings/SeekBarDialogPreference.java | 147 - .../inputmethod/latin/settings/Settings.java | 458 --- .../latin/settings/SettingsActivity.java | 88 - .../latin/settings/SettingsFragment.java | 101 - .../inputmethod/latin/settings/SettingsValues.java | 452 --- .../settings/SettingsValuesForSuggestion.java | 25 - .../latin/settings/SpacingAndPunctuations.java | 155 - .../latin/settings/SubScreenFragment.java | 134 - .../latin/settings/TestFragmentActivity.java | 55 - .../latin/settings/ThemeSettingsFragment.java | 112 - .../latin/settings/TwoStatePreferenceHelper.java | 82 - .../inputmethod/latin/setup/SetupActivity.java | 36 - .../latin/setup/SetupStartIndicatorView.java | 123 - .../latin/setup/SetupStepIndicatorView.java | 62 - .../latin/setup/SetupWizardActivity.java | 513 --- .../spellcheck/AndroidSpellCheckerService.java | 244 -- .../spellcheck/AndroidSpellCheckerSession.java | 225 -- .../AndroidSpellCheckerSessionFactory.java | 25 - .../AndroidWordLevelSpellCheckerSession.java | 390 -- .../latin/spellcheck/SentenceLevelAdapter.java | 197 - .../spellcheck/SpellCheckerSettingsActivity.java | 61 - .../spellcheck/SpellCheckerSettingsFragment.java | 90 - .../latin/suggestions/MoreSuggestions.java | 268 -- .../latin/suggestions/MoreSuggestionsView.java | 117 - .../suggestions/SuggestionStripLayoutHelper.java | 650 --- .../latin/suggestions/SuggestionStripView.java | 491 --- .../suggestions/SuggestionStripViewAccessor.java | 27 - .../latin/touchinputconsumer/GestureConsumer.java | 69 - .../UserDictionaryAddWordContents.java | 286 -- .../UserDictionaryAddWordFragment.java | 179 - .../latin/userdictionary/UserDictionaryList.java | 165 - .../userdictionary/UserDictionaryLocalePicker.java | 36 - .../userdictionary/UserDictionarySettings.java | 352 -- .../UserDictionarySettingsUtils.java | 42 - .../latin/utils/AdditionalSubtypeUtils.java | 238 -- .../inputmethod/latin/utils/ApplicationUtils.java | 83 - .../inputmethod/latin/utils/AsyncResultHolder.java | 72 - .../latin/utils/AutoCorrectionUtils.java | 62 - .../latin/utils/BinaryDictionaryUtils.java | 128 - .../inputmethod/latin/utils/CapsModeUtils.java | 357 -- .../latin/utils/CombinedFormatUtils.java | 109 - .../latin/utils/CompletionInfoUtils.java | 43 - .../latin/utils/CursorAnchorInfoUtils.java | 264 -- .../inputmethod/latin/utils/DebugLogUtils.java | 115 - .../inputmethod/latin/utils/DialogUtils.java | 34 - .../latin/utils/DictionaryHeaderUtils.java | 31 - .../latin/utils/DictionaryInfoUtils.java | 613 --- .../inputmethod/latin/utils/ExecutorUtils.java | 152 - .../inputmethod/latin/utils/FeedbackUtils.java | 38 - .../inputmethod/latin/utils/FileTransforms.java | 38 - .../inputmethod/latin/utils/FragmentUtils.java | 64 - .../latin/utils/ImportantNoticeUtils.java | 140 - .../inputmethod/latin/utils/InputTypeUtils.java | 117 - .../inputmethod/latin/utils/IntentUtils.java | 45 - .../android/inputmethod/latin/utils/JniUtils.java | 41 - .../android/inputmethod/latin/utils/JsonUtils.java | 103 - .../latin/utils/LanguageOnSpacebarUtils.java | 92 - .../latin/utils/LeakGuardHandlerWrapper.java | 43 - .../latin/utils/ManagedProfileUtils.java | 43 - .../latin/utils/MetadataFileUriGetter.java | 39 - .../inputmethod/latin/utils/NgramContextUtils.java | 113 - .../latin/utils/RecapitalizeStatus.java | 221 -- .../inputmethod/latin/utils/ResourceUtils.java | 320 -- .../inputmethod/latin/utils/RunInLocale.java | 53 - .../inputmethod/latin/utils/ScriptUtils.java | 195 - .../latin/utils/SpannableStringUtils.java | 183 - .../inputmethod/latin/utils/StatsUtils.java | 110 - .../inputmethod/latin/utils/StatsUtilsManager.java | 56 - .../latin/utils/SubtypeLocaleUtils.java | 351 -- .../inputmethod/latin/utils/SuggestionResults.java | 89 - .../latin/utils/TargetPackageInfoGetterTask.java | 67 - .../android/inputmethod/latin/utils/TextRange.java | 122 - .../inputmethod/latin/utils/TypefaceUtils.java | 108 - .../utils/UncachedInputMethodManagerUtils.java | 84 - .../inputmethod/latin/utils/ViewLayoutUtils.java | 93 - .../utils/WordInputEventForPersonalization.java | 106 - .../inputmethod/latin/utils/XmlParseUtils.java | 83 - .../InputMethodSettingsActivity.java | 94 - .../InputMethodSettingsFragment.java | 95 - .../inputmethodcommon/InputMethodSettingsImpl.java | 179 - .../InputMethodSettingsInterface.java | 63 - .../accessibility/AccessibilityLongPressTimer.java | 67 + .../accessibility/AccessibilityUtils.java | 266 ++ .../accessibility/KeyCodeDescriptionMapper.java | 365 ++ .../KeyboardAccessibilityDelegate.java | 326 ++ .../KeyboardAccessibilityNodeProvider.java | 339 ++ .../MainKeyboardAccessibilityDelegate.java | 293 ++ .../MoreKeysKeyboardAccessibilityDelegate.java | 120 + .../compat/ActivityManagerCompatUtils.java | 46 + .../inputmethod/compat/AppWorkaroundsHelper.java | 30 + .../inputmethod/compat/AppWorkaroundsUtils.java | 60 + .../kelar/inputmethod/compat/BuildCompatUtils.java | 36 + .../kelar/inputmethod/compat/CharacterCompat.java | 47 + .../org/kelar/inputmethod/compat/CompatUtils.java | 218 + .../compat/ConnectivityManagerCompatUtils.java | 36 + .../compat/CursorAnchorInfoCompatWrapper.java | 185 + .../inputmethod/compat/EditorInfoCompatUtils.java | 98 + .../compat/InputConnectionCompatUtils.java | 64 + .../compat/InputMethodManagerCompatWrapper.java | 52 + .../compat/InputMethodServiceCompatUtils.java | 37 + .../compat/InputMethodSubtypeCompatUtils.java | 103 + .../inputmethod/compat/IntentCompatUtils.java | 35 + .../inputmethod/compat/LocaleListCompatUtils.java | 40 + .../inputmethod/compat/LocaleSpanCompatUtils.java | 218 + .../inputmethod/compat/LooperCompatUtils.java | 42 + .../compat/NotificationCompatUtils.java | 83 + .../compat/SettingsSecureCompatUtils.java | 36 + .../inputmethod/compat/SuggestionSpanUtils.java | 121 + .../compat/SuggestionsInfoCompatUtils.java | 47 + .../inputmethod/compat/TextInfoCompatUtils.java | 67 + .../inputmethod/compat/TextViewCompatUtils.java | 44 + .../compat/UserDictionaryCompatUtils.java | 49 + .../inputmethod/compat/UserManagerCompatUtils.java | 80 + .../kelar/inputmethod/compat/ViewCompatUtils.java | 70 + .../compat/ViewOutlineProviderCompatUtils.java | 43 + .../compat/ViewOutlineProviderCompatUtilsLXX.java | 72 + .../inputmethod/dictionarypack/ActionBatch.java | 625 +++ .../dictionarypack/AssetFileAddress.java | 66 + .../dictionarypack/BadFormatException.java | 30 + .../inputmethod/dictionarypack/ButtonSwitcher.java | 170 + .../dictionarypack/CommonPreferences.java | 40 + .../dictionarypack/CompletedDownloadInfo.java | 36 + .../DictionaryDownloadProgressBar.java | 173 + .../DictionaryListInterfaceState.java | 85 + .../dictionarypack/DictionaryPackConstants.java | 72 + .../dictionarypack/DictionaryProvider.java | 541 +++ .../dictionarypack/DictionaryService.java | 280 ++ .../dictionarypack/DictionarySettingsActivity.java | 54 + .../dictionarypack/DictionarySettingsFragment.java | 438 ++ .../dictionarypack/DownloadIdAndStartDate.java | 29 + .../dictionarypack/DownloadManagerWrapper.java | 112 + .../dictionarypack/DownloadOverMeteredDialog.java | 86 + .../inputmethod/dictionarypack/DownloadRecord.java | 37 + .../inputmethod/dictionarypack/EventHandler.java | 46 + .../dictionarypack/LogProblemReporter.java | 35 + .../inputmethod/dictionarypack/MD5Calculator.java | 46 + .../dictionarypack/MetadataDbHelper.java | 1155 ++++++ .../dictionarypack/MetadataHandler.java | 173 + .../inputmethod/dictionarypack/MetadataParser.java | 114 + .../dictionarypack/MetadataUriGetter.java | 29 + .../inputmethod/dictionarypack/PrivateLog.java | 102 + .../dictionarypack/ProblemReporter.java | 24 + .../inputmethod/dictionarypack/UpdateHandler.java | 1082 +++++ .../dictionarypack/WordListMetadata.java | 135 + .../dictionarypack/WordListPreference.java | 310 ++ java/src/org/kelar/inputmethod/event/Combiner.java | 51 + .../org/kelar/inputmethod/event/CombinerChain.java | 137 + .../kelar/inputmethod/event/DeadKeyCombiner.java | 303 ++ java/src/org/kelar/inputmethod/event/Event.java | 319 ++ .../org/kelar/inputmethod/event/EventDecoder.java | 24 + .../inputmethod/event/HardwareEventDecoder.java | 26 + .../event/HardwareKeyboardEventDecoder.java | 81 + .../kelar/inputmethod/event/InputTransaction.java | 116 + java/src/org/kelar/inputmethod/keyboard/Key.java | 1022 +++++ .../kelar/inputmethod/keyboard/KeyDetector.java | 116 + .../org/kelar/inputmethod/keyboard/Keyboard.java | 261 ++ .../keyboard/KeyboardActionListener.java | 132 + .../org/kelar/inputmethod/keyboard/KeyboardId.java | 271 ++ .../kelar/inputmethod/keyboard/KeyboardLayout.java | 124 + .../inputmethod/keyboard/KeyboardLayoutSet.java | 507 +++ .../inputmethod/keyboard/KeyboardSwitcher.java | 508 +++ .../kelar/inputmethod/keyboard/KeyboardTheme.java | 215 + .../kelar/inputmethod/keyboard/KeyboardView.java | 590 +++ .../inputmethod/keyboard/MainKeyboardView.java | 893 +++++ .../inputmethod/keyboard/MoreKeysDetector.java | 55 + .../inputmethod/keyboard/MoreKeysKeyboard.java | 369 ++ .../inputmethod/keyboard/MoreKeysKeyboardView.java | 320 ++ .../kelar/inputmethod/keyboard/MoreKeysPanel.java | 136 + .../kelar/inputmethod/keyboard/PointerTracker.java | 1198 ++++++ .../kelar/inputmethod/keyboard/ProximityInfo.java | 405 ++ .../keyboard/emoji/DynamicGridKeyboard.java | 264 ++ .../inputmethod/keyboard/emoji/EmojiCategory.java | 470 +++ .../emoji/EmojiCategoryPageIndicatorView.java | 70 + .../keyboard/emoji/EmojiLayoutParams.java | 94 + .../keyboard/emoji/EmojiPageKeyboardView.java | 233 ++ .../keyboard/emoji/EmojiPalettesAdapter.java | 149 + .../keyboard/emoji/EmojiPalettesView.java | 486 +++ .../keyboard/internal/AbstractDrawingPreview.java | 84 + .../keyboard/internal/AlphabetShiftState.java | 131 + .../keyboard/internal/BatchInputArbiter.java | 181 + .../keyboard/internal/BogusMoveEventDetector.java | 115 + .../keyboard/internal/CodesArrayParser.java | 107 + .../internal/DrawingPreviewPlacerView.java | 88 + .../keyboard/internal/DrawingProxy.java | 79 + .../keyboard/internal/GestureEnabler.java | 54 + .../GestureFloatingTextDrawingPreview.java | 184 + .../internal/GestureStrokeDrawingParams.java | 58 + .../internal/GestureStrokeDrawingPoints.java | 197 + .../internal/GestureStrokeRecognitionParams.java | 109 + .../internal/GestureStrokeRecognitionPoints.java | 334 ++ .../internal/GestureTrailDrawingParams.java | 79 + .../internal/GestureTrailDrawingPoints.java | 276 ++ .../internal/GestureTrailsDrawingPreview.java | 174 + .../keyboard/internal/HermiteInterpolator.java | 161 + .../keyboard/internal/KeyDrawParams.java | 167 + .../keyboard/internal/KeyPreviewChoreographer.java | 209 + .../keyboard/internal/KeyPreviewDrawParams.java | 188 + .../keyboard/internal/KeyPreviewView.java | 139 + .../keyboard/internal/KeySpecParser.java | 258 ++ .../inputmethod/keyboard/internal/KeyStyle.java | 52 + .../keyboard/internal/KeyStylesSet.java | 230 ++ .../keyboard/internal/KeyVisualAttributes.java | 148 + .../keyboard/internal/KeyboardBuilder.java | 889 +++++ .../keyboard/internal/KeyboardCodesSet.java | 83 + .../keyboard/internal/KeyboardIconsSet.java | 167 + .../keyboard/internal/KeyboardParams.java | 193 + .../inputmethod/keyboard/internal/KeyboardRow.java | 187 + .../keyboard/internal/KeyboardState.java | 711 ++++ .../keyboard/internal/KeyboardTextsSet.java | 151 + .../keyboard/internal/KeyboardTextsTable.java | 4198 ++++++++++++++++++++ .../inputmethod/keyboard/internal/MatrixUtils.java | 166 + .../keyboard/internal/ModifierKeyState.java | 83 + .../inputmethod/keyboard/internal/MoreKeySpec.java | 355 ++ .../internal/NonDistinctMultitouchHelper.java | 115 + .../keyboard/internal/PointerTrackerQueue.java | 238 ++ .../inputmethod/keyboard/internal/RoundedLine.java | 113 + .../keyboard/internal/ShiftKeyState.java | 69 + .../internal/SlidingKeyInputDrawingPreview.java | 106 + .../keyboard/internal/SmoothingUtils.java | 102 + .../keyboard/internal/TimerHandler.java | 234 ++ .../inputmethod/keyboard/internal/TimerProxy.java | 133 + .../keyboard/internal/TouchPositionCorrection.java | 97 + .../keyboard/internal/TypingTimeRecorder.java | 72 + .../keyboard/internal/UniqueKeysCache.java | 81 + .../kelar/inputmethod/latin/AssetFileAddress.java | 70 + .../latin/AudioAndHapticFeedbackManager.java | 134 + .../org/kelar/inputmethod/latin/BackupAgent.java | 57 + .../kelar/inputmethod/latin/BinaryDictionary.java | 669 ++++ .../latin/BinaryDictionaryFileDumper.java | 569 +++ .../inputmethod/latin/BinaryDictionaryGetter.java | 291 ++ .../latin/ContactsBinaryDictionary.java | 176 + .../inputmethod/latin/ContactsContentObserver.java | 136 + .../latin/ContactsDictionaryConstants.java | 52 + .../inputmethod/latin/ContactsDictionaryUtils.java | 55 + .../kelar/inputmethod/latin/ContactsManager.java | 244 ++ .../inputmethod/latin/DicTraverseSession.java | 98 + .../org/kelar/inputmethod/latin/Dictionary.java | 216 + .../inputmethod/latin/DictionaryCollection.java | 140 + .../latin/DictionaryDumpBroadcastReceiver.java | 50 + .../inputmethod/latin/DictionaryFacilitator.java | 176 + .../latin/DictionaryFacilitatorImpl.java | 736 ++++ .../latin/DictionaryFacilitatorLruCache.java | 106 + .../latin/DictionaryFacilitatorProvider.java | 26 + .../kelar/inputmethod/latin/DictionaryFactory.java | 161 + .../DictionaryPackInstallBroadcastReceiver.java | 141 + .../kelar/inputmethod/latin/DictionaryStats.java | 103 + .../latin/EmojiAltPhysicalKeyDetector.java | 206 + .../latin/ExpandableBinaryDictionary.java | 757 ++++ .../kelar/inputmethod/latin/InputAttributes.java | 304 ++ .../src/org/kelar/inputmethod/latin/InputView.java | 252 ++ .../kelar/inputmethod/latin/LastComposedWord.java | 93 + java/src/org/kelar/inputmethod/latin/LatinIME.java | 2033 ++++++++++ .../org/kelar/inputmethod/latin/NgramContext.java | 291 ++ .../inputmethod/latin/PunctuationSuggestions.java | 124 + .../latin/ReadOnlyBinaryDictionary.java | 127 + .../inputmethod/latin/RichInputConnection.java | 1033 +++++ .../inputmethod/latin/RichInputMethodManager.java | 612 +++ .../inputmethod/latin/RichInputMethodSubtype.java | 250 ++ java/src/org/kelar/inputmethod/latin/Suggest.java | 434 ++ .../kelar/inputmethod/latin/SuggestedWords.java | 448 +++ .../inputmethod/latin/SystemBroadcastReceiver.java | 159 + .../inputmethod/latin/UserBinaryDictionary.java | 216 + .../org/kelar/inputmethod/latin/WordComposer.java | 481 +++ .../org/kelar/inputmethod/latin/WordListInfo.java | 31 + .../inputmethod/latin/about/AboutPreferences.java | 28 + .../accounts/AccountStateChangedListener.java | 75 + .../latin/accounts/AccountsChangedReceiver.java | 81 + .../inputmethod/latin/accounts/AuthUtils.java | 67 + .../latin/accounts/LoginAccountUtils.java | 47 + .../kelar/inputmethod/latin/define/DebugFlags.java | 31 + .../latin/define/DecoderSpecificConstants.java | 38 + .../kelar/inputmethod/latin/define/JniLibName.java | 25 + .../inputmethod/latin/define/ProductionFlags.java | 60 + .../inputmethod/latin/inputlogic/InputLogic.java | 2353 +++++++++++ .../latin/inputlogic/InputLogicHandler.java | 221 ++ .../latin/inputlogic/PrivateCommandPerformer.java | 40 + .../inputmethod/latin/inputlogic/SpaceState.java | 54 + .../latin/makedict/DictionaryHeader.java | 91 + .../inputmethod/latin/makedict/FormatSpec.java | 310 ++ .../inputmethod/latin/makedict/NgramProperty.java | 42 + .../latin/makedict/ProbabilityInfo.java | 87 + .../latin/makedict/UnsupportedFormatException.java | 26 + .../inputmethod/latin/makedict/WeightedString.java | 62 + .../inputmethod/latin/makedict/WordProperty.java | 201 + .../inputmethod/latin/network/AuthException.java | 35 + .../latin/network/BlockingHttpClient.java | 97 + .../inputmethod/latin/network/HttpException.java | 46 + .../latin/network/HttpUrlConnectionBuilder.java | 229 ++ .../latin/permissions/PermissionsActivity.java | 97 + .../latin/permissions/PermissionsManager.java | 91 + .../latin/permissions/PermissionsUtil.java | 93 + .../latin/personalization/AccountUtils.java | 66 + .../personalization/PersonalizationHelper.java | 108 + .../personalization/UserHistoryDictionary.java | 135 + .../latin/settings/AccountsSettingsFragment.java | 508 +++ .../settings/AdditionalFeaturesSettingUtils.java | 57 + .../latin/settings/AdvancedSettingsFragment.java | 262 ++ .../latin/settings/AppearanceSettingsFragment.java | 46 + .../latin/settings/CorrectionSettingsFragment.java | 152 + .../latin/settings/CustomInputStylePreference.java | 341 ++ .../settings/CustomInputStyleSettingsFragment.java | 318 ++ .../inputmethod/latin/settings/DebugSettings.java | 53 + .../latin/settings/DebugSettingsFragment.java | 288 ++ .../latin/settings/GestureSettingsFragment.java | 38 + .../latin/settings/LocalSettingsConstants.java | 61 + .../settings/PreferencesSettingsFragment.java | 104 + .../latin/settings/RadioButtonPreference.java | 97 + .../latin/settings/SeekBarDialogPreference.java | 147 + .../kelar/inputmethod/latin/settings/Settings.java | 458 +++ .../latin/settings/SettingsActivity.java | 87 + .../latin/settings/SettingsFragment.java | 101 + .../inputmethod/latin/settings/SettingsValues.java | 453 +++ .../settings/SettingsValuesForSuggestion.java | 25 + .../latin/settings/SpacingAndPunctuations.java | 155 + .../latin/settings/SubScreenFragment.java | 134 + .../latin/settings/TestFragmentActivity.java | 55 + .../latin/settings/ThemeSettingsFragment.java | 112 + .../latin/settings/TwoStatePreferenceHelper.java | 82 + .../inputmethod/latin/setup/SetupActivity.java | 36 + .../latin/setup/SetupStartIndicatorView.java | 123 + .../latin/setup/SetupStepIndicatorView.java | 62 + .../latin/setup/SetupWizardActivity.java | 513 +++ .../spellcheck/AndroidSpellCheckerService.java | 244 ++ .../spellcheck/AndroidSpellCheckerSession.java | 225 ++ .../AndroidSpellCheckerSessionFactory.java | 25 + .../AndroidWordLevelSpellCheckerSession.java | 390 ++ .../latin/spellcheck/SentenceLevelAdapter.java | 197 + .../spellcheck/SpellCheckerSettingsActivity.java | 61 + .../spellcheck/SpellCheckerSettingsFragment.java | 90 + .../latin/suggestions/MoreSuggestions.java | 268 ++ .../latin/suggestions/MoreSuggestionsView.java | 117 + .../suggestions/SuggestionStripLayoutHelper.java | 650 +++ .../latin/suggestions/SuggestionStripView.java | 491 +++ .../suggestions/SuggestionStripViewAccessor.java | 27 + .../latin/touchinputconsumer/GestureConsumer.java | 69 + .../UserDictionaryAddWordContents.java | 286 ++ .../UserDictionaryAddWordFragment.java | 179 + .../latin/userdictionary/UserDictionaryList.java | 165 + .../userdictionary/UserDictionaryLocalePicker.java | 36 + .../userdictionary/UserDictionarySettings.java | 352 ++ .../UserDictionarySettingsUtils.java | 42 + .../latin/utils/AdditionalSubtypeUtils.java | 238 ++ .../inputmethod/latin/utils/ApplicationUtils.java | 83 + .../inputmethod/latin/utils/AsyncResultHolder.java | 72 + .../latin/utils/AutoCorrectionUtils.java | 62 + .../latin/utils/BinaryDictionaryUtils.java | 128 + .../inputmethod/latin/utils/CapsModeUtils.java | 357 ++ .../latin/utils/CombinedFormatUtils.java | 109 + .../latin/utils/CompletionInfoUtils.java | 43 + .../latin/utils/CursorAnchorInfoUtils.java | 264 ++ .../inputmethod/latin/utils/DebugLogUtils.java | 115 + .../kelar/inputmethod/latin/utils/DialogUtils.java | 34 + .../latin/utils/DictionaryHeaderUtils.java | 31 + .../latin/utils/DictionaryInfoUtils.java | 613 +++ .../inputmethod/latin/utils/ExecutorUtils.java | 152 + .../inputmethod/latin/utils/FeedbackUtils.java | 38 + .../inputmethod/latin/utils/FileTransforms.java | 38 + .../inputmethod/latin/utils/FragmentUtils.java | 64 + .../latin/utils/ImportantNoticeUtils.java | 140 + .../inputmethod/latin/utils/InputTypeUtils.java | 117 + .../kelar/inputmethod/latin/utils/IntentUtils.java | 45 + .../kelar/inputmethod/latin/utils/JniUtils.java | 41 + .../kelar/inputmethod/latin/utils/JsonUtils.java | 103 + .../latin/utils/LanguageOnSpacebarUtils.java | 92 + .../latin/utils/LeakGuardHandlerWrapper.java | 43 + .../latin/utils/ManagedProfileUtils.java | 43 + .../latin/utils/MetadataFileUriGetter.java | 39 + .../inputmethod/latin/utils/NgramContextUtils.java | 113 + .../latin/utils/RecapitalizeStatus.java | 221 ++ .../inputmethod/latin/utils/ResourceUtils.java | 319 ++ .../kelar/inputmethod/latin/utils/RunInLocale.java | 53 + .../kelar/inputmethod/latin/utils/ScriptUtils.java | 195 + .../latin/utils/SpannableStringUtils.java | 183 + .../kelar/inputmethod/latin/utils/StatsUtils.java | 108 + .../inputmethod/latin/utils/StatsUtilsManager.java | 56 + .../latin/utils/SubtypeLocaleUtils.java | 351 ++ .../inputmethod/latin/utils/SuggestionResults.java | 89 + .../latin/utils/TargetPackageInfoGetterTask.java | 67 + .../kelar/inputmethod/latin/utils/TextRange.java | 122 + .../inputmethod/latin/utils/TypefaceUtils.java | 108 + .../utils/UncachedInputMethodManagerUtils.java | 84 + .../inputmethod/latin/utils/ViewLayoutUtils.java | 93 + .../utils/WordInputEventForPersonalization.java | 106 + .../inputmethod/latin/utils/XmlParseUtils.java | 83 + .../InputMethodSettingsActivity.java | 94 + .../InputMethodSettingsFragment.java | 95 + .../inputmethodcommon/InputMethodSettingsImpl.java | 178 + .../InputMethodSettingsInterface.java | 63 + native/jni/Android.bp | 8 +- native/jni/NativeFileList.mk | 8 +- ..._android_inputmethod_keyboard_ProximityInfo.cpp | 63 - ...om_android_inputmethod_keyboard_ProximityInfo.h | 25 - ..._android_inputmethod_latin_BinaryDictionary.cpp | 744 ---- ...om_android_inputmethod_latin_BinaryDictionary.h | 25 - ...oid_inputmethod_latin_BinaryDictionaryUtils.cpp | 105 - ...droid_inputmethod_latin_BinaryDictionaryUtils.h | 25 - ...ndroid_inputmethod_latin_DicTraverseSession.cpp | 80 - ..._android_inputmethod_latin_DicTraverseSession.h | 25 - native/jni/jni_common.cpp | 8 +- ...rg_kelar_inputmethod_keyboard_ProximityInfo.cpp | 63 + .../org_kelar_inputmethod_keyboard_ProximityInfo.h | 25 + ...rg_kelar_inputmethod_latin_BinaryDictionary.cpp | 744 ++++ .../org_kelar_inputmethod_latin_BinaryDictionary.h | 25 + ...lar_inputmethod_latin_BinaryDictionaryUtils.cpp | 105 + ...kelar_inputmethod_latin_BinaryDictionaryUtils.h | 25 + ..._kelar_inputmethod_latin_DicTraverseSession.cpp | 80 + ...rg_kelar_inputmethod_latin_DicTraverseSession.h | 25 + native/jni/src/suggest/core/suggest_options.h | 2 +- tests/AndroidManifest.xml | 2 +- tests/AndroidManifest_SdkVersion.xml | 2 +- tests/AndroidTest.xml | 2 +- .../compat/LocaleSpanCompatUtilsTests.java | 222 -- .../compat/SuggestionSpanUtilsTest.java | 264 -- .../compat/TextInfoCompatUtilsTests.java | 94 - .../KeyboardLayoutSetNavigateMoreKeysBase.java | 337 -- .../KeyboardLayoutSetNavigateMoreKeysKlpTests.java | 28 - .../KeyboardLayoutSetNavigateMoreKeysLxxTests.java | 40 - .../keyboard/KeyboardLayoutSetTestsBase.java | 168 - .../inputmethod/keyboard/KeyboardLayoutTest.java | 81 - .../inputmethod/keyboard/KeyboardThemeTests.java | 461 --- .../MoreKeysKeyboardBuilderAutoOrderTests.java | 2604 ------------ .../MoreKeysKeyboardBuilderFixedOrderTests.java | 2785 ------------- .../MoreKeysKeyboardBuilderMaxOrderTests.java | 2505 ------------ .../keyboard/action/ActionTestsBase.java | 115 - .../keyboard/action/KlpActionCustomTests.java | 38 - .../keyboard/action/KlpActionDoneTests.java | 37 - .../keyboard/action/KlpActionGoTests.java | 37 - .../keyboard/action/KlpActionLabelTests.java | 181 - .../keyboard/action/KlpActionNextTests.java | 37 - .../keyboard/action/KlpActionNoneTests.java | 37 - .../keyboard/action/KlpActionPreviousTests.java | 37 - .../keyboard/action/KlpActionSearchTests.java | 37 - .../keyboard/action/KlpActionSendTests.java | 37 - .../keyboard/action/KlpActionTestsBase.java | 55 - .../keyboard/action/KlpActionUnspecifiedTests.java | 38 - .../keyboard/action/LxxActionCustomTests.java | 38 - .../keyboard/action/LxxActionDoneTests.java | 37 - .../keyboard/action/LxxActionGoTests.java | 37 - .../keyboard/action/LxxActionNextTests.java | 37 - .../keyboard/action/LxxActionNoneTests.java | 37 - .../keyboard/action/LxxActionPreviousTests.java | 37 - .../keyboard/action/LxxActionSearchTests.java | 37 - .../keyboard/action/LxxActionSendTests.java | 37 - .../keyboard/action/LxxActionTestsBase.java | 26 - .../keyboard/action/LxxActionUnspecifiedTests.java | 38 - .../internal/HermiteInterpolatorTests.java | 202 - .../keyboard/internal/KeySpecParserTests.java | 55 - .../keyboard/internal/KeySpecParserTestsBase.java | 340 -- .../internal/KeyboardStateMultiTouchTests.java | 476 --- .../internal/KeyboardStateSingleTouchTests.java | 971 ----- .../keyboard/internal/KeyboardStateTestsBase.java | 253 -- .../keyboard/internal/KeyboardTextsSetTests.java | 111 - .../keyboard/internal/MatrixUtilsTests.java | 85 - .../keyboard/internal/MockKeyboardSwitcher.java | 197 - .../keyboard/internal/MoreKeySpecSplitTests.java | 287 -- .../internal/MoreKeySpecStringReferenceTests.java | 308 -- .../keyboard/internal/MoreKeySpecTests.java | 378 -- .../internal/PointerTrackerQueueTests.java | 342 -- .../keyboard/internal/SmoothingUtilsTests.java | 53 - .../inputmethod/keyboard/layout/Arabic.java | 349 -- .../keyboard/layout/ArmenianPhonetic.java | 211 - .../inputmethod/keyboard/layout/Azerty.java | 78 - .../inputmethod/keyboard/layout/Bengali.java | 164 - .../inputmethod/keyboard/layout/BengaliAkkhor.java | 497 --- .../inputmethod/keyboard/layout/Bulgarian.java | 106 - .../inputmethod/keyboard/layout/BulgarianBds.java | 97 - .../inputmethod/keyboard/layout/Colemak.java | 77 - .../keyboard/layout/DevanagariLetterConstants.java | 75 - .../inputmethod/keyboard/layout/Dvorak.java | 121 - .../inputmethod/keyboard/layout/EastSlavic.java | 88 - .../android/inputmethod/keyboard/layout/Farsi.java | 362 -- .../inputmethod/keyboard/layout/Georgian.java | 164 - .../android/inputmethod/keyboard/layout/Greek.java | 140 - .../inputmethod/keyboard/layout/Hebrew.java | 186 - .../android/inputmethod/keyboard/layout/Hindi.java | 332 -- .../inputmethod/keyboard/layout/HindiCompact.java | 180 - .../inputmethod/keyboard/layout/Kannada.java | 199 - .../android/inputmethod/keyboard/layout/Khmer.java | 262 -- .../android/inputmethod/keyboard/layout/Lao.java | 218 - .../inputmethod/keyboard/layout/LayoutBase.java | 162 - .../inputmethod/keyboard/layout/Malayalam.java | 189 - .../inputmethod/keyboard/layout/Marathi.java | 196 - .../inputmethod/keyboard/layout/Mongolian.java | 112 - .../keyboard/layout/NepaliRomanized.java | 166 - .../keyboard/layout/NepaliTraditional.java | 225 -- .../inputmethod/keyboard/layout/Nordic.java | 59 - .../inputmethod/keyboard/layout/PcQwerty.java | 202 - .../inputmethod/keyboard/layout/Qwerty.java | 54 - .../inputmethod/keyboard/layout/Qwertz.java | 51 - .../inputmethod/keyboard/layout/SerbianQwertz.java | 58 - .../inputmethod/keyboard/layout/Sinhala.java | 190 - .../inputmethod/keyboard/layout/SouthSlavic.java | 88 - .../inputmethod/keyboard/layout/Spanish.java | 53 - .../android/inputmethod/keyboard/layout/Swiss.java | 56 - .../inputmethod/keyboard/layout/Symbols.java | 205 - .../keyboard/layout/SymbolsShifted.java | 161 - .../android/inputmethod/keyboard/layout/Tamil.java | 127 - .../inputmethod/keyboard/layout/Telugu.java | 193 - .../android/inputmethod/keyboard/layout/Thai.java | 247 -- .../android/inputmethod/keyboard/layout/Uzbek.java | 59 - .../layout/customizer/BengaliCustomizer.java | 46 - .../layout/customizer/DanishCustomizer.java | 112 - .../layout/customizer/DevanagariCustomizer.java | 49 - .../layout/customizer/DutchCustomizer.java | 89 - .../layout/customizer/DvorakCustomizer.java | 78 - .../layout/customizer/EastSlavicCustomizer.java | 40 - .../layout/customizer/EnglishCustomizer.java | 75 - .../layout/customizer/EstonianEECustomizer.java | 167 - .../keyboard/layout/customizer/EuroCustomizer.java | 40 - .../layout/customizer/FinnishCustomizer.java | 82 - .../layout/customizer/FrenchCustomizer.java | 106 - .../layout/customizer/GermanCustomizer.java | 105 - .../layout/customizer/HindiCustomizer.java | 65 - .../layout/customizer/ItalianCustomizer.java | 76 - .../layout/customizer/LayoutCustomizer.java | 214 - .../layout/customizer/NepaliCustomizer.java | 67 - .../layout/customizer/NoLanguageCustomizer.java | 158 - .../layout/customizer/NorwegianCustomizer.java | 95 - .../layout/customizer/PcQwertyCustomizer.java | 50 - .../layout/customizer/PortugueseCustomizer.java | 79 - .../layout/customizer/SerbianLatinCustomizer.java | 80 - .../customizer/SouthSlavicLayoutCustomizer.java | 43 - .../layout/customizer/SpanishCustomizer.java | 100 - .../layout/customizer/SwedishCustomizer.java | 143 - .../layout/customizer/TamilCustomizer.java | 45 - .../layout/customizer/TurkicCustomizer.java | 84 - .../layout/customizer/UzbekCustomizer.java | 42 - .../layout/expected/AbstractKeyboardBuilder.java | 143 - .../layout/expected/AbstractLayoutBase.java | 178 - .../layout/expected/ActualKeyboardBuilder.java | 194 - .../keyboard/layout/expected/ExpectedKey.java | 376 -- .../layout/expected/ExpectedKeyOutput.java | 169 - .../layout/expected/ExpectedKeyVisual.java | 193 - .../layout/expected/ExpectedKeyboardBuilder.java | 345 -- .../tests/KeyboardLayoutSetSubtypesCountTests.java | 69 - .../keyboard/layout/tests/LayoutTestsBase.java | 174 - .../keyboard/layout/tests/TestsAfrikaans.java | 99 - .../keyboard/layout/tests/TestsArabic.java | 36 - .../layout/tests/TestsArmenianAMPhonetic.java | 36 - .../keyboard/layout/tests/TestsAzerbaijaniAZ.java | 37 - .../keyboard/layout/tests/TestsBasqueES.java | 53 - .../keyboard/layout/tests/TestsBelarusianBY.java | 73 - .../keyboard/layout/tests/TestsBengaliBD.java | 60 - .../keyboard/layout/tests/TestsBengaliIN.java | 53 - .../keyboard/layout/tests/TestsBulgarian.java | 36 - .../keyboard/layout/tests/TestsBulgarianBds.java | 36 - .../keyboard/layout/tests/TestsCatalan.java | 122 - .../keyboard/layout/tests/TestsCroatian.java | 78 - .../keyboard/layout/tests/TestsCzech.java | 133 - .../keyboard/layout/tests/TestsDanish.java | 37 - .../keyboard/layout/tests/TestsDanishQwertz.java | 77 - .../keyboard/layout/tests/TestsDutch.java | 37 - .../keyboard/layout/tests/TestsDutchBE.java | 37 - .../keyboard/layout/tests/TestsDvorakEmail.java | 94 - .../keyboard/layout/tests/TestsDvorakUrl.java | 90 - .../keyboard/layout/tests/TestsEnglishDvorak.java | 37 - .../keyboard/layout/tests/TestsEnglishIN.java | 56 - .../keyboard/layout/tests/TestsEnglishUK.java | 58 - .../keyboard/layout/tests/TestsEnglishUS.java | 37 - .../keyboard/layout/tests/TestsEsperanto.java | 181 - .../keyboard/layout/tests/TestsEstonianEE.java | 37 - .../layout/tests/TestsEstonianEEQwerty.java | 109 - .../keyboard/layout/tests/TestsFinnish.java | 37 - .../keyboard/layout/tests/TestsFinnishQwerty.java | 77 - .../keyboard/layout/tests/TestsFrench.java | 37 - .../keyboard/layout/tests/TestsFrenchCA.java | 37 - .../keyboard/layout/tests/TestsFrenchCH.java | 57 - .../keyboard/layout/tests/TestsFrenchDvorak.java | 62 - .../keyboard/layout/tests/TestsFrenchQwertz.java | 37 - .../keyboard/layout/tests/TestsGalicianES.java | 53 - .../keyboard/layout/tests/TestsGeorgianGE.java | 36 - .../keyboard/layout/tests/TestsGerman.java | 37 - .../keyboard/layout/tests/TestsGermanCH.java | 57 - .../keyboard/layout/tests/TestsGermanDvorak.java | 76 - .../keyboard/layout/tests/TestsGermanQwerty.java | 37 - .../keyboard/layout/tests/TestsGreek.java | 36 - .../keyboard/layout/tests/TestsHebrew.java | 36 - .../keyboard/layout/tests/TestsHindi.java | 37 - .../keyboard/layout/tests/TestsHindiCompact.java | 36 - .../keyboard/layout/tests/TestsHinglish.java | 56 - .../keyboard/layout/tests/TestsHungarian.java | 107 - .../keyboard/layout/tests/TestsIcelandic.java | 106 - .../keyboard/layout/tests/TestsIndonesian.java | 37 - .../keyboard/layout/tests/TestsItalian.java | 53 - .../keyboard/layout/tests/TestsItalianCH.java | 57 - .../keyboard/layout/tests/TestsKannadaIN.java | 36 - .../keyboard/layout/tests/TestsKazakh.java | 82 - .../keyboard/layout/tests/TestsKhmerKH.java | 36 - .../keyboard/layout/tests/TestsKyrgyz.java | 70 - .../keyboard/layout/tests/TestsLaoLA.java | 36 - .../keyboard/layout/tests/TestsLatvian.java | 148 - .../keyboard/layout/tests/TestsLithuanian.java | 149 - .../keyboard/layout/tests/TestsMacedonian.java | 69 - .../keyboard/layout/tests/TestsMalayMY.java | 37 - .../keyboard/layout/tests/TestsMalayalamIN.java | 36 - .../keyboard/layout/tests/TestsMarathiIN.java | 36 - .../keyboard/layout/tests/TestsMongolianMN.java | 36 - .../layout/tests/TestsNepaliRomanized.java | 36 - .../layout/tests/TestsNepaliTraditional.java | 36 - .../keyboard/layout/tests/TestsNoLanguage.java | 37 - .../layout/tests/TestsNoLanguageColemak.java | 53 - .../layout/tests/TestsNoLanguageDvorak.java | 53 - .../layout/tests/TestsNoLanguagePcQwerty.java | 53 - .../keyboard/layout/tests/TestsNorwegian.java | 37 - .../layout/tests/TestsNorwegianColemak.java | 78 - .../keyboard/layout/tests/TestsPersian.java | 36 - .../keyboard/layout/tests/TestsPolish.java | 104 - .../keyboard/layout/tests/TestsPortugueseBR.java | 37 - .../keyboard/layout/tests/TestsPortuguesePT.java | 56 - .../keyboard/layout/tests/TestsQwertyEmail.java | 74 - .../keyboard/layout/tests/TestsQwertyUrl.java | 74 - .../keyboard/layout/tests/TestsRomanian.java | 81 - .../keyboard/layout/tests/TestsRussian.java | 69 - .../keyboard/layout/tests/TestsSerbian.java | 75 - .../keyboard/layout/tests/TestsSerbianLatin.java | 37 - .../layout/tests/TestsSerbianLatinQwerty.java | 87 - .../keyboard/layout/tests/TestsSinhalaLK.java | 36 - .../keyboard/layout/tests/TestsSlovak.java | 155 - .../keyboard/layout/tests/TestsSlovenian.java | 70 - .../keyboard/layout/tests/TestsSpanish.java | 56 - .../keyboard/layout/tests/TestsSpanish419.java | 37 - .../keyboard/layout/tests/TestsSpanishUS.java | 37 - .../tests/TestsSplitLayoutQwertyEnglishUS.java | 62 - .../keyboard/layout/tests/TestsSwahili.java | 93 - .../keyboard/layout/tests/TestsSwedish.java | 37 - .../layout/tests/TestsSwedishPcQwerty.java | 121 - .../keyboard/layout/tests/TestsTagalog.java | 47 - .../keyboard/layout/tests/TestsTamilIN.java | 56 - .../keyboard/layout/tests/TestsTamilLK.java | 56 - .../keyboard/layout/tests/TestsTamilSG.java | 37 - .../keyboard/layout/tests/TestsTeluguIN.java | 36 - .../keyboard/layout/tests/TestsThai.java | 36 - .../keyboard/layout/tests/TestsTurkish.java | 53 - .../keyboard/layout/tests/TestsUkrainian.java | 83 - .../keyboard/layout/tests/TestsUzbek.java | 37 - .../keyboard/layout/tests/TestsUzbekQwerty.java | 47 - .../keyboard/layout/tests/TestsVietnamese.java | 146 - .../keyboard/layout/tests/TestsZulu.java | 37 - .../inputmethod/latin/AppWorkaroundsTests.java | 75 - .../inputmethod/latin/BinaryDictionaryTests.java | 913 ----- .../inputmethod/latin/BlueUnderlineTests.java | 128 - .../latin/ContactsContentObserverTest.java | 98 - .../latin/ContactsDictionaryUtilsTest.java | 64 - .../inputmethod/latin/ContactsManagerTest.java | 178 - .../latin/DictionaryFacilitatorLruCacheTests.java | 52 - .../android/inputmethod/latin/InputLogicTests.java | 786 ---- .../inputmethod/latin/InputLogicTestsDeadKeys.java | 216 - .../InputLogicTestsLanguageWithoutSpaces.java | 135 - .../android/inputmethod/latin/InputTestsBase.java | 463 --- .../inputmethod/latin/LatinIMEForTests.java | 36 - .../inputmethod/latin/LatinImeStressTests.java | 62 - .../android/inputmethod/latin/LatinImeTests.java | 40 - .../inputmethod/latin/NgramContextTests.java | 161 - .../inputmethod/latin/PunctuationTests.java | 199 - .../RichInputConnectionAndTextRangeTests.java | 465 --- .../latin/RichInputMethodSubtypeTests.java | 336 -- .../android/inputmethod/latin/ShiftModeTests.java | 125 - .../inputmethod/latin/SuggestedWordsTests.java | 186 - .../inputmethod/latin/WordComposerTests.java | 133 - .../accounts/AccountsChangedReceiverTests.java | 130 - .../latin/common/InputPointersTests.java | 344 -- .../latin/common/ResizableIntArrayTests.java | 399 -- .../inputmethod/latin/common/StringUtilsTests.java | 501 --- .../latin/common/UnicodeSurrogateTests.java | 45 - .../latin/makedict/AbstractDictDecoder.java | 104 - .../makedict/BinaryDictDecoderEncoderTests.java | 675 ---- .../latin/makedict/BinaryDictDecoderUtils.java | 426 -- .../latin/makedict/BinaryDictEncoderUtils.java | 839 ---- .../latin/makedict/BinaryDictIOUtils.java | 292 -- .../latin/makedict/BinaryDictUtils.java | 80 - .../inputmethod/latin/makedict/DictDecoder.java | 222 -- .../inputmethod/latin/makedict/DictEncoder.java | 39 - .../latin/makedict/FusionDictionary.java | 646 --- .../inputmethod/latin/makedict/MakedictLog.java | 44 - .../latin/makedict/PendingAttribute.java | 32 - .../inputmethod/latin/makedict/PtNodeInfo.java | 51 - .../latin/makedict/Ver2DictEncoder.java | 280 -- .../latin/makedict/Ver4DictDecoder.java | 104 - .../latin/makedict/Ver4DictEncoder.java | 133 - .../latin/network/BlockingHttpClientTests.java | 179 - .../network/HttpUrlConnectionBuilderTests.java | 169 - .../UserHistoryDictionaryTests.java | 232 -- .../UserHistoryDictionaryTestsHelper.java | 144 - .../settings/AccountsSettingsFragmentTests.java | 187 - .../settings/SpacingAndPunctuationsTests.java | 499 --- .../spellcheck/AndroidSpellCheckerServiceTest.java | 77 - .../SuggestionStripLayoutHelperTests.java | 235 -- .../NullGestureConsumerTests.java | 56 - .../latin/utils/AdditionalSubtypeUtilsTests.java | 185 - .../latin/utils/AsyncResultHolderTests.java | 84 - .../latin/utils/ByteArrayDictBuffer.java | 81 - .../latin/utils/CapsModeUtilsTests.java | 162 - .../latin/utils/CollectionUtilsTests.java | 104 - .../latin/utils/DictionaryInfoUtilsTests.java | 77 - .../latin/utils/ExecutorUtilsTests.java | 65 - .../latin/utils/ImportantNoticeUtilsTests.java | 135 - .../inputmethod/latin/utils/JsonUtilsTests.java | 43 - .../latin/utils/LanguageOnSpacebarUtilsTests.java | 230 -- .../latin/utils/RecapitalizeStatusTests.java | 207 - .../latin/utils/ResourceUtilsTests.java | 163 - .../latin/utils/SpannableStringUtilsTests.java | 244 -- .../latin/utils/SubtypeLocaleUtilsTests.java | 498 --- .../compat/LocaleSpanCompatUtilsTests.java | 222 ++ .../compat/SuggestionSpanUtilsTest.java | 264 ++ .../compat/TextInfoCompatUtilsTests.java | 94 + .../KeyboardLayoutSetNavigateMoreKeysBase.java | 337 ++ .../KeyboardLayoutSetNavigateMoreKeysKlpTests.java | 28 + .../KeyboardLayoutSetNavigateMoreKeysLxxTests.java | 40 + .../keyboard/KeyboardLayoutSetTestsBase.java | 168 + .../inputmethod/keyboard/KeyboardLayoutTest.java | 81 + .../inputmethod/keyboard/KeyboardThemeTests.java | 461 +++ .../MoreKeysKeyboardBuilderAutoOrderTests.java | 2604 ++++++++++++ .../MoreKeysKeyboardBuilderFixedOrderTests.java | 2785 +++++++++++++ .../MoreKeysKeyboardBuilderMaxOrderTests.java | 2505 ++++++++++++ .../keyboard/action/ActionTestsBase.java | 115 + .../keyboard/action/KlpActionCustomTests.java | 38 + .../keyboard/action/KlpActionDoneTests.java | 37 + .../keyboard/action/KlpActionGoTests.java | 37 + .../keyboard/action/KlpActionLabelTests.java | 181 + .../keyboard/action/KlpActionNextTests.java | 37 + .../keyboard/action/KlpActionNoneTests.java | 37 + .../keyboard/action/KlpActionPreviousTests.java | 37 + .../keyboard/action/KlpActionSearchTests.java | 37 + .../keyboard/action/KlpActionSendTests.java | 37 + .../keyboard/action/KlpActionTestsBase.java | 55 + .../keyboard/action/KlpActionUnspecifiedTests.java | 38 + .../keyboard/action/LxxActionCustomTests.java | 38 + .../keyboard/action/LxxActionDoneTests.java | 37 + .../keyboard/action/LxxActionGoTests.java | 37 + .../keyboard/action/LxxActionNextTests.java | 37 + .../keyboard/action/LxxActionNoneTests.java | 37 + .../keyboard/action/LxxActionPreviousTests.java | 37 + .../keyboard/action/LxxActionSearchTests.java | 37 + .../keyboard/action/LxxActionSendTests.java | 37 + .../keyboard/action/LxxActionTestsBase.java | 26 + .../keyboard/action/LxxActionUnspecifiedTests.java | 38 + .../internal/HermiteInterpolatorTests.java | 202 + .../keyboard/internal/KeySpecParserTests.java | 55 + .../keyboard/internal/KeySpecParserTestsBase.java | 340 ++ .../internal/KeyboardStateMultiTouchTests.java | 476 +++ .../internal/KeyboardStateSingleTouchTests.java | 971 +++++ .../keyboard/internal/KeyboardStateTestsBase.java | 253 ++ .../keyboard/internal/KeyboardTextsSetTests.java | 111 + .../keyboard/internal/MatrixUtilsTests.java | 85 + .../keyboard/internal/MockKeyboardSwitcher.java | 197 + .../keyboard/internal/MoreKeySpecSplitTests.java | 287 ++ .../internal/MoreKeySpecStringReferenceTests.java | 307 ++ .../keyboard/internal/MoreKeySpecTests.java | 378 ++ .../internal/PointerTrackerQueueTests.java | 342 ++ .../keyboard/internal/SmoothingUtilsTests.java | 53 + .../kelar/inputmethod/keyboard/layout/Arabic.java | 349 ++ .../keyboard/layout/ArmenianPhonetic.java | 211 + .../kelar/inputmethod/keyboard/layout/Azerty.java | 78 + .../kelar/inputmethod/keyboard/layout/Bengali.java | 164 + .../inputmethod/keyboard/layout/BengaliAkkhor.java | 497 +++ .../inputmethod/keyboard/layout/Bulgarian.java | 106 + .../inputmethod/keyboard/layout/BulgarianBds.java | 97 + .../kelar/inputmethod/keyboard/layout/Colemak.java | 77 + .../keyboard/layout/DevanagariLetterConstants.java | 75 + .../kelar/inputmethod/keyboard/layout/Dvorak.java | 121 + .../inputmethod/keyboard/layout/EastSlavic.java | 88 + .../kelar/inputmethod/keyboard/layout/Farsi.java | 362 ++ .../inputmethod/keyboard/layout/Georgian.java | 164 + .../kelar/inputmethod/keyboard/layout/Greek.java | 140 + .../kelar/inputmethod/keyboard/layout/Hebrew.java | 186 + .../kelar/inputmethod/keyboard/layout/Hindi.java | 332 ++ .../inputmethod/keyboard/layout/HindiCompact.java | 180 + .../kelar/inputmethod/keyboard/layout/Kannada.java | 199 + .../kelar/inputmethod/keyboard/layout/Khmer.java | 262 ++ .../org/kelar/inputmethod/keyboard/layout/Lao.java | 218 + .../inputmethod/keyboard/layout/LayoutBase.java | 162 + .../inputmethod/keyboard/layout/Malayalam.java | 189 + .../kelar/inputmethod/keyboard/layout/Marathi.java | 196 + .../inputmethod/keyboard/layout/Mongolian.java | 112 + .../keyboard/layout/NepaliRomanized.java | 166 + .../keyboard/layout/NepaliTraditional.java | 225 ++ .../kelar/inputmethod/keyboard/layout/Nordic.java | 59 + .../inputmethod/keyboard/layout/PcQwerty.java | 202 + .../kelar/inputmethod/keyboard/layout/Qwerty.java | 54 + .../kelar/inputmethod/keyboard/layout/Qwertz.java | 51 + .../inputmethod/keyboard/layout/SerbianQwertz.java | 58 + .../kelar/inputmethod/keyboard/layout/Sinhala.java | 190 + .../inputmethod/keyboard/layout/SouthSlavic.java | 88 + .../kelar/inputmethod/keyboard/layout/Spanish.java | 53 + .../kelar/inputmethod/keyboard/layout/Swiss.java | 56 + .../kelar/inputmethod/keyboard/layout/Symbols.java | 205 + .../keyboard/layout/SymbolsShifted.java | 161 + .../kelar/inputmethod/keyboard/layout/Tamil.java | 127 + .../kelar/inputmethod/keyboard/layout/Telugu.java | 193 + .../kelar/inputmethod/keyboard/layout/Thai.java | 247 ++ .../kelar/inputmethod/keyboard/layout/Uzbek.java | 59 + .../layout/customizer/BengaliCustomizer.java | 46 + .../layout/customizer/DanishCustomizer.java | 112 + .../layout/customizer/DevanagariCustomizer.java | 49 + .../layout/customizer/DutchCustomizer.java | 89 + .../layout/customizer/DvorakCustomizer.java | 78 + .../layout/customizer/EastSlavicCustomizer.java | 40 + .../layout/customizer/EnglishCustomizer.java | 75 + .../layout/customizer/EstonianEECustomizer.java | 167 + .../keyboard/layout/customizer/EuroCustomizer.java | 40 + .../layout/customizer/FinnishCustomizer.java | 82 + .../layout/customizer/FrenchCustomizer.java | 106 + .../layout/customizer/GermanCustomizer.java | 105 + .../layout/customizer/HindiCustomizer.java | 65 + .../layout/customizer/ItalianCustomizer.java | 76 + .../layout/customizer/LayoutCustomizer.java | 214 + .../layout/customizer/NepaliCustomizer.java | 67 + .../layout/customizer/NoLanguageCustomizer.java | 158 + .../layout/customizer/NorwegianCustomizer.java | 95 + .../layout/customizer/PcQwertyCustomizer.java | 50 + .../layout/customizer/PortugueseCustomizer.java | 79 + .../layout/customizer/SerbianLatinCustomizer.java | 80 + .../customizer/SouthSlavicLayoutCustomizer.java | 43 + .../layout/customizer/SpanishCustomizer.java | 100 + .../layout/customizer/SwedishCustomizer.java | 143 + .../layout/customizer/TamilCustomizer.java | 45 + .../layout/customizer/TurkicCustomizer.java | 84 + .../layout/customizer/UzbekCustomizer.java | 42 + .../layout/expected/AbstractKeyboardBuilder.java | 143 + .../layout/expected/AbstractLayoutBase.java | 178 + .../layout/expected/ActualKeyboardBuilder.java | 194 + .../keyboard/layout/expected/ExpectedKey.java | 376 ++ .../layout/expected/ExpectedKeyOutput.java | 169 + .../layout/expected/ExpectedKeyVisual.java | 193 + .../layout/expected/ExpectedKeyboardBuilder.java | 345 ++ .../tests/KeyboardLayoutSetSubtypesCountTests.java | 69 + .../keyboard/layout/tests/LayoutTestsBase.java | 174 + .../keyboard/layout/tests/TestsAfrikaans.java | 99 + .../keyboard/layout/tests/TestsArabic.java | 36 + .../layout/tests/TestsArmenianAMPhonetic.java | 36 + .../keyboard/layout/tests/TestsAzerbaijaniAZ.java | 37 + .../keyboard/layout/tests/TestsBasqueES.java | 53 + .../keyboard/layout/tests/TestsBelarusianBY.java | 73 + .../keyboard/layout/tests/TestsBengaliBD.java | 60 + .../keyboard/layout/tests/TestsBengaliIN.java | 53 + .../keyboard/layout/tests/TestsBulgarian.java | 36 + .../keyboard/layout/tests/TestsBulgarianBds.java | 36 + .../keyboard/layout/tests/TestsCatalan.java | 122 + .../keyboard/layout/tests/TestsCroatian.java | 78 + .../keyboard/layout/tests/TestsCzech.java | 133 + .../keyboard/layout/tests/TestsDanish.java | 37 + .../keyboard/layout/tests/TestsDanishQwertz.java | 77 + .../keyboard/layout/tests/TestsDutch.java | 37 + .../keyboard/layout/tests/TestsDutchBE.java | 37 + .../keyboard/layout/tests/TestsDvorakEmail.java | 94 + .../keyboard/layout/tests/TestsDvorakUrl.java | 90 + .../keyboard/layout/tests/TestsEnglishDvorak.java | 37 + .../keyboard/layout/tests/TestsEnglishIN.java | 56 + .../keyboard/layout/tests/TestsEnglishUK.java | 58 + .../keyboard/layout/tests/TestsEnglishUS.java | 37 + .../keyboard/layout/tests/TestsEsperanto.java | 181 + .../keyboard/layout/tests/TestsEstonianEE.java | 37 + .../layout/tests/TestsEstonianEEQwerty.java | 109 + .../keyboard/layout/tests/TestsFinnish.java | 37 + .../keyboard/layout/tests/TestsFinnishQwerty.java | 77 + .../keyboard/layout/tests/TestsFrench.java | 37 + .../keyboard/layout/tests/TestsFrenchCA.java | 37 + .../keyboard/layout/tests/TestsFrenchCH.java | 57 + .../keyboard/layout/tests/TestsFrenchDvorak.java | 62 + .../keyboard/layout/tests/TestsFrenchQwertz.java | 37 + .../keyboard/layout/tests/TestsGalicianES.java | 53 + .../keyboard/layout/tests/TestsGeorgianGE.java | 36 + .../keyboard/layout/tests/TestsGerman.java | 37 + .../keyboard/layout/tests/TestsGermanCH.java | 57 + .../keyboard/layout/tests/TestsGermanDvorak.java | 76 + .../keyboard/layout/tests/TestsGermanQwerty.java | 37 + .../keyboard/layout/tests/TestsGreek.java | 36 + .../keyboard/layout/tests/TestsHebrew.java | 36 + .../keyboard/layout/tests/TestsHindi.java | 37 + .../keyboard/layout/tests/TestsHindiCompact.java | 36 + .../keyboard/layout/tests/TestsHinglish.java | 56 + .../keyboard/layout/tests/TestsHungarian.java | 107 + .../keyboard/layout/tests/TestsIcelandic.java | 106 + .../keyboard/layout/tests/TestsIndonesian.java | 37 + .../keyboard/layout/tests/TestsItalian.java | 53 + .../keyboard/layout/tests/TestsItalianCH.java | 57 + .../keyboard/layout/tests/TestsKannadaIN.java | 36 + .../keyboard/layout/tests/TestsKazakh.java | 82 + .../keyboard/layout/tests/TestsKhmerKH.java | 36 + .../keyboard/layout/tests/TestsKyrgyz.java | 70 + .../keyboard/layout/tests/TestsLaoLA.java | 36 + .../keyboard/layout/tests/TestsLatvian.java | 148 + .../keyboard/layout/tests/TestsLithuanian.java | 149 + .../keyboard/layout/tests/TestsMacedonian.java | 69 + .../keyboard/layout/tests/TestsMalayMY.java | 37 + .../keyboard/layout/tests/TestsMalayalamIN.java | 36 + .../keyboard/layout/tests/TestsMarathiIN.java | 36 + .../keyboard/layout/tests/TestsMongolianMN.java | 36 + .../layout/tests/TestsNepaliRomanized.java | 36 + .../layout/tests/TestsNepaliTraditional.java | 36 + .../keyboard/layout/tests/TestsNoLanguage.java | 37 + .../layout/tests/TestsNoLanguageColemak.java | 53 + .../layout/tests/TestsNoLanguageDvorak.java | 53 + .../layout/tests/TestsNoLanguagePcQwerty.java | 53 + .../keyboard/layout/tests/TestsNorwegian.java | 37 + .../layout/tests/TestsNorwegianColemak.java | 78 + .../keyboard/layout/tests/TestsPersian.java | 36 + .../keyboard/layout/tests/TestsPolish.java | 104 + .../keyboard/layout/tests/TestsPortugueseBR.java | 37 + .../keyboard/layout/tests/TestsPortuguesePT.java | 56 + .../keyboard/layout/tests/TestsQwertyEmail.java | 74 + .../keyboard/layout/tests/TestsQwertyUrl.java | 74 + .../keyboard/layout/tests/TestsRomanian.java | 81 + .../keyboard/layout/tests/TestsRussian.java | 69 + .../keyboard/layout/tests/TestsSerbian.java | 75 + .../keyboard/layout/tests/TestsSerbianLatin.java | 37 + .../layout/tests/TestsSerbianLatinQwerty.java | 87 + .../keyboard/layout/tests/TestsSinhalaLK.java | 36 + .../keyboard/layout/tests/TestsSlovak.java | 155 + .../keyboard/layout/tests/TestsSlovenian.java | 70 + .../keyboard/layout/tests/TestsSpanish.java | 56 + .../keyboard/layout/tests/TestsSpanish419.java | 37 + .../keyboard/layout/tests/TestsSpanishUS.java | 37 + .../tests/TestsSplitLayoutQwertyEnglishUS.java | 62 + .../keyboard/layout/tests/TestsSwahili.java | 93 + .../keyboard/layout/tests/TestsSwedish.java | 37 + .../layout/tests/TestsSwedishPcQwerty.java | 121 + .../keyboard/layout/tests/TestsTagalog.java | 47 + .../keyboard/layout/tests/TestsTamilIN.java | 56 + .../keyboard/layout/tests/TestsTamilLK.java | 56 + .../keyboard/layout/tests/TestsTamilSG.java | 37 + .../keyboard/layout/tests/TestsTeluguIN.java | 36 + .../keyboard/layout/tests/TestsThai.java | 36 + .../keyboard/layout/tests/TestsTurkish.java | 53 + .../keyboard/layout/tests/TestsUkrainian.java | 83 + .../keyboard/layout/tests/TestsUzbek.java | 37 + .../keyboard/layout/tests/TestsUzbekQwerty.java | 47 + .../keyboard/layout/tests/TestsVietnamese.java | 146 + .../keyboard/layout/tests/TestsZulu.java | 37 + .../inputmethod/latin/AppWorkaroundsTests.java | 75 + .../inputmethod/latin/BinaryDictionaryTests.java | 913 +++++ .../inputmethod/latin/BlueUnderlineTests.java | 128 + .../latin/ContactsContentObserverTest.java | 98 + .../latin/ContactsDictionaryUtilsTest.java | 64 + .../inputmethod/latin/ContactsManagerTest.java | 175 + .../latin/DictionaryFacilitatorLruCacheTests.java | 52 + .../kelar/inputmethod/latin/InputLogicTests.java | 786 ++++ .../inputmethod/latin/InputLogicTestsDeadKeys.java | 216 + .../InputLogicTestsLanguageWithoutSpaces.java | 135 + .../kelar/inputmethod/latin/InputTestsBase.java | 463 +++ .../kelar/inputmethod/latin/LatinIMEForTests.java | 36 + .../inputmethod/latin/LatinImeStressTests.java | 62 + .../org/kelar/inputmethod/latin/LatinImeTests.java | 40 + .../kelar/inputmethod/latin/NgramContextTests.java | 161 + .../kelar/inputmethod/latin/PunctuationTests.java | 199 + .../RichInputConnectionAndTextRangeTests.java | 465 +++ .../latin/RichInputMethodSubtypeTests.java | 334 ++ .../kelar/inputmethod/latin/ShiftModeTests.java | 125 + .../inputmethod/latin/SuggestedWordsTests.java | 186 + .../kelar/inputmethod/latin/WordComposerTests.java | 133 + .../accounts/AccountsChangedReceiverTests.java | 130 + .../latin/common/InputPointersTests.java | 344 ++ .../latin/common/ResizableIntArrayTests.java | 399 ++ .../inputmethod/latin/common/StringUtilsTests.java | 501 +++ .../latin/common/UnicodeSurrogateTests.java | 45 + .../latin/makedict/AbstractDictDecoder.java | 104 + .../makedict/BinaryDictDecoderEncoderTests.java | 675 ++++ .../latin/makedict/BinaryDictDecoderUtils.java | 425 ++ .../latin/makedict/BinaryDictEncoderUtils.java | 839 ++++ .../latin/makedict/BinaryDictIOUtils.java | 292 ++ .../latin/makedict/BinaryDictUtils.java | 80 + .../inputmethod/latin/makedict/DictDecoder.java | 222 ++ .../inputmethod/latin/makedict/DictEncoder.java | 39 + .../latin/makedict/FusionDictionary.java | 646 +++ .../inputmethod/latin/makedict/MakedictLog.java | 44 + .../latin/makedict/PendingAttribute.java | 32 + .../inputmethod/latin/makedict/PtNodeInfo.java | 51 + .../latin/makedict/Ver2DictEncoder.java | 280 ++ .../latin/makedict/Ver4DictDecoder.java | 104 + .../latin/makedict/Ver4DictEncoder.java | 133 + .../latin/network/BlockingHttpClientTests.java | 179 + .../network/HttpUrlConnectionBuilderTests.java | 169 + .../UserHistoryDictionaryTests.java | 232 ++ .../UserHistoryDictionaryTestsHelper.java | 144 + .../settings/AccountsSettingsFragmentTests.java | 187 + .../settings/SpacingAndPunctuationsTests.java | 499 +++ .../spellcheck/AndroidSpellCheckerServiceTest.java | 77 + .../SuggestionStripLayoutHelperTests.java | 235 ++ .../NullGestureConsumerTests.java | 56 + .../latin/utils/AdditionalSubtypeUtilsTests.java | 185 + .../latin/utils/AsyncResultHolderTests.java | 84 + .../latin/utils/ByteArrayDictBuffer.java | 81 + .../latin/utils/CapsModeUtilsTests.java | 162 + .../latin/utils/CollectionUtilsTests.java | 104 + .../latin/utils/DictionaryInfoUtilsTests.java | 77 + .../latin/utils/ExecutorUtilsTests.java | 65 + .../latin/utils/ImportantNoticeUtilsTests.java | 135 + .../inputmethod/latin/utils/JsonUtilsTests.java | 43 + .../latin/utils/LanguageOnSpacebarUtilsTests.java | 227 ++ .../latin/utils/RecapitalizeStatusTests.java | 207 + .../latin/utils/ResourceUtilsTests.java | 163 + .../latin/utils/SpannableStringUtilsTests.java | 244 ++ .../latin/utils/SubtypeLocaleUtilsTests.java | 498 +++ tools/EditTextVariations/AndroidManifest.xml | 2 +- tools/EditTextVariations/res/layout/main.xml | 4 +- .../edittextvariations/EchoingTextWatcher.java | 86 - .../edittextvariations/EditTextVariations.java | 576 --- .../tools/edittextvariations/EditorActivity.java | 35 - .../tools/edittextvariations/FinalClassField.java | 64 - .../tools/edittextvariations/InstanceMethod.java | 83 - .../MultiLineShortMessageEditText.java | 46 - .../NotificationBroadcastReceiver.java | 31 - .../edittextvariations/NotificationUtils.java | 125 - .../tools/edittextvariations/ThemeItem.java | 68 - .../edittextvariations/EchoingTextWatcher.java | 86 + .../edittextvariations/EditTextVariations.java | 576 +++ .../tools/edittextvariations/EditorActivity.java | 35 + .../tools/edittextvariations/FinalClassField.java | 64 + .../tools/edittextvariations/InstanceMethod.java | 83 + .../MultiLineShortMessageEditText.java | 46 + .../NotificationBroadcastReceiver.java | 31 + .../edittextvariations/NotificationUtils.java | 125 + .../tools/edittextvariations/ThemeItem.java | 68 + tools/dicttool/Android.bp | 2 +- tools/dicttool/Android.mk | 8 +- .../compat/android/test/AndroidTestCase.java | 2 +- .../com/android/inputmethod/keyboard/Key.java | 25 - .../com/android/inputmethod/keyboard/Keyboard.java | 23 - .../inputmethod/keyboard/ProximityInfo.java | 27 - .../com/android/inputmethod/latin/LatinIME.java | 20 - .../inputmethod/latin/define/JniLibName.java | 25 - .../settings/AdditionalFeaturesSettingUtils.java | 21 - .../utils/WordInputEventForPersonalization.java | 20 - .../compat/org/kelar/inputmethod/keyboard/Key.java | 25 + .../org/kelar/inputmethod/keyboard/Keyboard.java | 23 + .../kelar/inputmethod/keyboard/ProximityInfo.java | 27 + .../org/kelar/inputmethod/latin/LatinIME.java | 20 + .../kelar/inputmethod/latin/define/JniLibName.java | 25 + .../settings/AdditionalFeaturesSettingUtils.java | 21 + .../utils/WordInputEventForPersonalization.java | 20 + tools/dicttool/etc/dicttool_aosp | 2 +- tools/dicttool/etc/manifest.txt | 2 +- .../latin/dicttool/BinaryDictOffdeviceUtils.java | 299 -- .../latin/dicttool/CombinedInputOutput.java | 210 - .../inputmethod/latin/dicttool/CommandList.java | 34 - .../inputmethod/latin/dicttool/Compress.java | 95 - .../android/inputmethod/latin/dicttool/Crypt.java | 70 - .../latin/dicttool/DictionaryMaker.java | 315 -- .../inputmethod/latin/dicttool/Dicttool.java | 140 - .../android/inputmethod/latin/dicttool/Diff.java | 205 - .../android/inputmethod/latin/dicttool/Header.java | 68 - .../android/inputmethod/latin/dicttool/Info.java | 110 - .../inputmethod/latin/dicttool/Makedict.java | 39 - .../inputmethod/latin/dicttool/Package.java | 99 - .../android/inputmethod/latin/dicttool/Test.java | 133 - .../personalization/PersonalizationHelper.java | 23 - .../latin/dicttool/BinaryDictOffdeviceUtils.java | 299 ++ .../latin/dicttool/CombinedInputOutput.java | 210 + .../inputmethod/latin/dicttool/CommandList.java | 34 + .../kelar/inputmethod/latin/dicttool/Compress.java | 95 + .../kelar/inputmethod/latin/dicttool/Crypt.java | 70 + .../latin/dicttool/DictionaryMaker.java | 315 ++ .../kelar/inputmethod/latin/dicttool/Dicttool.java | 140 + .../org/kelar/inputmethod/latin/dicttool/Diff.java | 205 + .../kelar/inputmethod/latin/dicttool/Header.java | 68 + .../org/kelar/inputmethod/latin/dicttool/Info.java | 110 + .../kelar/inputmethod/latin/dicttool/Makedict.java | 39 + .../kelar/inputmethod/latin/dicttool/Package.java | 99 + .../org/kelar/inputmethod/latin/dicttool/Test.java | 133 + .../personalization/PersonalizationHelper.java | 23 + .../dicttool/BinaryDictOffdeviceUtilsTests.java | 212 - .../BinaryDictEncoderFlattenTreeTests.java | 54 - .../latin/makedict/FusionDictionaryTest.java | 111 - tools/dicttool/tests/etc/test-dicttool.sh | 4 +- .../dicttool/BinaryDictOffdeviceUtilsTests.java | 212 + .../BinaryDictEncoderFlattenTreeTests.java | 54 + .../latin/makedict/FusionDictionaryTest.java | 111 + tools/make-keyboard-text/Android.bp | 2 +- tools/make-keyboard-text/etc/manifest.txt | 2 +- .../keyboard/internal/KeyboardTextsTable.tmpl | 114 - .../keyboard/internal/KeyboardTextsTable.tmpl | 114 + .../keyboard/tools/ArrayInitializerFormatter.java | 104 - .../inputmethod/keyboard/tools/JarUtils.java | 117 - .../inputmethod/keyboard/tools/LocaleUtils.java | 167 - .../keyboard/tools/MakeKeyboardText.java | 65 - .../keyboard/tools/MoreKeysResources.java | 255 -- .../inputmethod/keyboard/tools/StringResource.java | 29 - .../keyboard/tools/StringResourceMap.java | 158 - .../keyboard/tools/ArrayInitializerFormatter.java | 104 + .../kelar/inputmethod/keyboard/tools/JarUtils.java | 117 + .../inputmethod/keyboard/tools/LocaleUtils.java | 167 + .../keyboard/tools/MakeKeyboardText.java | 65 + .../keyboard/tools/MoreKeysResources.java | 255 ++ .../inputmethod/keyboard/tools/StringResource.java | 29 + .../keyboard/tools/StringResourceMap.java | 158 + 1799 files changed, 118581 insertions(+), 118600 deletions(-) delete mode 100644 common/src/com/android/inputmethod/annotations/ExternallyReferenced.java delete mode 100644 common/src/com/android/inputmethod/annotations/UsedForTesting.java delete mode 100644 common/src/com/android/inputmethod/latin/common/CodePointUtils.java delete mode 100644 common/src/com/android/inputmethod/latin/common/CollectionUtils.java delete mode 100644 common/src/com/android/inputmethod/latin/common/ComposedData.java delete mode 100644 common/src/com/android/inputmethod/latin/common/Constants.java delete mode 100644 common/src/com/android/inputmethod/latin/common/CoordinateUtils.java delete mode 100644 common/src/com/android/inputmethod/latin/common/FileUtils.java delete mode 100644 common/src/com/android/inputmethod/latin/common/InputPointers.java delete mode 100644 common/src/com/android/inputmethod/latin/common/LocaleUtils.java delete mode 100644 common/src/com/android/inputmethod/latin/common/NativeSuggestOptions.java delete mode 100644 common/src/com/android/inputmethod/latin/common/ResizableIntArray.java delete mode 100644 common/src/com/android/inputmethod/latin/common/StringUtils.java delete mode 100644 common/src/com/android/inputmethod/latin/common/UnicodeSurrogate.java create mode 100644 common/src/org/kelar/inputmethod/annotations/ExternallyReferenced.java create mode 100644 common/src/org/kelar/inputmethod/annotations/UsedForTesting.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/CodePointUtils.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/CollectionUtils.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/ComposedData.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/Constants.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/CoordinateUtils.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/FileUtils.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/InputPointers.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/LocaleUtils.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/NativeSuggestOptions.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/ResizableIntArray.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/StringUtils.java create mode 100644 common/src/org/kelar/inputmethod/latin/common/UnicodeSurrogate.java delete mode 100644 java/src/com/android/inputmethod/accessibility/AccessibilityLongPressTimer.java delete mode 100644 java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java delete mode 100644 java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java delete mode 100644 java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java delete mode 100644 java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java delete mode 100644 java/src/com/android/inputmethod/accessibility/MainKeyboardAccessibilityDelegate.java delete mode 100644 java/src/com/android/inputmethod/accessibility/MoreKeysKeyboardAccessibilityDelegate.java delete mode 100644 java/src/com/android/inputmethod/compat/ActivityManagerCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java delete mode 100644 java/src/com/android/inputmethod/compat/AppWorkaroundsUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/BuildCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/CharacterCompat.java delete mode 100644 java/src/com/android/inputmethod/compat/CompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/ConnectivityManagerCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java delete mode 100644 java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/InputConnectionCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java delete mode 100644 java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/IntentCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/LocaleListCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/LocaleSpanCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/LooperCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/NotificationCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/SettingsSecureCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/SuggestionsInfoCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/TextInfoCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/TextViewCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/UserDictionaryCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/ViewCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtils.java delete mode 100644 java/src/com/android/inputmethod/compat/ViewOutlineProviderCompatUtilsLXX.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/ActionBatch.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/AssetFileAddress.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/BadFormatException.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/ButtonSwitcher.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/CommonPreferences.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/CompletedDownloadInfo.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DictionaryDownloadProgressBar.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DictionaryListInterfaceState.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DictionaryProvider.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DictionaryService.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DictionarySettingsActivity.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DictionarySettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DownloadIdAndStartDate.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DownloadOverMeteredDialog.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/DownloadRecord.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/EventHandler.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/LogProblemReporter.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/MD5Calculator.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/MetadataHandler.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/MetadataParser.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/PrivateLog.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/ProblemReporter.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/WordListMetadata.java delete mode 100644 java/src/com/android/inputmethod/dictionarypack/WordListPreference.java delete mode 100644 java/src/com/android/inputmethod/event/Combiner.java delete mode 100644 java/src/com/android/inputmethod/event/CombinerChain.java delete mode 100644 java/src/com/android/inputmethod/event/DeadKeyCombiner.java delete mode 100644 java/src/com/android/inputmethod/event/Event.java delete mode 100644 java/src/com/android/inputmethod/event/EventDecoder.java delete mode 100644 java/src/com/android/inputmethod/event/HardwareEventDecoder.java delete mode 100644 java/src/com/android/inputmethod/event/HardwareKeyboardEventDecoder.java delete mode 100644 java/src/com/android/inputmethod/event/InputTransaction.java delete mode 100644 java/src/com/android/inputmethod/keyboard/Key.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyDetector.java delete mode 100644 java/src/com/android/inputmethod/keyboard/Keyboard.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyboardId.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyboardLayout.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyboardTheme.java delete mode 100644 java/src/com/android/inputmethod/keyboard/KeyboardView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/MainKeyboardView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java delete mode 100644 java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java delete mode 100644 java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/MoreKeysPanel.java delete mode 100644 java/src/com/android/inputmethod/keyboard/PointerTracker.java delete mode 100644 java/src/com/android/inputmethod/keyboard/ProximityInfo.java delete mode 100644 java/src/com/android/inputmethod/keyboard/emoji/DynamicGridKeyboard.java delete mode 100644 java/src/com/android/inputmethod/keyboard/emoji/EmojiCategory.java delete mode 100644 java/src/com/android/inputmethod/keyboard/emoji/EmojiCategoryPageIndicatorView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/emoji/EmojiLayoutParams.java delete mode 100644 java/src/com/android/inputmethod/keyboard/emoji/EmojiPageKeyboardView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesAdapter.java delete mode 100644 java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/AbstractDrawingPreview.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/AlphabetShiftState.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/BatchInputArbiter.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/BogusMoveEventDetector.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/CodesArrayParser.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/DrawingPreviewPlacerView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/DrawingProxy.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureEnabler.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureFloatingTextDrawingPreview.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureStrokeDrawingParams.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureStrokeDrawingPoints.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureStrokeRecognitionParams.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureStrokeRecognitionPoints.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureTrailDrawingParams.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureTrailDrawingPoints.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/GestureTrailsDrawingPreview.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/HermiteInterpolator.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyDrawParams.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyPreviewChoreographer.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyPreviewDrawParams.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyPreviewView.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyStyle.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardRow.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/MatrixUtils.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/ModifierKeyState.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/NonDistinctMultitouchHelper.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueue.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/RoundedLine.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/ShiftKeyState.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/SlidingKeyInputDrawingPreview.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/SmoothingUtils.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/TimerHandler.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/TimerProxy.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/TouchPositionCorrection.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/TypingTimeRecorder.java delete mode 100644 java/src/com/android/inputmethod/keyboard/internal/UniqueKeysCache.java delete mode 100644 java/src/com/android/inputmethod/latin/AssetFileAddress.java delete mode 100644 java/src/com/android/inputmethod/latin/AudioAndHapticFeedbackManager.java delete mode 100644 java/src/com/android/inputmethod/latin/BackupAgent.java delete mode 100644 java/src/com/android/inputmethod/latin/BinaryDictionary.java delete mode 100644 java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java delete mode 100644 java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java delete mode 100644 java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java delete mode 100644 java/src/com/android/inputmethod/latin/ContactsContentObserver.java delete mode 100644 java/src/com/android/inputmethod/latin/ContactsDictionaryConstants.java delete mode 100644 java/src/com/android/inputmethod/latin/ContactsDictionaryUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/ContactsManager.java delete mode 100644 java/src/com/android/inputmethod/latin/DicTraverseSession.java delete mode 100644 java/src/com/android/inputmethod/latin/Dictionary.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryCollection.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryDumpBroadcastReceiver.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryFacilitator.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryFacilitatorLruCache.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryFacilitatorProvider.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryFactory.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryPackInstallBroadcastReceiver.java delete mode 100644 java/src/com/android/inputmethod/latin/DictionaryStats.java delete mode 100644 java/src/com/android/inputmethod/latin/EmojiAltPhysicalKeyDetector.java delete mode 100644 java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java delete mode 100644 java/src/com/android/inputmethod/latin/InputAttributes.java delete mode 100644 java/src/com/android/inputmethod/latin/InputView.java delete mode 100644 java/src/com/android/inputmethod/latin/LastComposedWord.java delete mode 100644 java/src/com/android/inputmethod/latin/LatinIME.java delete mode 100644 java/src/com/android/inputmethod/latin/NgramContext.java delete mode 100644 java/src/com/android/inputmethod/latin/PunctuationSuggestions.java delete mode 100644 java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java delete mode 100644 java/src/com/android/inputmethod/latin/RichInputConnection.java delete mode 100644 java/src/com/android/inputmethod/latin/RichInputMethodManager.java delete mode 100644 java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java delete mode 100644 java/src/com/android/inputmethod/latin/Suggest.java delete mode 100644 java/src/com/android/inputmethod/latin/SuggestedWords.java delete mode 100644 java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java delete mode 100644 java/src/com/android/inputmethod/latin/UserBinaryDictionary.java delete mode 100644 java/src/com/android/inputmethod/latin/WordComposer.java delete mode 100644 java/src/com/android/inputmethod/latin/WordListInfo.java delete mode 100644 java/src/com/android/inputmethod/latin/about/AboutPreferences.java delete mode 100644 java/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java delete mode 100644 java/src/com/android/inputmethod/latin/accounts/AccountsChangedReceiver.java delete mode 100644 java/src/com/android/inputmethod/latin/accounts/AuthUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/accounts/LoginAccountUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/define/DebugFlags.java delete mode 100644 java/src/com/android/inputmethod/latin/define/DecoderSpecificConstants.java delete mode 100644 java/src/com/android/inputmethod/latin/define/JniLibName.java delete mode 100644 java/src/com/android/inputmethod/latin/define/ProductionFlags.java delete mode 100644 java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java delete mode 100644 java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java delete mode 100644 java/src/com/android/inputmethod/latin/inputlogic/PrivateCommandPerformer.java delete mode 100644 java/src/com/android/inputmethod/latin/inputlogic/SpaceState.java delete mode 100644 java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java delete mode 100644 java/src/com/android/inputmethod/latin/makedict/FormatSpec.java delete mode 100644 java/src/com/android/inputmethod/latin/makedict/NgramProperty.java delete mode 100644 java/src/com/android/inputmethod/latin/makedict/ProbabilityInfo.java delete mode 100644 java/src/com/android/inputmethod/latin/makedict/UnsupportedFormatException.java delete mode 100644 java/src/com/android/inputmethod/latin/makedict/WeightedString.java delete mode 100644 java/src/com/android/inputmethod/latin/makedict/WordProperty.java delete mode 100644 java/src/com/android/inputmethod/latin/network/AuthException.java delete mode 100644 java/src/com/android/inputmethod/latin/network/BlockingHttpClient.java delete mode 100644 java/src/com/android/inputmethod/latin/network/HttpException.java delete mode 100644 java/src/com/android/inputmethod/latin/network/HttpUrlConnectionBuilder.java delete mode 100644 java/src/com/android/inputmethod/latin/permissions/PermissionsActivity.java delete mode 100644 java/src/com/android/inputmethod/latin/permissions/PermissionsManager.java delete mode 100644 java/src/com/android/inputmethod/latin/permissions/PermissionsUtil.java delete mode 100644 java/src/com/android/inputmethod/latin/personalization/AccountUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java delete mode 100644 java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/AccountsSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/AdvancedSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/AppearanceSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/CorrectionSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/CustomInputStylePreference.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/DebugSettings.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/DebugSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/GestureSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/LocalSettingsConstants.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/PreferencesSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/RadioButtonPreference.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/SeekBarDialogPreference.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/Settings.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/SettingsActivity.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/SettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/SettingsValues.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/SettingsValuesForSuggestion.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/SubScreenFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/TestFragmentActivity.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/ThemeSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/settings/TwoStatePreferenceHelper.java delete mode 100644 java/src/com/android/inputmethod/latin/setup/SetupActivity.java delete mode 100644 java/src/com/android/inputmethod/latin/setup/SetupStartIndicatorView.java delete mode 100644 java/src/com/android/inputmethod/latin/setup/SetupStepIndicatorView.java delete mode 100644 java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java delete mode 100644 java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java delete mode 100644 java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java delete mode 100644 java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerSessionFactory.java delete mode 100644 java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java delete mode 100644 java/src/com/android/inputmethod/latin/spellcheck/SentenceLevelAdapter.java delete mode 100644 java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerSettingsActivity.java delete mode 100644 java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerSettingsFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java delete mode 100644 java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java delete mode 100644 java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java delete mode 100644 java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java delete mode 100644 java/src/com/android/inputmethod/latin/suggestions/SuggestionStripViewAccessor.java delete mode 100644 java/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java delete mode 100644 java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryAddWordContents.java delete mode 100644 java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryAddWordFragment.java delete mode 100644 java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java delete mode 100644 java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryLocalePicker.java delete mode 100644 java/src/com/android/inputmethod/latin/userdictionary/UserDictionarySettings.java delete mode 100644 java/src/com/android/inputmethod/latin/userdictionary/UserDictionarySettingsUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/ApplicationUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/BinaryDictionaryUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/CompletionInfoUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/CursorAnchorInfoUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/DialogUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/DictionaryHeaderUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/FileTransforms.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/FragmentUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/InputTypeUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/IntentUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/JniUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/JsonUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/LanguageOnSpacebarUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/LeakGuardHandlerWrapper.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/ManagedProfileUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/NgramContextUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/RecapitalizeStatus.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/ResourceUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/RunInLocale.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/ScriptUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/SpannableStringUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/StatsUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/StatsUtilsManager.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/SuggestionResults.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/TargetPackageInfoGetterTask.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/TextRange.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/TypefaceUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/UncachedInputMethodManagerUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/ViewLayoutUtils.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/WordInputEventForPersonalization.java delete mode 100644 java/src/com/android/inputmethod/latin/utils/XmlParseUtils.java delete mode 100644 java/src/com/android/inputmethodcommon/InputMethodSettingsActivity.java delete mode 100644 java/src/com/android/inputmethodcommon/InputMethodSettingsFragment.java delete mode 100644 java/src/com/android/inputmethodcommon/InputMethodSettingsImpl.java delete mode 100644 java/src/com/android/inputmethodcommon/InputMethodSettingsInterface.java create mode 100644 java/src/org/kelar/inputmethod/accessibility/AccessibilityLongPressTimer.java create mode 100644 java/src/org/kelar/inputmethod/accessibility/AccessibilityUtils.java create mode 100644 java/src/org/kelar/inputmethod/accessibility/KeyCodeDescriptionMapper.java create mode 100644 java/src/org/kelar/inputmethod/accessibility/KeyboardAccessibilityDelegate.java create mode 100644 java/src/org/kelar/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java create mode 100644 java/src/org/kelar/inputmethod/accessibility/MainKeyboardAccessibilityDelegate.java create mode 100644 java/src/org/kelar/inputmethod/accessibility/MoreKeysKeyboardAccessibilityDelegate.java create mode 100644 java/src/org/kelar/inputmethod/compat/ActivityManagerCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/AppWorkaroundsHelper.java create mode 100644 java/src/org/kelar/inputmethod/compat/AppWorkaroundsUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/BuildCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/CharacterCompat.java create mode 100644 java/src/org/kelar/inputmethod/compat/CompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/ConnectivityManagerCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/CursorAnchorInfoCompatWrapper.java create mode 100644 java/src/org/kelar/inputmethod/compat/EditorInfoCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/InputConnectionCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/InputMethodManagerCompatWrapper.java create mode 100644 java/src/org/kelar/inputmethod/compat/InputMethodServiceCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/InputMethodSubtypeCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/IntentCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/LocaleListCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/LocaleSpanCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/LooperCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/NotificationCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/SettingsSecureCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/SuggestionSpanUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/SuggestionsInfoCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/TextInfoCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/TextViewCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/UserDictionaryCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/UserManagerCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/ViewCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/ViewOutlineProviderCompatUtils.java create mode 100644 java/src/org/kelar/inputmethod/compat/ViewOutlineProviderCompatUtilsLXX.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/ActionBatch.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/AssetFileAddress.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/BadFormatException.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/ButtonSwitcher.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/CommonPreferences.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/CompletedDownloadInfo.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DictionaryDownloadProgressBar.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DictionaryListInterfaceState.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DictionaryPackConstants.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DictionaryProvider.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DictionaryService.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DictionarySettingsActivity.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DictionarySettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DownloadIdAndStartDate.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DownloadManagerWrapper.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DownloadOverMeteredDialog.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/DownloadRecord.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/EventHandler.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/LogProblemReporter.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/MD5Calculator.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/MetadataDbHelper.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/MetadataHandler.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/MetadataParser.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/MetadataUriGetter.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/PrivateLog.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/ProblemReporter.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/UpdateHandler.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/WordListMetadata.java create mode 100644 java/src/org/kelar/inputmethod/dictionarypack/WordListPreference.java create mode 100644 java/src/org/kelar/inputmethod/event/Combiner.java create mode 100644 java/src/org/kelar/inputmethod/event/CombinerChain.java create mode 100644 java/src/org/kelar/inputmethod/event/DeadKeyCombiner.java create mode 100644 java/src/org/kelar/inputmethod/event/Event.java create mode 100644 java/src/org/kelar/inputmethod/event/EventDecoder.java create mode 100644 java/src/org/kelar/inputmethod/event/HardwareEventDecoder.java create mode 100644 java/src/org/kelar/inputmethod/event/HardwareKeyboardEventDecoder.java create mode 100644 java/src/org/kelar/inputmethod/event/InputTransaction.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/Key.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyDetector.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/Keyboard.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyboardActionListener.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyboardId.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyboardLayout.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyboardLayoutSet.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyboardSwitcher.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyboardTheme.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/KeyboardView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/MainKeyboardView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/MoreKeysDetector.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/MoreKeysKeyboard.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/MoreKeysKeyboardView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/MoreKeysPanel.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/PointerTracker.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/ProximityInfo.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/emoji/DynamicGridKeyboard.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/emoji/EmojiCategory.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/emoji/EmojiCategoryPageIndicatorView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/emoji/EmojiLayoutParams.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/emoji/EmojiPageKeyboardView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/emoji/EmojiPalettesAdapter.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/emoji/EmojiPalettesView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/AbstractDrawingPreview.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/AlphabetShiftState.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/BatchInputArbiter.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/BogusMoveEventDetector.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/CodesArrayParser.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/DrawingPreviewPlacerView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/DrawingProxy.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureEnabler.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureFloatingTextDrawingPreview.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureStrokeDrawingParams.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureStrokeDrawingPoints.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureStrokeRecognitionParams.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureStrokeRecognitionPoints.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureTrailDrawingParams.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureTrailDrawingPoints.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/GestureTrailsDrawingPreview.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/HermiteInterpolator.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyDrawParams.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyPreviewChoreographer.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyPreviewDrawParams.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyPreviewView.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeySpecParser.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyStyle.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyStylesSet.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyVisualAttributes.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardBuilder.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardCodesSet.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardIconsSet.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardParams.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardRow.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardState.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardTextsSet.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/KeyboardTextsTable.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/MatrixUtils.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/ModifierKeyState.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/MoreKeySpec.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/NonDistinctMultitouchHelper.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/PointerTrackerQueue.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/RoundedLine.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/ShiftKeyState.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/SlidingKeyInputDrawingPreview.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/SmoothingUtils.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/TimerHandler.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/TimerProxy.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/TouchPositionCorrection.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/TypingTimeRecorder.java create mode 100644 java/src/org/kelar/inputmethod/keyboard/internal/UniqueKeysCache.java create mode 100644 java/src/org/kelar/inputmethod/latin/AssetFileAddress.java create mode 100644 java/src/org/kelar/inputmethod/latin/AudioAndHapticFeedbackManager.java create mode 100644 java/src/org/kelar/inputmethod/latin/BackupAgent.java create mode 100644 java/src/org/kelar/inputmethod/latin/BinaryDictionary.java create mode 100644 java/src/org/kelar/inputmethod/latin/BinaryDictionaryFileDumper.java create mode 100644 java/src/org/kelar/inputmethod/latin/BinaryDictionaryGetter.java create mode 100644 java/src/org/kelar/inputmethod/latin/ContactsBinaryDictionary.java create mode 100644 java/src/org/kelar/inputmethod/latin/ContactsContentObserver.java create mode 100644 java/src/org/kelar/inputmethod/latin/ContactsDictionaryConstants.java create mode 100644 java/src/org/kelar/inputmethod/latin/ContactsDictionaryUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/ContactsManager.java create mode 100644 java/src/org/kelar/inputmethod/latin/DicTraverseSession.java create mode 100644 java/src/org/kelar/inputmethod/latin/Dictionary.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryCollection.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryDumpBroadcastReceiver.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryFacilitator.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryFacilitatorImpl.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryFacilitatorLruCache.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryFacilitatorProvider.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryFactory.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryPackInstallBroadcastReceiver.java create mode 100644 java/src/org/kelar/inputmethod/latin/DictionaryStats.java create mode 100644 java/src/org/kelar/inputmethod/latin/EmojiAltPhysicalKeyDetector.java create mode 100644 java/src/org/kelar/inputmethod/latin/ExpandableBinaryDictionary.java create mode 100644 java/src/org/kelar/inputmethod/latin/InputAttributes.java create mode 100644 java/src/org/kelar/inputmethod/latin/InputView.java create mode 100644 java/src/org/kelar/inputmethod/latin/LastComposedWord.java create mode 100644 java/src/org/kelar/inputmethod/latin/LatinIME.java create mode 100644 java/src/org/kelar/inputmethod/latin/NgramContext.java create mode 100644 java/src/org/kelar/inputmethod/latin/PunctuationSuggestions.java create mode 100644 java/src/org/kelar/inputmethod/latin/ReadOnlyBinaryDictionary.java create mode 100644 java/src/org/kelar/inputmethod/latin/RichInputConnection.java create mode 100644 java/src/org/kelar/inputmethod/latin/RichInputMethodManager.java create mode 100644 java/src/org/kelar/inputmethod/latin/RichInputMethodSubtype.java create mode 100644 java/src/org/kelar/inputmethod/latin/Suggest.java create mode 100644 java/src/org/kelar/inputmethod/latin/SuggestedWords.java create mode 100644 java/src/org/kelar/inputmethod/latin/SystemBroadcastReceiver.java create mode 100644 java/src/org/kelar/inputmethod/latin/UserBinaryDictionary.java create mode 100644 java/src/org/kelar/inputmethod/latin/WordComposer.java create mode 100644 java/src/org/kelar/inputmethod/latin/WordListInfo.java create mode 100644 java/src/org/kelar/inputmethod/latin/about/AboutPreferences.java create mode 100644 java/src/org/kelar/inputmethod/latin/accounts/AccountStateChangedListener.java create mode 100644 java/src/org/kelar/inputmethod/latin/accounts/AccountsChangedReceiver.java create mode 100644 java/src/org/kelar/inputmethod/latin/accounts/AuthUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/accounts/LoginAccountUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/define/DebugFlags.java create mode 100644 java/src/org/kelar/inputmethod/latin/define/DecoderSpecificConstants.java create mode 100644 java/src/org/kelar/inputmethod/latin/define/JniLibName.java create mode 100644 java/src/org/kelar/inputmethod/latin/define/ProductionFlags.java create mode 100644 java/src/org/kelar/inputmethod/latin/inputlogic/InputLogic.java create mode 100644 java/src/org/kelar/inputmethod/latin/inputlogic/InputLogicHandler.java create mode 100644 java/src/org/kelar/inputmethod/latin/inputlogic/PrivateCommandPerformer.java create mode 100644 java/src/org/kelar/inputmethod/latin/inputlogic/SpaceState.java create mode 100644 java/src/org/kelar/inputmethod/latin/makedict/DictionaryHeader.java create mode 100644 java/src/org/kelar/inputmethod/latin/makedict/FormatSpec.java create mode 100644 java/src/org/kelar/inputmethod/latin/makedict/NgramProperty.java create mode 100644 java/src/org/kelar/inputmethod/latin/makedict/ProbabilityInfo.java create mode 100644 java/src/org/kelar/inputmethod/latin/makedict/UnsupportedFormatException.java create mode 100644 java/src/org/kelar/inputmethod/latin/makedict/WeightedString.java create mode 100644 java/src/org/kelar/inputmethod/latin/makedict/WordProperty.java create mode 100644 java/src/org/kelar/inputmethod/latin/network/AuthException.java create mode 100644 java/src/org/kelar/inputmethod/latin/network/BlockingHttpClient.java create mode 100644 java/src/org/kelar/inputmethod/latin/network/HttpException.java create mode 100644 java/src/org/kelar/inputmethod/latin/network/HttpUrlConnectionBuilder.java create mode 100644 java/src/org/kelar/inputmethod/latin/permissions/PermissionsActivity.java create mode 100644 java/src/org/kelar/inputmethod/latin/permissions/PermissionsManager.java create mode 100644 java/src/org/kelar/inputmethod/latin/permissions/PermissionsUtil.java create mode 100644 java/src/org/kelar/inputmethod/latin/personalization/AccountUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/personalization/PersonalizationHelper.java create mode 100644 java/src/org/kelar/inputmethod/latin/personalization/UserHistoryDictionary.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/AccountsSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/AdvancedSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/AppearanceSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/CorrectionSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/CustomInputStylePreference.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/DebugSettings.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/DebugSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/GestureSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/LocalSettingsConstants.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/PreferencesSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/RadioButtonPreference.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/SeekBarDialogPreference.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/Settings.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/SettingsActivity.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/SettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/SettingsValues.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/SettingsValuesForSuggestion.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/SpacingAndPunctuations.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/SubScreenFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/TestFragmentActivity.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/ThemeSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/settings/TwoStatePreferenceHelper.java create mode 100644 java/src/org/kelar/inputmethod/latin/setup/SetupActivity.java create mode 100644 java/src/org/kelar/inputmethod/latin/setup/SetupStartIndicatorView.java create mode 100644 java/src/org/kelar/inputmethod/latin/setup/SetupStepIndicatorView.java create mode 100644 java/src/org/kelar/inputmethod/latin/setup/SetupWizardActivity.java create mode 100644 java/src/org/kelar/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java create mode 100644 java/src/org/kelar/inputmethod/latin/spellcheck/AndroidSpellCheckerSession.java create mode 100644 java/src/org/kelar/inputmethod/latin/spellcheck/AndroidSpellCheckerSessionFactory.java create mode 100644 java/src/org/kelar/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java create mode 100644 java/src/org/kelar/inputmethod/latin/spellcheck/SentenceLevelAdapter.java create mode 100644 java/src/org/kelar/inputmethod/latin/spellcheck/SpellCheckerSettingsActivity.java create mode 100644 java/src/org/kelar/inputmethod/latin/spellcheck/SpellCheckerSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/suggestions/MoreSuggestions.java create mode 100644 java/src/org/kelar/inputmethod/latin/suggestions/MoreSuggestionsView.java create mode 100644 java/src/org/kelar/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java create mode 100644 java/src/org/kelar/inputmethod/latin/suggestions/SuggestionStripView.java create mode 100644 java/src/org/kelar/inputmethod/latin/suggestions/SuggestionStripViewAccessor.java create mode 100644 java/src/org/kelar/inputmethod/latin/touchinputconsumer/GestureConsumer.java create mode 100644 java/src/org/kelar/inputmethod/latin/userdictionary/UserDictionaryAddWordContents.java create mode 100644 java/src/org/kelar/inputmethod/latin/userdictionary/UserDictionaryAddWordFragment.java create mode 100644 java/src/org/kelar/inputmethod/latin/userdictionary/UserDictionaryList.java create mode 100644 java/src/org/kelar/inputmethod/latin/userdictionary/UserDictionaryLocalePicker.java create mode 100644 java/src/org/kelar/inputmethod/latin/userdictionary/UserDictionarySettings.java create mode 100644 java/src/org/kelar/inputmethod/latin/userdictionary/UserDictionarySettingsUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/AdditionalSubtypeUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/ApplicationUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/AsyncResultHolder.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/AutoCorrectionUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/BinaryDictionaryUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/CapsModeUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/CombinedFormatUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/CompletionInfoUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/CursorAnchorInfoUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/DebugLogUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/DialogUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/DictionaryHeaderUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/DictionaryInfoUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/ExecutorUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/FeedbackUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/FileTransforms.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/FragmentUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/ImportantNoticeUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/InputTypeUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/IntentUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/JniUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/JsonUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/LanguageOnSpacebarUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/LeakGuardHandlerWrapper.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/ManagedProfileUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/MetadataFileUriGetter.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/NgramContextUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/RecapitalizeStatus.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/ResourceUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/RunInLocale.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/ScriptUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/SpannableStringUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/StatsUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/StatsUtilsManager.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/SubtypeLocaleUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/SuggestionResults.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/TargetPackageInfoGetterTask.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/TextRange.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/TypefaceUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/UncachedInputMethodManagerUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/ViewLayoutUtils.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/WordInputEventForPersonalization.java create mode 100644 java/src/org/kelar/inputmethod/latin/utils/XmlParseUtils.java create mode 100644 java/src/org/kelar/inputmethodcommon/InputMethodSettingsActivity.java create mode 100644 java/src/org/kelar/inputmethodcommon/InputMethodSettingsFragment.java create mode 100644 java/src/org/kelar/inputmethodcommon/InputMethodSettingsImpl.java create mode 100644 java/src/org/kelar/inputmethodcommon/InputMethodSettingsInterface.java delete mode 100644 native/jni/com_android_inputmethod_keyboard_ProximityInfo.cpp delete mode 100644 native/jni/com_android_inputmethod_keyboard_ProximityInfo.h delete mode 100644 native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp delete mode 100644 native/jni/com_android_inputmethod_latin_BinaryDictionary.h delete mode 100644 native/jni/com_android_inputmethod_latin_BinaryDictionaryUtils.cpp delete mode 100644 native/jni/com_android_inputmethod_latin_BinaryDictionaryUtils.h delete mode 100644 native/jni/com_android_inputmethod_latin_DicTraverseSession.cpp delete mode 100644 native/jni/com_android_inputmethod_latin_DicTraverseSession.h create mode 100644 native/jni/org_kelar_inputmethod_keyboard_ProximityInfo.cpp create mode 100644 native/jni/org_kelar_inputmethod_keyboard_ProximityInfo.h create mode 100644 native/jni/org_kelar_inputmethod_latin_BinaryDictionary.cpp create mode 100644 native/jni/org_kelar_inputmethod_latin_BinaryDictionary.h create mode 100644 native/jni/org_kelar_inputmethod_latin_BinaryDictionaryUtils.cpp create mode 100644 native/jni/org_kelar_inputmethod_latin_BinaryDictionaryUtils.h create mode 100644 native/jni/org_kelar_inputmethod_latin_DicTraverseSession.cpp create mode 100644 native/jni/org_kelar_inputmethod_latin_DicTraverseSession.h delete mode 100644 tests/src/com/android/inputmethod/compat/LocaleSpanCompatUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java delete mode 100644 tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysKlpTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysLxxTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/KeyboardLayoutTest.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderAutoOrderTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderMaxOrderTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/ActionTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionCustomTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionDoneTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionGoTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionLabelTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionNextTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionNoneTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionPreviousTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionSearchTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionSendTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/KlpActionUnspecifiedTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionCustomTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionDoneTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionGoTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionNextTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionNoneTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionPreviousTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionSearchTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionSendTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/action/LxxActionUnspecifiedTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/HermiteInterpolatorTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/KeyboardStateMultiTouchTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/KeyboardStateSingleTouchTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/KeyboardStateTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSetTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/MatrixUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/MockKeyboardSwitcher.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueueTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/internal/SmoothingUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Arabic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/ArmenianPhonetic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Azerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Bengali.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/BengaliAkkhor.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Colemak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/DevanagariLetterConstants.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Farsi.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Georgian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Greek.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Hindi.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/HindiCompact.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Kannada.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Khmer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Lao.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Marathi.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Nordic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/PcQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/SerbianQwertz.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Sinhala.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Spanish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Swiss.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Symbols.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Tamil.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Telugu.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Thai.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/Uzbek.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/BengaliCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/DanishCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/DevanagariCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/DutchCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/DvorakCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/EastSlavicCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/EnglishCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/EstonianEECustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/EuroCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/FinnishCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/FrenchCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/GermanCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/HindiCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/ItalianCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/LayoutCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/NepaliCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/NoLanguageCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/NorwegianCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/PcQwertyCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/PortugueseCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/SerbianLatinCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/SouthSlavicLayoutCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/SpanishCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/SwedishCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/TamilCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/TurkicCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/customizer/UzbekCustomizer.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractKeyboardBuilder.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKey.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyOutput.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyVisual.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/KeyboardLayoutSetSubtypesCountTests.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArabic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsArmenianAMPhonetic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliIN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBulgarianBds.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakEmail.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDvorakUrl.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishIN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEEQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGeorgianGE.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGreek.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindi.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHindiCompact.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIndonesian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalianCH.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKannadaIN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKhmerKH.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLaoLA.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayMY.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMarathiIN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMongolianMN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliRomanized.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNepaliTraditional.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguagePcQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPersian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyEmail.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsQwertyUrl.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSinhalaLK.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilLK.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilSG.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTeluguIN.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsThai.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java delete mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java delete mode 100644 tests/src/com/android/inputmethod/latin/AppWorkaroundsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/BlueUnderlineTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/ContactsContentObserverTest.java delete mode 100644 tests/src/com/android/inputmethod/latin/ContactsDictionaryUtilsTest.java delete mode 100644 tests/src/com/android/inputmethod/latin/ContactsManagerTest.java delete mode 100644 tests/src/com/android/inputmethod/latin/DictionaryFacilitatorLruCacheTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/InputLogicTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/InputLogicTestsDeadKeys.java delete mode 100644 tests/src/com/android/inputmethod/latin/InputLogicTestsLanguageWithoutSpaces.java delete mode 100644 tests/src/com/android/inputmethod/latin/InputTestsBase.java delete mode 100644 tests/src/com/android/inputmethod/latin/LatinIMEForTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/LatinImeStressTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/LatinImeTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/NgramContextTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/PunctuationTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/ShiftModeTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/WordComposerTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/accounts/AccountsChangedReceiverTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/common/InputPointersTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/common/ResizableIntArrayTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/common/StringUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/common/UnicodeSurrogateTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/DictDecoder.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/DictEncoder.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/MakedictLog.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/PendingAttribute.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/PtNodeInfo.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java delete mode 100644 tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java delete mode 100644 tests/src/com/android/inputmethod/latin/network/BlockingHttpClientTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/network/HttpUrlConnectionBuilderTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java delete mode 100644 tests/src/com/android/inputmethod/latin/settings/AccountsSettingsFragmentTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/settings/SpacingAndPunctuationsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java delete mode 100644 tests/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelperTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/AsyncResultHolderTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/ByteArrayDictBuffer.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/CollectionUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/ExecutorUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/ImportantNoticeUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/RecapitalizeStatusTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java delete mode 100644 tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/compat/LocaleSpanCompatUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/compat/SuggestionSpanUtilsTest.java create mode 100644 tests/src/org/kelar/inputmethod/compat/TextInfoCompatUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysKlpTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/KeyboardLayoutSetNavigateMoreKeysLxxTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/KeyboardLayoutTest.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/KeyboardThemeTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/MoreKeysKeyboardBuilderAutoOrderTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/MoreKeysKeyboardBuilderMaxOrderTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/ActionTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionCustomTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionDoneTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionGoTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionLabelTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionNextTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionNoneTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionPreviousTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionSearchTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionSendTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/KlpActionUnspecifiedTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionCustomTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionDoneTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionGoTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionNextTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionNoneTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionPreviousTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionSearchTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionSendTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/action/LxxActionUnspecifiedTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/HermiteInterpolatorTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/KeySpecParserTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/KeySpecParserTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/KeyboardStateMultiTouchTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/KeyboardStateSingleTouchTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/KeyboardStateTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/KeyboardTextsSetTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/MatrixUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/MockKeyboardSwitcher.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/MoreKeySpecTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/PointerTrackerQueueTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/internal/SmoothingUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Arabic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/ArmenianPhonetic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Azerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Bengali.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/BengaliAkkhor.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Bulgarian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/BulgarianBds.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Colemak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/DevanagariLetterConstants.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Dvorak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/EastSlavic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Farsi.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Georgian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Greek.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Hebrew.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Hindi.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/HindiCompact.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Kannada.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Khmer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Lao.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/LayoutBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Malayalam.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Marathi.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Mongolian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/NepaliRomanized.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/NepaliTraditional.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Nordic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/PcQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Qwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Qwertz.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/SerbianQwertz.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Sinhala.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/SouthSlavic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Spanish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Swiss.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Symbols.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/SymbolsShifted.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Tamil.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Telugu.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Thai.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/Uzbek.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/BengaliCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/DanishCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/DevanagariCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/DutchCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/DvorakCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/EastSlavicCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/EnglishCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/EstonianEECustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/EuroCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/FinnishCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/FrenchCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/GermanCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/HindiCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/ItalianCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/LayoutCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/NepaliCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/NoLanguageCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/NorwegianCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/PcQwertyCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/PortugueseCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/SerbianLatinCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/SouthSlavicLayoutCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/SpanishCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/SwedishCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/TamilCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/TurkicCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/customizer/UzbekCustomizer.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/expected/AbstractKeyboardBuilder.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/expected/ExpectedKey.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/expected/ExpectedKeyOutput.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/expected/ExpectedKeyVisual.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/KeyboardLayoutSetSubtypesCountTests.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/LayoutTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsAfrikaans.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsArabic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsArmenianAMPhonetic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsBasqueES.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsBengaliBD.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsBengaliIN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsBulgarian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsBulgarianBds.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsCatalan.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsCroatian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsCzech.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsDanish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsDutch.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsDutchBE.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsDvorakEmail.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsDvorakUrl.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsEnglishIN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsEnglishUK.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsEnglishUS.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsEsperanto.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsEstonianEE.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsEstonianEEQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsFinnish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsFrench.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsFrenchCA.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsFrenchCH.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsGalicianES.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsGeorgianGE.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsGerman.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsGermanCH.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsGreek.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsHebrew.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsHindi.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsHindiCompact.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsHinglish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsHungarian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsIcelandic.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsIndonesian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsItalian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsItalianCH.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsKannadaIN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsKazakh.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsKhmerKH.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsKyrgyz.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsLaoLA.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsLatvian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsLithuanian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsMacedonian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsMalayMY.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsMarathiIN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsMongolianMN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNepaliRomanized.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNepaliTraditional.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNoLanguage.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNoLanguagePcQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNorwegian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsPersian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsPolish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsQwertyEmail.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsQwertyUrl.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsRomanian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsRussian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSerbian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSinhalaLK.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSlovak.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSlovenian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSpanish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSpanish419.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSpanishUS.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSplitLayoutQwertyEnglishUS.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSwahili.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSwedish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsTagalog.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsTamilIN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsTamilLK.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsTamilSG.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsTeluguIN.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsThai.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsTurkish.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsUkrainian.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsUzbek.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsVietnamese.java create mode 100644 tests/src/org/kelar/inputmethod/keyboard/layout/tests/TestsZulu.java create mode 100644 tests/src/org/kelar/inputmethod/latin/AppWorkaroundsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/BinaryDictionaryTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/BlueUnderlineTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/ContactsContentObserverTest.java create mode 100644 tests/src/org/kelar/inputmethod/latin/ContactsDictionaryUtilsTest.java create mode 100644 tests/src/org/kelar/inputmethod/latin/ContactsManagerTest.java create mode 100644 tests/src/org/kelar/inputmethod/latin/DictionaryFacilitatorLruCacheTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/InputLogicTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/InputLogicTestsDeadKeys.java create mode 100644 tests/src/org/kelar/inputmethod/latin/InputLogicTestsLanguageWithoutSpaces.java create mode 100644 tests/src/org/kelar/inputmethod/latin/InputTestsBase.java create mode 100644 tests/src/org/kelar/inputmethod/latin/LatinIMEForTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/LatinImeStressTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/LatinImeTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/NgramContextTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/PunctuationTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/RichInputConnectionAndTextRangeTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/RichInputMethodSubtypeTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/ShiftModeTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/SuggestedWordsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/WordComposerTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/accounts/AccountsChangedReceiverTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/common/InputPointersTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/common/ResizableIntArrayTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/common/StringUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/common/UnicodeSurrogateTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/AbstractDictDecoder.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/BinaryDictDecoderUtils.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/BinaryDictEncoderUtils.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/BinaryDictIOUtils.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/BinaryDictUtils.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/DictDecoder.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/DictEncoder.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/FusionDictionary.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/MakedictLog.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/PendingAttribute.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/PtNodeInfo.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/Ver2DictEncoder.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/Ver4DictDecoder.java create mode 100644 tests/src/org/kelar/inputmethod/latin/makedict/Ver4DictEncoder.java create mode 100644 tests/src/org/kelar/inputmethod/latin/network/BlockingHttpClientTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/network/HttpUrlConnectionBuilderTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/personalization/UserHistoryDictionaryTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java create mode 100644 tests/src/org/kelar/inputmethod/latin/settings/AccountsSettingsFragmentTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/settings/SpacingAndPunctuationsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/spellcheck/AndroidSpellCheckerServiceTest.java create mode 100644 tests/src/org/kelar/inputmethod/latin/suggestions/SuggestionStripLayoutHelperTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/AsyncResultHolderTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/ByteArrayDictBuffer.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/CapsModeUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/CollectionUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/DictionaryInfoUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/ExecutorUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/ImportantNoticeUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/JsonUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/RecapitalizeStatusTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/ResourceUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/SpannableStringUtilsTests.java create mode 100644 tests/src/org/kelar/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EchoingTextWatcher.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EditTextVariations.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EditorActivity.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/FinalClassField.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/InstanceMethod.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/MultiLineShortMessageEditText.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationBroadcastReceiver.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationUtils.java delete mode 100644 tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/ThemeItem.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/EchoingTextWatcher.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/EditTextVariations.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/EditorActivity.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/FinalClassField.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/InstanceMethod.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/MultiLineShortMessageEditText.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/NotificationBroadcastReceiver.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/NotificationUtils.java create mode 100644 tools/EditTextVariations/src/org/kelar/inputmethod/tools/edittextvariations/ThemeItem.java delete mode 100644 tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java delete mode 100644 tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java delete mode 100644 tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java delete mode 100644 tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java delete mode 100644 tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java delete mode 100644 tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java delete mode 100644 tools/dicttool/compat/com/android/inputmethod/latin/utils/WordInputEventForPersonalization.java create mode 100644 tools/dicttool/compat/org/kelar/inputmethod/keyboard/Key.java create mode 100644 tools/dicttool/compat/org/kelar/inputmethod/keyboard/Keyboard.java create mode 100644 tools/dicttool/compat/org/kelar/inputmethod/keyboard/ProximityInfo.java create mode 100644 tools/dicttool/compat/org/kelar/inputmethod/latin/LatinIME.java create mode 100644 tools/dicttool/compat/org/kelar/inputmethod/latin/define/JniLibName.java create mode 100644 tools/dicttool/compat/org/kelar/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java create mode 100644 tools/dicttool/compat/org/kelar/inputmethod/latin/utils/WordInputEventForPersonalization.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Compress.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Header.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Makedict.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java delete mode 100644 tools/dicttool/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/CombinedInputOutput.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/CommandList.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Compress.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Crypt.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/DictionaryMaker.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Dicttool.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Diff.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Header.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Info.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Makedict.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Package.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/dicttool/Test.java create mode 100644 tools/dicttool/src/org/kelar/inputmethod/latin/personalization/PersonalizationHelper.java delete mode 100644 tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java delete mode 100644 tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java delete mode 100644 tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java create mode 100644 tools/dicttool/tests/org/kelar/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java create mode 100644 tools/dicttool/tests/org/kelar/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java create mode 100644 tools/dicttool/tests/org/kelar/inputmethod/latin/makedict/FusionDictionaryTest.java delete mode 100644 tools/make-keyboard-text/res/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl create mode 100644 tools/make-keyboard-text/res/src/org/kelar/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl delete mode 100644 tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java delete mode 100644 tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/JarUtils.java delete mode 100644 tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/LocaleUtils.java delete mode 100644 tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java delete mode 100644 tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MoreKeysResources.java delete mode 100644 tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/StringResource.java delete mode 100644 tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/StringResourceMap.java create mode 100644 tools/make-keyboard-text/src/org/kelar/inputmethod/keyboard/tools/ArrayInitializerFormatter.java create mode 100644 tools/make-keyboard-text/src/org/kelar/inputmethod/keyboard/tools/JarUtils.java create mode 100644 tools/make-keyboard-text/src/org/kelar/inputmethod/keyboard/tools/LocaleUtils.java create mode 100644 tools/make-keyboard-text/src/org/kelar/inputmethod/keyboard/tools/MakeKeyboardText.java create mode 100644 tools/make-keyboard-text/src/org/kelar/inputmethod/keyboard/tools/MoreKeysResources.java create mode 100644 tools/make-keyboard-text/src/org/kelar/inputmethod/keyboard/tools/StringResource.java create mode 100644 tools/make-keyboard-text/src/org/kelar/inputmethod/keyboard/tools/StringResourceMap.java diff --git a/Android.bp b/Android.bp index 64845db05..232b7a951 100644 --- a/Android.bp +++ b/Android.bp @@ -32,25 +32,25 @@ license { filegroup { name: "dicttool_deps", srcs: [ - "java/src/com/android/inputmethod/latin/makedict/**/*.java", + "java/src/org/kelar/inputmethod/latin/makedict/**/*.java", // Dependencies for Dicttool. Most of these files are needed by BinaryDictionary.java. Note that // a significant part of the dependencies are mocked in the compat/ directory, with empty or // nearly-empty implementations, for parts that we don't use in Dicttool. - "java/src/com/android/inputmethod/latin/BinaryDictionary.java", - "java/src/com/android/inputmethod/latin/DicTraverseSession.java", - "java/src/com/android/inputmethod/latin/Dictionary.java", - "java/src/com/android/inputmethod/latin/NgramContext.java", - "java/src/com/android/inputmethod/latin/SuggestedWords.java", - "java/src/com/android/inputmethod/latin/settings/SettingsValuesForSuggestion.java", - "java/src/com/android/inputmethod/latin/utils/BinaryDictionaryUtils.java", - "java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java", - "java/src/com/android/inputmethod/latin/utils/JniUtils.java", + "java/src/org/kelar/inputmethod/latin/BinaryDictionary.java", + "java/src/org/kelar/inputmethod/latin/DicTraverseSession.java", + "java/src/org/kelar/inputmethod/latin/Dictionary.java", + "java/src/org/kelar/inputmethod/latin/NgramContext.java", + "java/src/org/kelar/inputmethod/latin/SuggestedWords.java", + "java/src/org/kelar/inputmethod/latin/settings/SettingsValuesForSuggestion.java", + "java/src/org/kelar/inputmethod/latin/utils/BinaryDictionaryUtils.java", + "java/src/org/kelar/inputmethod/latin/utils/CombinedFormatUtils.java", + "java/src/org/kelar/inputmethod/latin/utils/JniUtils.java", - "java/src/com/android/inputmethod/latin/define/DebugFlags.java", - "java/src/com/android/inputmethod/latin/define/DecoderSpecificConstants.java", + "java/src/org/kelar/inputmethod/latin/define/DebugFlags.java", + "java/src/org/kelar/inputmethod/latin/define/DecoderSpecificConstants.java", - "tests/src/com/android/inputmethod/latin/utils/ByteArrayDictBuffer.java", - "tests/src/com/android/inputmethod/latin/makedict/**/*.java", + "tests/src/org/kelar/inputmethod/latin/utils/ByteArrayDictBuffer.java", + "tests/src/org/kelar/inputmethod/latin/makedict/**/*.java", ], } diff --git a/build.gradle b/build.gradle index 67f9a6ade..8fc357bb9 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,8 @@ buildscript { apply plugin: 'com.android.application' android { - namespace 'com.android.inputmethod.latin' + namespace 'org.kelar.inputmethod.latin' + testNamespace = 'org.kelar.inputmethod.latin.tests' compileSdk 34 // Required if using classes in android.test.runner @@ -28,8 +29,8 @@ android { targetSdk 34 versionName "1.0" - applicationId 'com.android.inputmethod.latin' - testApplicationId 'com.android.inputmethod.latin.tests' + applicationId 'org.kelar.inputmethod.latin' + testApplicationId 'org.kelar.inputmethod.latin.tests' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = false diff --git a/common/src/com/android/inputmethod/annotations/ExternallyReferenced.java b/common/src/com/android/inputmethod/annotations/ExternallyReferenced.java deleted file mode 100644 index ea5f12ce2..000000000 --- a/common/src/com/android/inputmethod/annotations/ExternallyReferenced.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.annotations; - -/** - * Denotes that the class, method or field should not be eliminated by ProGuard, - * because it is externally referenced. (See proguard.flags) - */ -public @interface ExternallyReferenced { -} diff --git a/common/src/com/android/inputmethod/annotations/UsedForTesting.java b/common/src/com/android/inputmethod/annotations/UsedForTesting.java deleted file mode 100644 index 2ada091e4..000000000 --- a/common/src/com/android/inputmethod/annotations/UsedForTesting.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.annotations; - -/** - * Denotes that the class, method or field should not be eliminated by ProGuard, - * so that unit tests can access it. (See proguard.flags) - */ -public @interface UsedForTesting { -} diff --git a/common/src/com/android/inputmethod/latin/common/CodePointUtils.java b/common/src/com/android/inputmethod/latin/common/CodePointUtils.java deleted file mode 100644 index ec59de850..000000000 --- a/common/src/com/android/inputmethod/latin/common/CodePointUtils.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -import com.android.inputmethod.annotations.UsedForTesting; - -import java.util.Random; - -import javax.annotation.Nonnull; - -// Utility methods related with code points used for tests. -// TODO: Figure out where this class should be. -@UsedForTesting -public class CodePointUtils { - private CodePointUtils() { - // This utility class is not publicly instantiable. - } - - public static final int[] LATIN_ALPHABETS_LOWER = { - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', - 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - 0x00E0 /* LATIN SMALL LETTER A WITH GRAVE */, - 0x00E1 /* LATIN SMALL LETTER A WITH ACUTE */, - 0x00E2 /* LATIN SMALL LETTER A WITH CIRCUMFLEX */, - 0x00E3 /* LATIN SMALL LETTER A WITH TILDE */, - 0x00E4 /* LATIN SMALL LETTER A WITH DIAERESIS */, - 0x00E5 /* LATIN SMALL LETTER A WITH RING ABOVE */, - 0x00E6 /* LATIN SMALL LETTER AE */, - 0x00E7 /* LATIN SMALL LETTER C WITH CEDILLA */, - 0x00E8 /* LATIN SMALL LETTER E WITH GRAVE */, - 0x00E9 /* LATIN SMALL LETTER E WITH ACUTE */, - 0x00EA /* LATIN SMALL LETTER E WITH CIRCUMFLEX */, - 0x00EB /* LATIN SMALL LETTER E WITH DIAERESIS */, - 0x00EC /* LATIN SMALL LETTER I WITH GRAVE */, - 0x00ED /* LATIN SMALL LETTER I WITH ACUTE */, - 0x00EE /* LATIN SMALL LETTER I WITH CIRCUMFLEX */, - 0x00EF /* LATIN SMALL LETTER I WITH DIAERESIS */, - 0x00F0 /* LATIN SMALL LETTER ETH */, - 0x00F1 /* LATIN SMALL LETTER N WITH TILDE */, - 0x00F2 /* LATIN SMALL LETTER O WITH GRAVE */, - 0x00F3 /* LATIN SMALL LETTER O WITH ACUTE */, - 0x00F4 /* LATIN SMALL LETTER O WITH CIRCUMFLEX */, - 0x00F5 /* LATIN SMALL LETTER O WITH TILDE */, - 0x00F6 /* LATIN SMALL LETTER O WITH DIAERESIS */, - 0x00F7 /* LATIN SMALL LETTER O WITH STROKE */, - 0x00F9 /* LATIN SMALL LETTER U WITH GRAVE */, - 0x00FA /* LATIN SMALL LETTER U WITH ACUTE */, - 0x00FB /* LATIN SMALL LETTER U WITH CIRCUMFLEX */, - 0x00FC /* LATIN SMALL LETTER U WITH DIAERESIS */, - 0x00FD /* LATIN SMALL LETTER Y WITH ACUTE */, - 0x00FE /* LATIN SMALL LETTER THORN */, - 0x00FF /* LATIN SMALL LETTER Y WITH DIAERESIS */ - }; - - @UsedForTesting - @Nonnull - public static int[] generateCodePointSet(final int codePointSetSize, - @Nonnull final Random random) { - final int[] codePointSet = new int[codePointSetSize]; - for (int i = codePointSet.length - 1; i >= 0; ) { - final int r = Math.abs(random.nextInt()); - if (r < 0) { - continue; - } - // Don't insert 0~0x20, but insert any other code point. - // Code points are in the range 0~0x10FFFF. - final int candidateCodePoint = 0x20 + r % (Character.MAX_CODE_POINT - 0x20); - // Code points between MIN_ and MAX_SURROGATE are not valid on their own. - if (candidateCodePoint >= Character.MIN_SURROGATE - && candidateCodePoint <= Character.MAX_SURROGATE) { - continue; - } - codePointSet[i] = candidateCodePoint; - --i; - } - return codePointSet; - } - - /** - * Generates a random word. - */ - @UsedForTesting - @Nonnull - public static String generateWord(@Nonnull final Random random, - @Nonnull final int[] codePointSet) { - final StringBuilder builder = new StringBuilder(); - // 8 * 4 = 32 chars max, but we do it the following way so as to bias the random toward - // longer words. This should be closer to natural language, and more importantly, it will - // exercise the algorithms in dicttool much more. - final int count = 1 + (Math.abs(random.nextInt()) % 5) - + (Math.abs(random.nextInt()) % 5) - + (Math.abs(random.nextInt()) % 5) - + (Math.abs(random.nextInt()) % 5) - + (Math.abs(random.nextInt()) % 5) - + (Math.abs(random.nextInt()) % 5) - + (Math.abs(random.nextInt()) % 5) - + (Math.abs(random.nextInt()) % 5); - while (builder.length() < count) { - builder.appendCodePoint(codePointSet[Math.abs(random.nextInt()) % codePointSet.length]); - } - return builder.toString(); - } -} diff --git a/common/src/com/android/inputmethod/latin/common/CollectionUtils.java b/common/src/com/android/inputmethod/latin/common/CollectionUtils.java deleted file mode 100644 index 80fae5f51..000000000 --- a/common/src/com/android/inputmethod/latin/common/CollectionUtils.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -import com.android.inputmethod.annotations.UsedForTesting; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * Utility methods for working with collections. - */ -public final class CollectionUtils { - private CollectionUtils() { - // This utility class is not publicly instantiable. - } - - /** - * Converts a sub-range of the given array to an ArrayList of the appropriate type. - * @param array Array to be converted. - * @param start First index inclusive to be converted. - * @param end Last index exclusive to be converted. - * @throws IllegalArgumentException if start or end are out of range or start > end. - */ - @Nonnull - public static ArrayList arrayAsList(@Nonnull final E[] array, final int start, - final int end) { - if (start < 0 || start > end || end > array.length) { - throw new IllegalArgumentException("Invalid start: " + start + " end: " + end - + " with array.length: " + array.length); - } - - final ArrayList list = new ArrayList<>(end - start); - for (int i = start; i < end; i++) { - list.add(array[i]); - } - return list; - } - - /** - * Tests whether c contains no elements, true if c is null or c is empty. - * @param c Collection to test. - * @return Whether c contains no elements. - */ - @UsedForTesting - public static boolean isNullOrEmpty(@Nullable final Collection c) { - return c == null || c.isEmpty(); - } - - /** - * Tests whether map contains no elements, true if map is null or map is empty. - * @param map Map to test. - * @return Whether map contains no elements. - */ - @UsedForTesting - public static boolean isNullOrEmpty(@Nullable final Map map) { - return map == null || map.isEmpty(); - } -} diff --git a/common/src/com/android/inputmethod/latin/common/ComposedData.java b/common/src/com/android/inputmethod/latin/common/ComposedData.java deleted file mode 100644 index 7f0966050..000000000 --- a/common/src/com/android/inputmethod/latin/common/ComposedData.java +++ /dev/null @@ -1,66 +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 com.android.inputmethod.latin.common; - -import javax.annotation.Nonnull; - -/** - * An immutable class that encapsulates a snapshot of word composition data. - */ -public class ComposedData { - @Nonnull - public final InputPointers mInputPointers; - public final boolean mIsBatchMode; - @Nonnull - public final String mTypedWord; - - public ComposedData(@Nonnull final InputPointers inputPointers, final boolean isBatchMode, - @Nonnull final String typedWord) { - mInputPointers = inputPointers; - mIsBatchMode = isBatchMode; - mTypedWord = typedWord; - } - - /** - * Copy the code points in the typed word to a destination array of ints. - * - * If the array is too small to hold the code points in the typed word, nothing is copied and - * -1 is returned. - * - * @param destination the array of ints. - * @return the number of copied code points. - */ - public int copyCodePointsExceptTrailingSingleQuotesAndReturnCodePointCount( - @Nonnull final int[] destination) { - // lastIndex is exclusive - final int lastIndex = mTypedWord.length() - - StringUtils.getTrailingSingleQuotesCount(mTypedWord); - if (lastIndex <= 0) { - // The string is empty or contains only single quotes. - return 0; - } - - // The following function counts the number of code points in the text range which begins - // at index 0 and extends to the character at lastIndex. - final int codePointSize = Character.codePointCount(mTypedWord, 0, lastIndex); - if (codePointSize > destination.length) { - return -1; - } - return StringUtils.copyCodePointsAndReturnCodePointCount(destination, mTypedWord, 0, - lastIndex, true /* downCase */); - } -} diff --git a/common/src/com/android/inputmethod/latin/common/Constants.java b/common/src/com/android/inputmethod/latin/common/Constants.java deleted file mode 100644 index b491c8cfd..000000000 --- a/common/src/com/android/inputmethod/latin/common/Constants.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -import com.android.inputmethod.annotations.UsedForTesting; - -import javax.annotation.Nonnull; - -public final class Constants { - - public static final class Color { - /** - * The alpha value for fully opaque. - */ - public final static int ALPHA_OPAQUE = 255; - } - - public static final class ImeOption { - /** - * The private IME option used to indicate that no microphone should be shown for a given - * text field. For instance, this is specified by the search dialog when the dialog is - * already showing a voice search button. - * - * @deprecated Use {@link ImeOption#NO_MICROPHONE} with package name prefixed. - */ - @SuppressWarnings("dep-ann") - public static final String NO_MICROPHONE_COMPAT = "nm"; - - /** - * The private IME option used to indicate that no microphone should be shown for a given - * text field. For instance, this is specified by the search dialog when the dialog is - * already showing a voice search button. - */ - public static final String NO_MICROPHONE = "noMicrophoneKey"; - - /** - * The private IME option used to indicate that no settings key should be shown for a given - * text field. - */ - public static final String NO_SETTINGS_KEY = "noSettingsKey"; - - /** - * The private IME option used to indicate that the given text field needs ASCII code points - * input. - * - * @deprecated Use EditorInfo#IME_FLAG_FORCE_ASCII. - */ - @SuppressWarnings("dep-ann") - public static final String FORCE_ASCII = "forceAscii"; - - /** - * The private IME option used to suppress the floating gesture preview for a given text - * field. This overrides the corresponding keyboard settings preference. - * {@link com.android.inputmethod.latin.settings.SettingsValues#mGestureFloatingPreviewTextEnabled} - */ - public static final String NO_FLOATING_GESTURE_PREVIEW = "noGestureFloatingPreview"; - - private ImeOption() { - // This utility class is not publicly instantiable. - } - } - - public static final class Subtype { - /** - * The subtype mode used to indicate that the subtype is a keyboard. - */ - public static final String KEYBOARD_MODE = "keyboard"; - - public static final class ExtraValue { - /** - * The subtype extra value used to indicate that this subtype is capable of - * entering ASCII characters. - */ - public static final String ASCII_CAPABLE = "AsciiCapable"; - - /** - * The subtype extra value used to indicate that this subtype is enabled - * when the default subtype is not marked as ascii capable. - */ - public static final String ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE = - "EnabledWhenDefaultIsNotAsciiCapable"; - - /** - * The subtype extra value used to indicate that this subtype is capable of - * entering emoji characters. - */ - public static final String EMOJI_CAPABLE = "EmojiCapable"; - - /** - * The subtype extra value used to indicate that this subtype requires a network - * connection to work. - */ - public static final String REQ_NETWORK_CONNECTIVITY = "requireNetworkConnectivity"; - - /** - * The subtype extra value used to indicate that the display name of this subtype - * contains a "%s" for printf-like replacement and it should be replaced by - * this extra value. - * This extra value is supported on JellyBean and later. - */ - public static final String UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME = - "UntranslatableReplacementStringInSubtypeName"; - - /** - * The subtype extra value used to indicate this subtype keyboard layout set name. - * This extra value is private to LatinIME. - */ - public static final String KEYBOARD_LAYOUT_SET = "KeyboardLayoutSet"; - - /** - * The subtype extra value used to indicate that this subtype is an additional subtype - * that the user defined. This extra value is private to LatinIME. - */ - public static final String IS_ADDITIONAL_SUBTYPE = "isAdditionalSubtype"; - - /** - * The subtype extra value used to specify the combining rules. - */ - public static final String COMBINING_RULES = "CombiningRules"; - - private ExtraValue() { - // This utility class is not publicly instantiable. - } - } - - private Subtype() { - // This utility class is not publicly instantiable. - } - } - - public static final class TextUtils { - /** - * Capitalization mode for {@link android.text.TextUtils#getCapsMode}: don't capitalize - * characters. This value may be used with - * {@link android.text.TextUtils#CAP_MODE_CHARACTERS}, - * {@link android.text.TextUtils#CAP_MODE_WORDS}, and - * {@link android.text.TextUtils#CAP_MODE_SENTENCES}. - */ - // TODO: Straighten this out. It's bizarre to have to use android.text.TextUtils.CAP_MODE_* - // except for OFF that is in Constants.TextUtils. - public static final int CAP_MODE_OFF = 0; - - private TextUtils() { - // This utility class is not publicly instantiable. - } - } - - public static final int NOT_A_CODE = -1; - public static final int NOT_A_CURSOR_POSITION = -1; - // TODO: replace the following constants with state in InputTransaction? - public static final int NOT_A_COORDINATE = -1; - public static final int SUGGESTION_STRIP_COORDINATE = -2; - public static final int EXTERNAL_KEYBOARD_COORDINATE = -4; - - // A hint on how many characters to cache from the TextView. A good value of this is given by - // how many characters we need to be able to almost always find the caps mode. - public static final int EDITOR_CONTENTS_CACHE_SIZE = 1024; - // How many characters we accept for the recapitalization functionality. This needs to be - // large enough for all reasonable purposes, but avoid purposeful attacks. 100k sounds about - // right for this. - public static final int MAX_CHARACTERS_FOR_RECAPITALIZATION = 1024 * 100; - - // Key events coming any faster than this are long-presses. - public static final int LONG_PRESS_MILLISECONDS = 200; - // TODO: Set this value appropriately. - public static final int GET_SUGGESTED_WORDS_TIMEOUT = 200; - // How many continuous deletes at which to start deleting at a higher speed. - public static final int DELETE_ACCELERATE_AT = 20; - - public static final String WORD_SEPARATOR = " "; - - public static boolean isValidCoordinate(final int coordinate) { - // Detect {@link NOT_A_COORDINATE}, {@link SUGGESTION_STRIP_COORDINATE}, - // and {@link SPELL_CHECKER_COORDINATE}. - return coordinate >= 0; - } - - /** - * Custom request code used in - * {@link com.android.inputmethod.keyboard.KeyboardActionListener#onCustomRequest(int)}. - */ - // The code to show input method picker. - public static final int CUSTOM_CODE_SHOW_INPUT_METHOD_PICKER = 1; - - /** - * Some common keys code. Must be positive. - */ - public static final int CODE_ENTER = '\n'; - public static final int CODE_TAB = '\t'; - public static final int CODE_SPACE = ' '; - public static final int CODE_PERIOD = '.'; - public static final int CODE_COMMA = ','; - public static final int CODE_DASH = '-'; - public static final int CODE_SINGLE_QUOTE = '\''; - public static final int CODE_DOUBLE_QUOTE = '"'; - public static final int CODE_SLASH = '/'; - public static final int CODE_BACKSLASH = '\\'; - public static final int CODE_VERTICAL_BAR = '|'; - public static final int CODE_COMMERCIAL_AT = '@'; - public static final int CODE_PLUS = '+'; - public static final int CODE_PERCENT = '%'; - public static final int CODE_CLOSING_PARENTHESIS = ')'; - public static final int CODE_CLOSING_SQUARE_BRACKET = ']'; - public static final int CODE_CLOSING_CURLY_BRACKET = '}'; - public static final int CODE_CLOSING_ANGLE_BRACKET = '>'; - public static final int CODE_INVERTED_QUESTION_MARK = 0xBF; // ¿ - public static final int CODE_INVERTED_EXCLAMATION_MARK = 0xA1; // ¡ - public static final int CODE_GRAVE_ACCENT = '`'; - public static final int CODE_CIRCUMFLEX_ACCENT = '^'; - public static final int CODE_TILDE = '~'; - - public static final String REGEXP_PERIOD = "\\."; - public static final String STRING_SPACE = " "; - - /** - * Special keys code. Must be negative. - * These should be aligned with constants in - * {@link com.android.inputmethod.keyboard.internal.KeyboardCodesSet}. - */ - public static final int CODE_SHIFT = -1; - public static final int CODE_CAPSLOCK = -2; - public static final int CODE_SWITCH_ALPHA_SYMBOL = -3; - public static final int CODE_OUTPUT_TEXT = -4; - public static final int CODE_DELETE = -5; - public static final int CODE_SETTINGS = -6; - public static final int CODE_SHORTCUT = -7; - public static final int CODE_ACTION_NEXT = -8; - public static final int CODE_ACTION_PREVIOUS = -9; - public static final int CODE_LANGUAGE_SWITCH = -10; - public static final int CODE_EMOJI = -11; - public static final int CODE_SHIFT_ENTER = -12; - public static final int CODE_SYMBOL_SHIFT = -13; - public static final int CODE_ALPHA_FROM_EMOJI = -14; - // Code value representing the code is not specified. - public static final int CODE_UNSPECIFIED = -15; - - public static boolean isLetterCode(final int code) { - return code >= CODE_SPACE; - } - - @Nonnull - public static String printableCode(final int code) { - switch (code) { - case CODE_SHIFT: return "shift"; - case CODE_CAPSLOCK: return "capslock"; - case CODE_SWITCH_ALPHA_SYMBOL: return "symbol"; - case CODE_OUTPUT_TEXT: return "text"; - case CODE_DELETE: return "delete"; - case CODE_SETTINGS: return "settings"; - case CODE_SHORTCUT: return "shortcut"; - case CODE_ACTION_NEXT: return "actionNext"; - case CODE_ACTION_PREVIOUS: return "actionPrevious"; - case CODE_LANGUAGE_SWITCH: return "languageSwitch"; - case CODE_EMOJI: return "emoji"; - case CODE_SHIFT_ENTER: return "shiftEnter"; - case CODE_ALPHA_FROM_EMOJI: return "alpha"; - case CODE_UNSPECIFIED: return "unspec"; - case CODE_TAB: return "tab"; - case CODE_ENTER: return "enter"; - case CODE_SPACE: return "space"; - default: - if (code < CODE_SPACE) return String.format("\\u%02X", code); - if (code < 0x100) return String.format("%c", code); - if (code < 0x10000) return String.format("\\u%04X", code); - return String.format("\\U%05X", code); - } - } - - @Nonnull - public static String printableCodes(@Nonnull final int[] codes) { - final StringBuilder sb = new StringBuilder(); - boolean addDelimiter = false; - for (final int code : codes) { - if (code == NOT_A_CODE) break; - if (addDelimiter) sb.append(", "); - sb.append(printableCode(code)); - addDelimiter = true; - } - return "[" + sb + "]"; - } - - /** - * Screen metrics (a.k.a. Device form factor) constants of - * {@link com.android.inputmethod.latin.R.integer#config_screen_metrics}. - */ - public static final int SCREEN_METRICS_SMALL_PHONE = 0; - public static final int SCREEN_METRICS_LARGE_PHONE = 1; - public static final int SCREEN_METRICS_LARGE_TABLET = 2; - public static final int SCREEN_METRICS_SMALL_TABLET = 3; - - @UsedForTesting - public static boolean isPhone(final int screenMetrics) { - return screenMetrics == SCREEN_METRICS_SMALL_PHONE - || screenMetrics == SCREEN_METRICS_LARGE_PHONE; - } - - @UsedForTesting - public static boolean isTablet(final int screenMetrics) { - return screenMetrics == SCREEN_METRICS_SMALL_TABLET - || screenMetrics == SCREEN_METRICS_LARGE_TABLET; - } - - /** - * Default capacity of gesture points container. - * This constant is used by {@link com.android.inputmethod.keyboard.internal.BatchInputArbiter} - * and etc. to preallocate regions that contain gesture event points. - */ - public static final int DEFAULT_GESTURE_POINTS_CAPACITY = 128; - - public static final int MAX_IME_DECODER_RESULTS = 20; - public static final int DECODER_SCORE_SCALAR = 1000000; - public static final int DECODER_MAX_SCORE = 1000000000; - - public static final int EVENT_BACKSPACE = 1; - public static final int EVENT_REJECTION = 2; - public static final int EVENT_REVERT = 3; - - private Constants() { - // This utility class is not publicly instantiable. - } -} diff --git a/common/src/com/android/inputmethod/latin/common/CoordinateUtils.java b/common/src/com/android/inputmethod/latin/common/CoordinateUtils.java deleted file mode 100644 index 031662411..000000000 --- a/common/src/com/android/inputmethod/latin/common/CoordinateUtils.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -import javax.annotation.Nonnull; - -public final class CoordinateUtils { - private static final int INDEX_X = 0; - private static final int INDEX_Y = 1; - private static final int ELEMENT_SIZE = INDEX_Y + 1; - - private CoordinateUtils() { - // This utility class is not publicly instantiable. - } - - @Nonnull - public static int[] newInstance() { - return new int[ELEMENT_SIZE]; - } - - public static int x(@Nonnull final int[] coords) { - return coords[INDEX_X]; - } - - public static int y(@Nonnull final int[] coords) { - return coords[INDEX_Y]; - } - - public static void set(@Nonnull final int[] coords, final int x, final int y) { - coords[INDEX_X] = x; - coords[INDEX_Y] = y; - } - - public static void copy(@Nonnull final int[] destination, @Nonnull final int[] source) { - destination[INDEX_X] = source[INDEX_X]; - destination[INDEX_Y] = source[INDEX_Y]; - } - - @Nonnull - public static int[] newCoordinateArray(final int arraySize) { - return new int[ELEMENT_SIZE * arraySize]; - } - - @Nonnull - public static int[] newCoordinateArray(final int arraySize, - final int defaultX, final int defaultY) { - final int[] result = new int[ELEMENT_SIZE * arraySize]; - for (int i = 0; i < arraySize; ++i) { - setXYInArray(result, i, defaultX, defaultY); - } - return result; - } - - public static int xFromArray(@Nonnull final int[] coordsArray, final int index) { - return coordsArray[ELEMENT_SIZE * index + INDEX_X]; - } - - public static int yFromArray(@Nonnull final int[] coordsArray, final int index) { - return coordsArray[ELEMENT_SIZE * index + INDEX_Y]; - } - - @Nonnull - public static int[] coordinateFromArray(@Nonnull final int[] coordsArray, final int index) { - final int[] coords = newInstance(); - set(coords, xFromArray(coordsArray, index), yFromArray(coordsArray, index)); - return coords; - } - - public static void setXYInArray(@Nonnull final int[] coordsArray, final int index, - final int x, final int y) { - final int baseIndex = ELEMENT_SIZE * index; - coordsArray[baseIndex + INDEX_X] = x; - coordsArray[baseIndex + INDEX_Y] = y; - } - - public static void setCoordinateInArray(@Nonnull final int[] coordsArray, final int index, - @Nonnull final int[] coords) { - setXYInArray(coordsArray, index, x(coords), y(coords)); - } -} diff --git a/common/src/com/android/inputmethod/latin/common/FileUtils.java b/common/src/com/android/inputmethod/latin/common/FileUtils.java deleted file mode 100644 index e593c9932..000000000 --- a/common/src/com/android/inputmethod/latin/common/FileUtils.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.android.inputmethod.latin.common; - -import java.io.File; -import java.io.FilenameFilter; - -/** - * A simple class to help with removing directories recursively. - */ -public class FileUtils { - private static final String TAG = "FileUtils"; - - public static boolean deleteRecursively(final File path) { - if (path.isDirectory()) { - final File[] files = path.listFiles(); - if (files != null) { - for (final File child : files) { - deleteRecursively(child); - } - } - } - return path.delete(); - } - - public static boolean deleteFilteredFiles(final File dir, final FilenameFilter fileNameFilter) { - if (!dir.isDirectory()) { - return false; - } - final File[] files = dir.listFiles(fileNameFilter); - if (files == null) { - return false; - } - boolean hasDeletedAllFiles = true; - for (final File file : files) { - if (!deleteRecursively(file)) { - hasDeletedAllFiles = false; - } - } - return hasDeletedAllFiles; - } - - public static boolean renameTo(final File fromFile, final File toFile) { - toFile.delete(); - return fromFile.renameTo(toFile); - } -} diff --git a/common/src/com/android/inputmethod/latin/common/InputPointers.java b/common/src/com/android/inputmethod/latin/common/InputPointers.java deleted file mode 100644 index 4b2ae7e76..000000000 --- a/common/src/com/android/inputmethod/latin/common/InputPointers.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -import com.android.inputmethod.annotations.UsedForTesting; - -import javax.annotation.Nonnull; - -// TODO: This class is not thread-safe. -public final class InputPointers { - private static final boolean DEBUG_TIME = false; - - private final int mDefaultCapacity; - private final ResizableIntArray mXCoordinates; - private final ResizableIntArray mYCoordinates; - private final ResizableIntArray mPointerIds; - private final ResizableIntArray mTimes; - - public InputPointers(final int defaultCapacity) { - mDefaultCapacity = defaultCapacity; - mXCoordinates = new ResizableIntArray(defaultCapacity); - mYCoordinates = new ResizableIntArray(defaultCapacity); - mPointerIds = new ResizableIntArray(defaultCapacity); - mTimes = new ResizableIntArray(defaultCapacity); - } - - private void fillWithLastTimeUntil(final int index) { - final int fromIndex = mTimes.getLength(); - // Fill the gap with the latest time. - // See {@link #getTime(int)} and {@link #isValidTimeStamps()}. - if (fromIndex <= 0) { - return; - } - final int fillLength = index - fromIndex + 1; - if (fillLength <= 0) { - return; - } - final int lastTime = mTimes.get(fromIndex - 1); - mTimes.fill(lastTime, fromIndex, fillLength); - } - - public void addPointerAt(final int index, final int x, final int y, final int pointerId, - final int time) { - mXCoordinates.addAt(index, x); - mYCoordinates.addAt(index, y); - mPointerIds.addAt(index, pointerId); - if (DEBUG_TIME) { - fillWithLastTimeUntil(index); - } - mTimes.addAt(index, time); - } - - @UsedForTesting - public void addPointer(final int x, final int y, final int pointerId, final int time) { - mXCoordinates.add(x); - mYCoordinates.add(y); - mPointerIds.add(pointerId); - mTimes.add(time); - } - - public void set(@Nonnull final InputPointers ip) { - mXCoordinates.set(ip.mXCoordinates); - mYCoordinates.set(ip.mYCoordinates); - mPointerIds.set(ip.mPointerIds); - mTimes.set(ip.mTimes); - } - - public void copy(@Nonnull final InputPointers ip) { - mXCoordinates.copy(ip.mXCoordinates); - mYCoordinates.copy(ip.mYCoordinates); - mPointerIds.copy(ip.mPointerIds); - mTimes.copy(ip.mTimes); - } - - /** - * Append the times, x-coordinates and y-coordinates in the specified {@link ResizableIntArray} - * to the end of this. - * @param pointerId the pointer id of the source. - * @param times the source {@link ResizableIntArray} to read the event times from. - * @param xCoordinates the source {@link ResizableIntArray} to read the x-coordinates from. - * @param yCoordinates the source {@link ResizableIntArray} to read the y-coordinates from. - * @param startPos the starting index of the data in {@code times} and etc. - * @param length the number of data to be appended. - */ - public void append(final int pointerId, @Nonnull final ResizableIntArray times, - @Nonnull final ResizableIntArray xCoordinates, - @Nonnull final ResizableIntArray yCoordinates, final int startPos, final int length) { - if (length == 0) { - return; - } - mXCoordinates.append(xCoordinates, startPos, length); - mYCoordinates.append(yCoordinates, startPos, length); - mPointerIds.fill(pointerId, mPointerIds.getLength(), length); - mTimes.append(times, startPos, length); - } - - /** - * Shift to the left by elementCount, discarding elementCount pointers at the start. - * @param elementCount how many elements to shift. - */ - @UsedForTesting - public void shift(final int elementCount) { - mXCoordinates.shift(elementCount); - mYCoordinates.shift(elementCount); - mPointerIds.shift(elementCount); - mTimes.shift(elementCount); - } - - public void reset() { - final int defaultCapacity = mDefaultCapacity; - mXCoordinates.reset(defaultCapacity); - mYCoordinates.reset(defaultCapacity); - mPointerIds.reset(defaultCapacity); - mTimes.reset(defaultCapacity); - } - - public int getPointerSize() { - return mXCoordinates.getLength(); - } - - @Nonnull - public int[] getXCoordinates() { - return mXCoordinates.getPrimitiveArray(); - } - - @Nonnull - public int[] getYCoordinates() { - return mYCoordinates.getPrimitiveArray(); - } - - @Nonnull - public int[] getPointerIds() { - return mPointerIds.getPrimitiveArray(); - } - - /** - * Gets the time each point was registered, in milliseconds, relative to the first event in the - * sequence. - * @return The time each point was registered, in milliseconds, relative to the first event in - * the sequence. - */ - @Nonnull - public int[] getTimes() { - return mTimes.getPrimitiveArray(); - } - - @Override - public String toString() { - return "size=" + getPointerSize() + " id=" + mPointerIds + " time=" + mTimes - + " x=" + mXCoordinates + " y=" + mYCoordinates; - } -} diff --git a/common/src/com/android/inputmethod/latin/common/LocaleUtils.java b/common/src/com/android/inputmethod/latin/common/LocaleUtils.java deleted file mode 100644 index d5878c024..000000000 --- a/common/src/com/android/inputmethod/latin/common/LocaleUtils.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.android.inputmethod.latin.common; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Locale; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * A class to help with handling Locales in string form. - * - * This file has the same meaning and features (and shares all of its code) with the one with the - * same name in Latin IME. They need to be kept synchronized; for any update/bugfix to - * this file, consider also updating/fixing the version in Latin IME. - */ -public final class LocaleUtils { - private LocaleUtils() { - // Intentional empty constructor for utility class. - } - - // Locale match level constants. - // A higher level of match is guaranteed to have a higher numerical value. - // Some room is left within constants to add match cases that may arise necessary - // in the future, for example differentiating between the case where the countries - // are both present and different, and the case where one of the locales does not - // specify the countries. This difference is not needed now. - - // Nothing matches. - public static final int LOCALE_NO_MATCH = 0; - // The languages matches, but the country are different. Or, the reference locale requires a - // country and the tested locale does not have one. - public static final int LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER = 3; - // The languages and country match, but the variants are different. Or, the reference locale - // requires a variant and the tested locale does not have one. - public static final int LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER = 6; - // The required locale is null or empty so it will accept anything, and the tested locale - // is non-null and non-empty. - public static final int LOCALE_ANY_MATCH = 10; - // The language matches, and the tested locale specifies a country but the reference locale - // does not require one. - public static final int LOCALE_LANGUAGE_MATCH = 15; - // The language and the country match, and the tested locale specifies a variant but the - // reference locale does not require one. - public static final int LOCALE_LANGUAGE_AND_COUNTRY_MATCH = 20; - // The compared locales are fully identical. This is the best match level. - public static final int LOCALE_FULL_MATCH = 30; - - // The level at which a match is "normally" considered a locale match with standard algorithms. - // Don't use this directly, use #isMatch to test. - private static final int LOCALE_MATCH = LOCALE_ANY_MATCH; - - // Make this match the maximum match level. If this evolves to have more than 2 digits - // when written in base 10, also adjust the getMatchLevelSortedString method. - private static final int MATCH_LEVEL_MAX = 30; - - /** - * Return how well a tested locale matches a reference locale. - * - * This will check the tested locale against the reference locale and return a measure of how - * a well it matches the reference. The general idea is that the tested locale has to match - * every specified part of the required locale. A full match occur when they are equal, a - * partial match when the tested locale agrees with the reference locale but is more specific, - * and a difference when the tested locale does not comply with all requirements from the - * reference locale. - * In more detail, if the reference locale specifies at least a language and the testedLocale - * does not specify one, or specifies a different one, LOCALE_NO_MATCH is returned. If the - * reference locale is empty or null, it will match anything - in the form of LOCALE_FULL_MATCH - * if the tested locale is empty or null, and LOCALE_ANY_MATCH otherwise. If the reference and - * tested locale agree on the language, but not on the country, - * LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER is returned if the reference locale specifies a country, - * and LOCALE_LANGUAGE_MATCH otherwise. - * If they agree on both the language and the country, but not on the variant, - * LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER is returned if the reference locale - * specifies a variant, and LOCALE_LANGUAGE_AND_COUNTRY_MATCH otherwise. If everything matches, - * LOCALE_FULL_MATCH is returned. - * Examples: - * en <=> en_US => LOCALE_LANGUAGE_MATCH - * en_US <=> en => LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER - * en_US_POSIX <=> en_US_Android => LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER - * en_US <=> en_US_Android => LOCALE_LANGUAGE_AND_COUNTRY_MATCH - * sp_US <=> en_US => LOCALE_NO_MATCH - * de <=> de => LOCALE_FULL_MATCH - * en_US <=> en_US => LOCALE_FULL_MATCH - * "" <=> en_US => LOCALE_ANY_MATCH - * - * @param referenceLocale the reference locale to test against. - * @param testedLocale the locale to test. - * @return a constant that measures how well the tested locale matches the reference locale. - */ - public static int getMatchLevel(@Nullable final String referenceLocale, - @Nullable final String testedLocale) { - if (StringUtils.isEmpty(referenceLocale)) { - return StringUtils.isEmpty(testedLocale) ? LOCALE_FULL_MATCH : LOCALE_ANY_MATCH; - } - if (null == testedLocale) return LOCALE_NO_MATCH; - final String[] referenceParams = referenceLocale.split("_", 3); - final String[] testedParams = testedLocale.split("_", 3); - // By spec of String#split, [0] cannot be null and length cannot be 0. - if (!referenceParams[0].equals(testedParams[0])) return LOCALE_NO_MATCH; - switch (referenceParams.length) { - case 1: - return 1 == testedParams.length ? LOCALE_FULL_MATCH : LOCALE_LANGUAGE_MATCH; - case 2: - if (1 == testedParams.length) return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; - if (!referenceParams[1].equals(testedParams[1])) - return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; - if (3 == testedParams.length) return LOCALE_LANGUAGE_AND_COUNTRY_MATCH; - return LOCALE_FULL_MATCH; - case 3: - if (1 == testedParams.length) return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; - if (!referenceParams[1].equals(testedParams[1])) - return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; - if (2 == testedParams.length) return LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER; - if (!referenceParams[2].equals(testedParams[2])) - return LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER; - return LOCALE_FULL_MATCH; - } - // It should be impossible to come here - return LOCALE_NO_MATCH; - } - - /** - * Return a string that represents this match level, with better matches first. - * - * The strings are sorted in lexicographic order: a better match will always be less than - * a worse match when compared together. - */ - public static String getMatchLevelSortedString(final int matchLevel) { - // This works because the match levels are 0~99 (actually 0~30) - // Ideally this should use a number of digits equals to the 1og10 of the greater matchLevel - return String.format(Locale.ROOT, "%02d", MATCH_LEVEL_MAX - matchLevel); - } - - /** - * Find out whether a match level should be considered a match. - * - * This method takes a match level as returned by the #getMatchLevel method, and returns whether - * it should be considered a match in the usual sense with standard Locale functions. - * - * @param level the match level, as returned by getMatchLevel. - * @return whether this is a match or not. - */ - public static boolean isMatch(final int level) { - return LOCALE_MATCH <= level; - } - - private static final HashMap sLocaleCache = new HashMap<>(); - - /** - * Creates a locale from a string specification. - * @param localeString a string specification of a locale, in a format of "ll_cc_variant" where - * "ll" is a language code, "cc" is a country code. - */ - @Nonnull - public static Locale constructLocaleFromString(@Nonnull final String localeString) { - synchronized (sLocaleCache) { - if (sLocaleCache.containsKey(localeString)) { - return sLocaleCache.get(localeString); - } - final String[] elements = localeString.split("_", 3); - final Locale locale; - if (elements.length == 1) { - locale = new Locale(elements[0] /* language */); - } else if (elements.length == 2) { - locale = new Locale(elements[0] /* language */, elements[1] /* country */); - } else { // localeParams.length == 3 - locale = new Locale(elements[0] /* language */, elements[1] /* country */, - elements[2] /* variant */); - } - sLocaleCache.put(localeString, locale); - return locale; - } - } - - // TODO: Get this information from the framework instead of maintaining here by ourselves. - private static final HashSet sRtlLanguageCodes = new HashSet<>(); - static { - // List of known Right-To-Left language codes. - sRtlLanguageCodes.add("ar"); // Arabic - sRtlLanguageCodes.add("fa"); // Persian - sRtlLanguageCodes.add("iw"); // Hebrew - sRtlLanguageCodes.add("ku"); // Kurdish - sRtlLanguageCodes.add("ps"); // Pashto - sRtlLanguageCodes.add("sd"); // Sindhi - sRtlLanguageCodes.add("ug"); // Uyghur - sRtlLanguageCodes.add("ur"); // Urdu - sRtlLanguageCodes.add("yi"); // Yiddish - } - - public static boolean isRtlLanguage(@Nonnull final Locale locale) { - return sRtlLanguageCodes.contains(locale.getLanguage()); - } -} diff --git a/common/src/com/android/inputmethod/latin/common/NativeSuggestOptions.java b/common/src/com/android/inputmethod/latin/common/NativeSuggestOptions.java deleted file mode 100644 index d673442ca..000000000 --- a/common/src/com/android/inputmethod/latin/common/NativeSuggestOptions.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -public class NativeSuggestOptions { - // Need to update suggest_options.h when you add, remove or reorder options. - private static final int IS_GESTURE = 0; - private static final int USE_FULL_EDIT_DISTANCE = 1; - private static final int BLOCK_OFFENSIVE_WORDS = 2; - private static final int SPACE_AWARE_GESTURE_ENABLED = 3; - private static final int WEIGHT_FOR_LOCALE_IN_THOUSANDS = 4; - private static final int OPTIONS_SIZE = 5; - - private final int[] mOptions; - - public NativeSuggestOptions() { - mOptions = new int[OPTIONS_SIZE]; - } - - public void setIsGesture(final boolean value) { - setBooleanOption(IS_GESTURE, value); - } - - public void setUseFullEditDistance(final boolean value) { - setBooleanOption(USE_FULL_EDIT_DISTANCE, value); - } - - public void setBlockOffensiveWords(final boolean value) { - setBooleanOption(BLOCK_OFFENSIVE_WORDS, value); - } - - public void setWeightForLocale(final float value) { - // We're passing this option as a fixed point value, in thousands. This is decoded in - // native code by SuggestOptions#weightForLocale(). - setIntegerOption(WEIGHT_FOR_LOCALE_IN_THOUSANDS, (int) (value * 1000)); - } - - public int[] getOptions() { - return mOptions; - } - - private void setBooleanOption(final int key, final boolean value) { - mOptions[key] = value ? 1 : 0; - } - - private void setIntegerOption(final int key, final int value) { - mOptions[key] = value; - } -} diff --git a/common/src/com/android/inputmethod/latin/common/ResizableIntArray.java b/common/src/com/android/inputmethod/latin/common/ResizableIntArray.java deleted file mode 100644 index 77f5c4cd5..000000000 --- a/common/src/com/android/inputmethod/latin/common/ResizableIntArray.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -import com.android.inputmethod.annotations.UsedForTesting; - -import java.util.Arrays; - -import javax.annotation.Nonnull; - -// TODO: This class is not thread-safe. -public final class ResizableIntArray { - @Nonnull - private int[] mArray; - private int mLength; - - public ResizableIntArray(final int capacity) { - reset(capacity); - } - - public int get(final int index) { - if (index < mLength) { - return mArray[index]; - } - throw new ArrayIndexOutOfBoundsException("length=" + mLength + "; index=" + index); - } - - public void addAt(final int index, final int val) { - if (index < mLength) { - mArray[index] = val; - } else { - mLength = index; - add(val); - } - } - - public void add(final int val) { - final int currentLength = mLength; - ensureCapacity(currentLength + 1); - mArray[currentLength] = val; - mLength = currentLength + 1; - } - - /** - * Calculate the new capacity of {@code mArray}. - * @param minimumCapacity the minimum capacity that the {@code mArray} should have. - * @return the new capacity that the {@code mArray} should have. Returns zero when there is no - * need to expand {@code mArray}. - */ - private int calculateCapacity(final int minimumCapacity) { - final int currentCapcity = mArray.length; - if (currentCapcity < minimumCapacity) { - final int nextCapacity = currentCapcity * 2; - // The following is the same as return Math.max(minimumCapacity, nextCapacity); - return minimumCapacity > nextCapacity ? minimumCapacity : nextCapacity; - } - return 0; - } - - private void ensureCapacity(final int minimumCapacity) { - final int newCapacity = calculateCapacity(minimumCapacity); - if (newCapacity > 0) { - // TODO: Implement primitive array pool. - mArray = Arrays.copyOf(mArray, newCapacity); - } - } - - public int getLength() { - return mLength; - } - - public void setLength(final int newLength) { - ensureCapacity(newLength); - mLength = newLength; - } - - public void reset(final int capacity) { - // TODO: Implement primitive array pool. - mArray = new int[capacity]; - mLength = 0; - } - - @Nonnull - public int[] getPrimitiveArray() { - return mArray; - } - - public void set(@Nonnull final ResizableIntArray ip) { - // TODO: Implement primitive array pool. - mArray = ip.mArray; - mLength = ip.mLength; - } - - public void copy(@Nonnull final ResizableIntArray ip) { - final int newCapacity = calculateCapacity(ip.mLength); - if (newCapacity > 0) { - // TODO: Implement primitive array pool. - mArray = new int[newCapacity]; - } - System.arraycopy(ip.mArray, 0, mArray, 0, ip.mLength); - mLength = ip.mLength; - } - - public void append(@Nonnull final ResizableIntArray src, final int startPos, final int length) { - if (length == 0) { - return; - } - final int currentLength = mLength; - final int newLength = currentLength + length; - ensureCapacity(newLength); - System.arraycopy(src.mArray, startPos, mArray, currentLength, length); - mLength = newLength; - } - - public void fill(final int value, final int startPos, final int length) { - if (startPos < 0 || length < 0) { - throw new IllegalArgumentException("startPos=" + startPos + "; length=" + length); - } - final int endPos = startPos + length; - ensureCapacity(endPos); - Arrays.fill(mArray, startPos, endPos, value); - if (mLength < endPos) { - mLength = endPos; - } - } - - /** - * Shift to the left by elementCount, discarding elementCount pointers at the start. - * @param elementCount how many elements to shift. - */ - @UsedForTesting - public void shift(final int elementCount) { - System.arraycopy(mArray, elementCount, mArray, 0, mLength - elementCount); - mLength -= elementCount; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder(); - for (int i = 0; i < mLength; i++) { - if (i != 0) { - sb.append(","); - } - sb.append(mArray[i]); - } - return "[" + sb + "]"; - } -} diff --git a/common/src/com/android/inputmethod/latin/common/StringUtils.java b/common/src/com/android/inputmethod/latin/common/StringUtils.java deleted file mode 100644 index 572f0cd9b..000000000 --- a/common/src/com/android/inputmethod/latin/common/StringUtils.java +++ /dev/null @@ -1,704 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.common; - -import com.android.inputmethod.annotations.UsedForTesting; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Locale; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -public final class StringUtils { - public static final int CAPITALIZE_NONE = 0; // No caps, or mixed case - public static final int CAPITALIZE_FIRST = 1; // First only - public static final int CAPITALIZE_ALL = 2; // All caps - - @Nonnull - private static final String EMPTY_STRING = ""; - - private static final char CHAR_LINE_FEED = 0X000A; - private static final char CHAR_VERTICAL_TAB = 0X000B; - private static final char CHAR_FORM_FEED = 0X000C; - private static final char CHAR_CARRIAGE_RETURN = 0X000D; - private static final char CHAR_NEXT_LINE = 0X0085; - private static final char CHAR_LINE_SEPARATOR = 0X2028; - private static final char CHAR_PARAGRAPH_SEPARATOR = 0X2029; - - private StringUtils() { - // This utility class is not publicly instantiable. - } - - // Taken from android.text.TextUtils. We are extensively using this method in many places, - // some of which don't have the android libraries available. - /** - * Returns true if the string is null or 0-length. - * @param str the string to be examined - * @return true if str is null or zero length - */ - public static boolean isEmpty(@Nullable final CharSequence str) { - return (str == null || str.length() == 0); - } - - // Taken from android.text.TextUtils to cut the dependency to the Android framework. - /** - * Returns a string containing the tokens joined by delimiters. - * @param delimiter the delimiter - * @param tokens an array objects to be joined. Strings will be formed from - * the objects by calling object.toString(). - */ - @Nonnull - public static String join(@Nonnull final CharSequence delimiter, - @Nonnull final Iterable tokens) { - final StringBuilder sb = new StringBuilder(); - boolean firstTime = true; - for (final Object token: tokens) { - if (firstTime) { - firstTime = false; - } else { - sb.append(delimiter); - } - sb.append(token); - } - return sb.toString(); - } - - // Taken from android.text.TextUtils to cut the dependency to the Android framework. - /** - * Returns true if a and b are equal, including if they are both null. - *

Note: In platform versions 1.1 and earlier, this method only worked well if - * both the arguments were instances of String.

- * @param a first CharSequence to check - * @param b second CharSequence to check - * @return true if a and b are equal - */ - public static boolean equals(@Nullable final CharSequence a, @Nullable final CharSequence b) { - if (a == b) { - return true; - } - final int length; - if (a != null && b != null && (length = a.length()) == b.length()) { - if (a instanceof String && b instanceof String) { - return a.equals(b); - } - for (int i = 0; i < length; i++) { - if (a.charAt(i) != b.charAt(i)) { - return false; - } - } - return true; - } - return false; - } - - public static int codePointCount(@Nullable final CharSequence text) { - if (isEmpty(text)) { - return 0; - } - return Character.codePointCount(text, 0, text.length()); - } - - @Nonnull - public static String newSingleCodePointString(final int codePoint) { - if (Character.charCount(codePoint) == 1) { - // Optimization: avoid creating a temporary array for characters that are - // represented by a single char value - return String.valueOf((char) codePoint); - } - // For surrogate pair - return new String(Character.toChars(codePoint)); - } - - public static boolean containsInArray(@Nonnull final String text, - @Nonnull final String[] array) { - for (final String element : array) { - if (text.equals(element)) { - return true; - } - } - return false; - } - - /** - * Comma-Splittable Text is similar to Comma-Separated Values (CSV) but has much simpler syntax. - * Unlike CSV, Comma-Splittable Text has no escaping mechanism, so that the text can't contain - * a comma character in it. - */ - @Nonnull - private static final String SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT = ","; - - public static boolean containsInCommaSplittableText(@Nonnull final String text, - @Nullable final String extraValues) { - if (isEmpty(extraValues)) { - return false; - } - return containsInArray(text, extraValues.split(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT)); - } - - @Nonnull - public static String removeFromCommaSplittableTextIfExists(@Nonnull final String text, - @Nullable final String extraValues) { - if (isEmpty(extraValues)) { - return EMPTY_STRING; - } - final String[] elements = extraValues.split(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT); - if (!containsInArray(text, elements)) { - return extraValues; - } - final ArrayList result = new ArrayList<>(elements.length - 1); - for (final String element : elements) { - if (!text.equals(element)) { - result.add(element); - } - } - return join(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT, result); - } - - /** - * Remove duplicates from an array of strings. - * - * This method will always keep the first occurrence of all strings at their position - * in the array, removing the subsequent ones. - */ - public static void removeDupes(@Nonnull final ArrayList suggestions) { - if (suggestions.size() < 2) { - return; - } - int i = 1; - // Don't cache suggestions.size(), since we may be removing items - while (i < suggestions.size()) { - final String cur = suggestions.get(i); - // Compare each suggestion with each previous suggestion - for (int j = 0; j < i; j++) { - final String previous = suggestions.get(j); - if (equals(cur, previous)) { - suggestions.remove(i); - i--; - break; - } - } - i++; - } - } - - @Nonnull - public static String capitalizeFirstCodePoint(@Nonnull final String s, - @Nonnull final Locale locale) { - if (s.length() <= 1) { - return s.toUpperCase(getLocaleUsedForToTitleCase(locale)); - } - // Please refer to the comment below in - // {@link #capitalizeFirstAndDowncaseRest(String,Locale)} as this has the same shortcomings - final int cutoff = s.offsetByCodePoints(0, 1); - return s.substring(0, cutoff).toUpperCase(getLocaleUsedForToTitleCase(locale)) - + s.substring(cutoff); - } - - @Nonnull - public static String capitalizeFirstAndDowncaseRest(@Nonnull final String s, - @Nonnull final Locale locale) { - if (s.length() <= 1) { - return s.toUpperCase(getLocaleUsedForToTitleCase(locale)); - } - // TODO: fix the bugs below - // - It does not work for Serbian, because it fails to account for the "lj" character, - // which should be "Lj" in title case and "LJ" in upper case. - // - It does not work for Dutch, because it fails to account for the "ij" digraph when it's - // written as two separate code points. They are two different characters but both should - // be capitalized as "IJ" as if they were a single letter in most words (not all). If the - // unicode char for the ligature is used however, it works. - final int cutoff = s.offsetByCodePoints(0, 1); - return s.substring(0, cutoff).toUpperCase(getLocaleUsedForToTitleCase(locale)) - + s.substring(cutoff).toLowerCase(locale); - } - - @Nonnull - public static int[] toCodePointArray(@Nonnull final CharSequence charSequence) { - return toCodePointArray(charSequence, 0, charSequence.length()); - } - - @Nonnull - private static final int[] EMPTY_CODEPOINTS = {}; - - /** - * Converts a range of a string to an array of code points. - * @param charSequence the source string. - * @param startIndex the start index inside the string in java chars, inclusive. - * @param endIndex the end index inside the string in java chars, exclusive. - * @return a new array of code points. At most endIndex - startIndex, but possibly less. - */ - @Nonnull - public static int[] toCodePointArray(@Nonnull final CharSequence charSequence, - final int startIndex, final int endIndex) { - final int length = charSequence.length(); - if (length <= 0) { - return EMPTY_CODEPOINTS; - } - final int[] codePoints = - new int[Character.codePointCount(charSequence, startIndex, endIndex)]; - copyCodePointsAndReturnCodePointCount(codePoints, charSequence, startIndex, endIndex, - false /* downCase */); - return codePoints; - } - - /** - * Copies the codepoints in a CharSequence to an int array. - * - * This method assumes there is enough space in the array to store the code points. The size - * can be measured with Character#codePointCount(CharSequence, int, int) before passing to this - * method. If the int array is too small, an ArrayIndexOutOfBoundsException will be thrown. - * Also, this method makes no effort to be thread-safe. Do not modify the CharSequence while - * this method is running, or the behavior is undefined. - * This method can optionally downcase code points before copying them, but it pays no attention - * to locale while doing so. - * - * @param destination the int array. - * @param charSequence the CharSequence. - * @param startIndex the start index inside the string in java chars, inclusive. - * @param endIndex the end index inside the string in java chars, exclusive. - * @param downCase if this is true, code points will be downcased before being copied. - * @return the number of copied code points. - */ - public static int copyCodePointsAndReturnCodePointCount(@Nonnull final int[] destination, - @Nonnull final CharSequence charSequence, final int startIndex, final int endIndex, - final boolean downCase) { - int destIndex = 0; - for (int index = startIndex; index < endIndex; - index = Character.offsetByCodePoints(charSequence, index, 1)) { - final int codePoint = Character.codePointAt(charSequence, index); - // TODO: stop using this, as it's not aware of the locale and does not always do - // the right thing. - destination[destIndex] = downCase ? Character.toLowerCase(codePoint) : codePoint; - destIndex++; - } - return destIndex; - } - - @Nonnull - public static int[] toSortedCodePointArray(@Nonnull final String string) { - final int[] codePoints = toCodePointArray(string); - Arrays.sort(codePoints); - return codePoints; - } - - /** - * Construct a String from a code point array - * - * @param codePoints a code point array that is null terminated when its logical length is - * shorter than the array length. - * @return a string constructed from the code point array. - */ - @Nonnull - public static String getStringFromNullTerminatedCodePointArray( - @Nonnull final int[] codePoints) { - int stringLength = codePoints.length; - for (int i = 0; i < codePoints.length; i++) { - if (codePoints[i] == 0) { - stringLength = i; - break; - } - } - return new String(codePoints, 0 /* offset */, stringLength); - } - - // This method assumes the text is not null. For the empty string, it returns CAPITALIZE_NONE. - public static int getCapitalizationType(@Nonnull final String text) { - // If the first char is not uppercase, then the word is either all lower case or - // camel case, and in either case we return CAPITALIZE_NONE. - final int len = text.length(); - int index = 0; - for (; index < len; index = text.offsetByCodePoints(index, 1)) { - if (Character.isLetter(text.codePointAt(index))) { - break; - } - } - if (index == len) return CAPITALIZE_NONE; - if (!Character.isUpperCase(text.codePointAt(index))) { - return CAPITALIZE_NONE; - } - int capsCount = 1; - int letterCount = 1; - for (index = text.offsetByCodePoints(index, 1); index < len; - index = text.offsetByCodePoints(index, 1)) { - if (1 != capsCount && letterCount != capsCount) break; - final int codePoint = text.codePointAt(index); - if (Character.isUpperCase(codePoint)) { - ++capsCount; - ++letterCount; - } else if (Character.isLetter(codePoint)) { - // We need to discount non-letters since they may not be upper-case, but may - // still be part of a word (e.g. single quote or dash, as in "IT'S" or "FULL-TIME") - ++letterCount; - } - } - // We know the first char is upper case. So we want to test if either every letter other - // than the first is lower case, or if they are all upper case. If the string is exactly - // one char long, then we will arrive here with letterCount 1, and this is correct, too. - if (1 == capsCount) return CAPITALIZE_FIRST; - return (letterCount == capsCount ? CAPITALIZE_ALL : CAPITALIZE_NONE); - } - - public static boolean isIdenticalAfterUpcase(@Nonnull final String text) { - final int length = text.length(); - int i = 0; - while (i < length) { - final int codePoint = text.codePointAt(i); - if (Character.isLetter(codePoint) && !Character.isUpperCase(codePoint)) { - return false; - } - i += Character.charCount(codePoint); - } - return true; - } - - public static boolean isIdenticalAfterDowncase(@Nonnull final String text) { - final int length = text.length(); - int i = 0; - while (i < length) { - final int codePoint = text.codePointAt(i); - if (Character.isLetter(codePoint) && !Character.isLowerCase(codePoint)) { - return false; - } - i += Character.charCount(codePoint); - } - return true; - } - - public static boolean isIdenticalAfterCapitalizeEachWord(@Nonnull final String text, - @Nonnull final int[] sortedSeparators) { - boolean needsCapsNext = true; - final int len = text.length(); - for (int i = 0; i < len; i = text.offsetByCodePoints(i, 1)) { - final int codePoint = text.codePointAt(i); - if (Character.isLetter(codePoint)) { - if ((needsCapsNext && !Character.isUpperCase(codePoint)) - || (!needsCapsNext && !Character.isLowerCase(codePoint))) { - return false; - } - } - // We need a capital letter next if this is a separator. - needsCapsNext = (Arrays.binarySearch(sortedSeparators, codePoint) >= 0); - } - return true; - } - - // TODO: like capitalizeFirst*, this does not work perfectly for Dutch because of the IJ digraph - // which should be capitalized together in *some* cases. - @Nonnull - public static String capitalizeEachWord(@Nonnull final String text, - @Nonnull final int[] sortedSeparators, @Nonnull final Locale locale) { - final StringBuilder builder = new StringBuilder(); - boolean needsCapsNext = true; - final int len = text.length(); - for (int i = 0; i < len; i = text.offsetByCodePoints(i, 1)) { - final String nextChar = text.substring(i, text.offsetByCodePoints(i, 1)); - if (needsCapsNext) { - builder.append(nextChar.toUpperCase(locale)); - } else { - builder.append(nextChar.toLowerCase(locale)); - } - // We need a capital letter next if this is a separator. - needsCapsNext = (Arrays.binarySearch(sortedSeparators, nextChar.codePointAt(0)) >= 0); - } - return builder.toString(); - } - - /** - * Approximates whether the text before the cursor looks like a URL. - * - * This is not foolproof, but it should work well in the practice. - * Essentially it walks backward from the cursor until it finds something that's not a letter, - * digit, or common URL symbol like underscore. If it hasn't found a period yet, then it - * does not look like a URL. - * If the text: - * - starts with www and contains a period - * - starts with a slash preceded by either a slash, whitespace, or start-of-string - * Then it looks like a URL and we return true. Otherwise, we return false. - * - * Note: this method is called quite often, and should be fast. - * - * TODO: This will return that "abc./def" and ".abc/def" look like URLs to keep down the - * code complexity, but ideally it should not. It's acceptable for now. - */ - public static boolean lastPartLooksLikeURL(@Nonnull final CharSequence text) { - int i = text.length(); - if (0 == i) { - return false; - } - int wCount = 0; - int slashCount = 0; - boolean hasSlash = false; - boolean hasPeriod = false; - int codePoint = 0; - while (i > 0) { - codePoint = Character.codePointBefore(text, i); - if (codePoint < Constants.CODE_PERIOD || codePoint > 'z') { - // Handwavy heuristic to see if that's a URL character. Anything between period - // and z. This includes all lower- and upper-case ascii letters, period, - // underscore, arrobase, question mark, equal sign. It excludes spaces, exclamation - // marks, double quotes... - // Anything that's not a URL-like character causes us to break from here and - // evaluate normally. - break; - } - if (Constants.CODE_PERIOD == codePoint) { - hasPeriod = true; - } - if (Constants.CODE_SLASH == codePoint) { - hasSlash = true; - if (2 == ++slashCount) { - return true; - } - } else { - slashCount = 0; - } - if ('w' == codePoint) { - ++wCount; - } else { - wCount = 0; - } - i = Character.offsetByCodePoints(text, i, -1); - } - // End of the text run. - // If it starts with www and includes a period, then it looks like a URL. - if (wCount >= 3 && hasPeriod) { - return true; - } - // If it starts with a slash, and the code point before is whitespace, it looks like an URL. - if (1 == slashCount && (0 == i || Character.isWhitespace(codePoint))) { - return true; - } - // If it has both a period and a slash, it looks like an URL. - if (hasPeriod && hasSlash) { - return true; - } - // Otherwise, it doesn't look like an URL. - return false; - } - - /** - * Examines the string and returns whether we're inside a double quote. - * - * This is used to decide whether we should put an automatic space before or after a double - * quote character. If we're inside a quotation, then we want to close it, so we want a space - * after and not before. Otherwise, we want to open the quotation, so we want a space before - * and not after. Exception: after a digit, we never want a space because the "inch" or - * "minutes" use cases is dominant after digits. - * In the practice, we determine whether we are in a quotation or not by finding the previous - * double quote character, and looking at whether it's followed by whitespace. If so, that - * was a closing quotation mark, so we're not inside a double quote. If it's not followed - * by whitespace, then it was an opening quotation mark, and we're inside a quotation. - * - * @param text the text to examine. - * @return whether we're inside a double quote. - */ - public static boolean isInsideDoubleQuoteOrAfterDigit(@Nonnull final CharSequence text) { - int i = text.length(); - if (0 == i) { - return false; - } - int codePoint = Character.codePointBefore(text, i); - if (Character.isDigit(codePoint)) { - return true; - } - int prevCodePoint = 0; - while (i > 0) { - codePoint = Character.codePointBefore(text, i); - if (Constants.CODE_DOUBLE_QUOTE == codePoint) { - // If we see a double quote followed by whitespace, then that - // was a closing quote. - if (Character.isWhitespace(prevCodePoint)) { - return false; - } - } - if (Character.isWhitespace(codePoint) && Constants.CODE_DOUBLE_QUOTE == prevCodePoint) { - // If we see a double quote preceded by whitespace, then that - // was an opening quote. No need to continue seeking. - return true; - } - i -= Character.charCount(codePoint); - prevCodePoint = codePoint; - } - // We reached the start of text. If the first char is a double quote, then we're inside - // a double quote. Otherwise we're not. - return Constants.CODE_DOUBLE_QUOTE == codePoint; - } - - public static boolean isEmptyStringOrWhiteSpaces(@Nonnull final String s) { - final int N = codePointCount(s); - for (int i = 0; i < N; ++i) { - if (!Character.isWhitespace(s.codePointAt(i))) { - return false; - } - } - return true; - } - - @UsedForTesting - @Nonnull - public static String byteArrayToHexString(@Nullable final byte[] bytes) { - if (bytes == null || bytes.length == 0) { - return EMPTY_STRING; - } - final StringBuilder sb = new StringBuilder(); - for (final byte b : bytes) { - sb.append(String.format("%02x", b & 0xff)); - } - return sb.toString(); - } - - /** - * Convert hex string to byte array. The string length must be an even number. - */ - @UsedForTesting - @Nullable - public static byte[] hexStringToByteArray(@Nullable final String hexString) { - if (isEmpty(hexString)) { - return null; - } - final int N = hexString.length(); - if (N % 2 != 0) { - throw new NumberFormatException("Input hex string length must be an even number." - + " Length = " + N); - } - final byte[] bytes = new byte[N / 2]; - for (int i = 0; i < N; i += 2) { - bytes[i / 2] = (byte) ((Character.digit(hexString.charAt(i), 16) << 4) - + Character.digit(hexString.charAt(i + 1), 16)); - } - return bytes; - } - - private static final String LANGUAGE_GREEK = "el"; - - @Nonnull - private static Locale getLocaleUsedForToTitleCase(@Nonnull final Locale locale) { - // In Greek locale {@link String#toUpperCase(Locale)} eliminates accents from its result. - // In order to get accented upper case letter, {@link Locale#ROOT} should be used. - if (LANGUAGE_GREEK.equals(locale.getLanguage())) { - return Locale.ROOT; - } - return locale; - } - - @Nullable - public static String toTitleCaseOfKeyLabel(@Nullable final String label, - @Nonnull final Locale locale) { - if (label == null) { - return label; - } - return label.toUpperCase(getLocaleUsedForToTitleCase(locale)); - } - - public static int toTitleCaseOfKeyCode(final int code, @Nonnull final Locale locale) { - if (!Constants.isLetterCode(code)) { - return code; - } - final String label = newSingleCodePointString(code); - final String titleCaseLabel = toTitleCaseOfKeyLabel(label, locale); - return codePointCount(titleCaseLabel) == 1 - ? titleCaseLabel.codePointAt(0) : Constants.CODE_UNSPECIFIED; - } - - public static int getTrailingSingleQuotesCount(@Nonnull final CharSequence charSequence) { - final int lastIndex = charSequence.length() - 1; - int i = lastIndex; - while (i >= 0 && charSequence.charAt(i) == Constants.CODE_SINGLE_QUOTE) { - --i; - } - return lastIndex - i; - } - - @UsedForTesting - public static class Stringizer { - @Nonnull - private static final String[] EMPTY_STRING_ARRAY = new String[0]; - - @UsedForTesting - @Nonnull - public String stringize(@Nullable final E element) { - if (element == null) { - return "null"; - } - return element.toString(); - } - - @UsedForTesting - @Nonnull - public final String join(@Nullable final E[] array) { - return joinStringArray(toStringArray(array), null /* delimiter */); - } - - @UsedForTesting - public final String join(@Nullable final E[] array, @Nullable final String delimiter) { - return joinStringArray(toStringArray(array), delimiter); - } - - @Nonnull - protected String[] toStringArray(@Nullable final E[] array) { - if (array == null) { - return EMPTY_STRING_ARRAY; - } - final String[] stringArray = new String[array.length]; - for (int index = 0; index < array.length; index++) { - stringArray[index] = stringize(array[index]); - } - return stringArray; - } - - @Nonnull - protected String joinStringArray(@Nonnull final String[] stringArray, - @Nullable final String delimiter) { - if (delimiter == null) { - return Arrays.toString(stringArray); - } - final StringBuilder sb = new StringBuilder(); - for (int index = 0; index < stringArray.length; index++) { - sb.append(index == 0 ? "[" : delimiter); - sb.append(stringArray[index]); - } - return sb + "]"; - } - } - - /** - * Returns whether the last composed word contains line-breaking character (e.g. CR or LF). - * @param text the text to be examined. - * @return {@code true} if the last composed word contains line-breaking separator. - */ - public static boolean hasLineBreakCharacter(@Nullable final String text) { - if (isEmpty(text)) { - return false; - } - for (int i = text.length() - 1; i >= 0; --i) { - final char c = text.charAt(i); - switch (c) { - case CHAR_LINE_FEED: - case CHAR_VERTICAL_TAB: - case CHAR_FORM_FEED: - case CHAR_CARRIAGE_RETURN: - case CHAR_NEXT_LINE: - case CHAR_LINE_SEPARATOR: - case CHAR_PARAGRAPH_SEPARATOR: - return true; - } - } - return false; - } -} diff --git a/common/src/com/android/inputmethod/latin/common/UnicodeSurrogate.java b/common/src/com/android/inputmethod/latin/common/UnicodeSurrogate.java deleted file mode 100644 index 10974634d..000000000 --- a/common/src/com/android/inputmethod/latin/common/UnicodeSurrogate.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -package com.android.inputmethod.latin.common; - -/** - * Emojis are supplementary characters expressed as a low+high pair. For instance, - * the emoji U+1F625 is encoded as "\uD83D\uDE25" in UTF-16, where '\uD83D' is in - * the range of [0xd800, 0xdbff] and '\uDE25' is in the range of [0xdc00, 0xdfff]. - * {@see http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#unicode} - */ -public final class UnicodeSurrogate { - private static final char LOW_SURROGATE_MIN = '\uD800'; - private static final char LOW_SURROGATE_MAX = '\uDBFF'; - private static final char HIGH_SURROGATE_MIN = '\uDC00'; - private static final char HIGH_SURROGATE_MAX = '\uDFFF'; - - public static boolean isLowSurrogate(final char c) { - return c >= LOW_SURROGATE_MIN && c <= LOW_SURROGATE_MAX; - } - - public static boolean isHighSurrogate(final char c) { - return c >= HIGH_SURROGATE_MIN && c <= HIGH_SURROGATE_MAX; - } -} diff --git a/common/src/org/kelar/inputmethod/annotations/ExternallyReferenced.java b/common/src/org/kelar/inputmethod/annotations/ExternallyReferenced.java new file mode 100644 index 000000000..b3dfc06d7 --- /dev/null +++ b/common/src/org/kelar/inputmethod/annotations/ExternallyReferenced.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.annotations; + +/** + * Denotes that the class, method or field should not be eliminated by ProGuard, + * because it is externally referenced. (See proguard.flags) + */ +public @interface ExternallyReferenced { +} diff --git a/common/src/org/kelar/inputmethod/annotations/UsedForTesting.java b/common/src/org/kelar/inputmethod/annotations/UsedForTesting.java new file mode 100644 index 000000000..f117f7480 --- /dev/null +++ b/common/src/org/kelar/inputmethod/annotations/UsedForTesting.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.annotations; + +/** + * Denotes that the class, method or field should not be eliminated by ProGuard, + * so that unit tests can access it. (See proguard.flags) + */ +public @interface UsedForTesting { +} diff --git a/common/src/org/kelar/inputmethod/latin/common/CodePointUtils.java b/common/src/org/kelar/inputmethod/latin/common/CodePointUtils.java new file mode 100644 index 000000000..9f6970526 --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/CodePointUtils.java @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2013 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.kelar.inputmethod.latin.common; + +import org.kelar.inputmethod.annotations.UsedForTesting; + +import java.util.Random; + +import javax.annotation.Nonnull; + +// Utility methods related with code points used for tests. +// TODO: Figure out where this class should be. +@UsedForTesting +public class CodePointUtils { + private CodePointUtils() { + // This utility class is not publicly instantiable. + } + + public static final int[] LATIN_ALPHABETS_LOWER = { + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + 0x00E0 /* LATIN SMALL LETTER A WITH GRAVE */, + 0x00E1 /* LATIN SMALL LETTER A WITH ACUTE */, + 0x00E2 /* LATIN SMALL LETTER A WITH CIRCUMFLEX */, + 0x00E3 /* LATIN SMALL LETTER A WITH TILDE */, + 0x00E4 /* LATIN SMALL LETTER A WITH DIAERESIS */, + 0x00E5 /* LATIN SMALL LETTER A WITH RING ABOVE */, + 0x00E6 /* LATIN SMALL LETTER AE */, + 0x00E7 /* LATIN SMALL LETTER C WITH CEDILLA */, + 0x00E8 /* LATIN SMALL LETTER E WITH GRAVE */, + 0x00E9 /* LATIN SMALL LETTER E WITH ACUTE */, + 0x00EA /* LATIN SMALL LETTER E WITH CIRCUMFLEX */, + 0x00EB /* LATIN SMALL LETTER E WITH DIAERESIS */, + 0x00EC /* LATIN SMALL LETTER I WITH GRAVE */, + 0x00ED /* LATIN SMALL LETTER I WITH ACUTE */, + 0x00EE /* LATIN SMALL LETTER I WITH CIRCUMFLEX */, + 0x00EF /* LATIN SMALL LETTER I WITH DIAERESIS */, + 0x00F0 /* LATIN SMALL LETTER ETH */, + 0x00F1 /* LATIN SMALL LETTER N WITH TILDE */, + 0x00F2 /* LATIN SMALL LETTER O WITH GRAVE */, + 0x00F3 /* LATIN SMALL LETTER O WITH ACUTE */, + 0x00F4 /* LATIN SMALL LETTER O WITH CIRCUMFLEX */, + 0x00F5 /* LATIN SMALL LETTER O WITH TILDE */, + 0x00F6 /* LATIN SMALL LETTER O WITH DIAERESIS */, + 0x00F7 /* LATIN SMALL LETTER O WITH STROKE */, + 0x00F9 /* LATIN SMALL LETTER U WITH GRAVE */, + 0x00FA /* LATIN SMALL LETTER U WITH ACUTE */, + 0x00FB /* LATIN SMALL LETTER U WITH CIRCUMFLEX */, + 0x00FC /* LATIN SMALL LETTER U WITH DIAERESIS */, + 0x00FD /* LATIN SMALL LETTER Y WITH ACUTE */, + 0x00FE /* LATIN SMALL LETTER THORN */, + 0x00FF /* LATIN SMALL LETTER Y WITH DIAERESIS */ + }; + + @UsedForTesting + @Nonnull + public static int[] generateCodePointSet(final int codePointSetSize, + @Nonnull final Random random) { + final int[] codePointSet = new int[codePointSetSize]; + for (int i = codePointSet.length - 1; i >= 0; ) { + final int r = Math.abs(random.nextInt()); + if (r < 0) { + continue; + } + // Don't insert 0~0x20, but insert any other code point. + // Code points are in the range 0~0x10FFFF. + final int candidateCodePoint = 0x20 + r % (Character.MAX_CODE_POINT - 0x20); + // Code points between MIN_ and MAX_SURROGATE are not valid on their own. + if (candidateCodePoint >= Character.MIN_SURROGATE + && candidateCodePoint <= Character.MAX_SURROGATE) { + continue; + } + codePointSet[i] = candidateCodePoint; + --i; + } + return codePointSet; + } + + /** + * Generates a random word. + */ + @UsedForTesting + @Nonnull + public static String generateWord(@Nonnull final Random random, + @Nonnull final int[] codePointSet) { + final StringBuilder builder = new StringBuilder(); + // 8 * 4 = 32 chars max, but we do it the following way so as to bias the random toward + // longer words. This should be closer to natural language, and more importantly, it will + // exercise the algorithms in dicttool much more. + final int count = 1 + (Math.abs(random.nextInt()) % 5) + + (Math.abs(random.nextInt()) % 5) + + (Math.abs(random.nextInt()) % 5) + + (Math.abs(random.nextInt()) % 5) + + (Math.abs(random.nextInt()) % 5) + + (Math.abs(random.nextInt()) % 5) + + (Math.abs(random.nextInt()) % 5) + + (Math.abs(random.nextInt()) % 5); + while (builder.length() < count) { + builder.appendCodePoint(codePointSet[Math.abs(random.nextInt()) % codePointSet.length]); + } + return builder.toString(); + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/CollectionUtils.java b/common/src/org/kelar/inputmethod/latin/common/CollectionUtils.java new file mode 100644 index 000000000..ead46575f --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/CollectionUtils.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.latin.common; + +import org.kelar.inputmethod.annotations.UsedForTesting; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Utility methods for working with collections. + */ +public final class CollectionUtils { + private CollectionUtils() { + // This utility class is not publicly instantiable. + } + + /** + * Converts a sub-range of the given array to an ArrayList of the appropriate type. + * @param array Array to be converted. + * @param start First index inclusive to be converted. + * @param end Last index exclusive to be converted. + * @throws IllegalArgumentException if start or end are out of range or start > end. + */ + @Nonnull + public static ArrayList arrayAsList(@Nonnull final E[] array, final int start, + final int end) { + if (start < 0 || start > end || end > array.length) { + throw new IllegalArgumentException("Invalid start: " + start + " end: " + end + + " with array.length: " + array.length); + } + + final ArrayList list = new ArrayList<>(end - start); + for (int i = start; i < end; i++) { + list.add(array[i]); + } + return list; + } + + /** + * Tests whether c contains no elements, true if c is null or c is empty. + * @param c Collection to test. + * @return Whether c contains no elements. + */ + @UsedForTesting + public static boolean isNullOrEmpty(@Nullable final Collection c) { + return c == null || c.isEmpty(); + } + + /** + * Tests whether map contains no elements, true if map is null or map is empty. + * @param map Map to test. + * @return Whether map contains no elements. + */ + @UsedForTesting + public static boolean isNullOrEmpty(@Nullable final Map map) { + return map == null || map.isEmpty(); + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/ComposedData.java b/common/src/org/kelar/inputmethod/latin/common/ComposedData.java new file mode 100644 index 000000000..69309456f --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/ComposedData.java @@ -0,0 +1,66 @@ +/* + * 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.kelar.inputmethod.latin.common; + +import javax.annotation.Nonnull; + +/** + * An immutable class that encapsulates a snapshot of word composition data. + */ +public class ComposedData { + @Nonnull + public final InputPointers mInputPointers; + public final boolean mIsBatchMode; + @Nonnull + public final String mTypedWord; + + public ComposedData(@Nonnull final InputPointers inputPointers, final boolean isBatchMode, + @Nonnull final String typedWord) { + mInputPointers = inputPointers; + mIsBatchMode = isBatchMode; + mTypedWord = typedWord; + } + + /** + * Copy the code points in the typed word to a destination array of ints. + * + * If the array is too small to hold the code points in the typed word, nothing is copied and + * -1 is returned. + * + * @param destination the array of ints. + * @return the number of copied code points. + */ + public int copyCodePointsExceptTrailingSingleQuotesAndReturnCodePointCount( + @Nonnull final int[] destination) { + // lastIndex is exclusive + final int lastIndex = mTypedWord.length() + - StringUtils.getTrailingSingleQuotesCount(mTypedWord); + if (lastIndex <= 0) { + // The string is empty or contains only single quotes. + return 0; + } + + // The following function counts the number of code points in the text range which begins + // at index 0 and extends to the character at lastIndex. + final int codePointSize = Character.codePointCount(mTypedWord, 0, lastIndex); + if (codePointSize > destination.length) { + return -1; + } + return StringUtils.copyCodePointsAndReturnCodePointCount(destination, mTypedWord, 0, + lastIndex, true /* downCase */); + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/Constants.java b/common/src/org/kelar/inputmethod/latin/common/Constants.java new file mode 100644 index 000000000..9044d1590 --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/Constants.java @@ -0,0 +1,339 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.latin.common; + +import org.kelar.inputmethod.annotations.UsedForTesting; +import org.kelar.inputmethod.keyboard.KeyboardActionListener; +import org.kelar.inputmethod.keyboard.internal.BatchInputArbiter; +import org.kelar.inputmethod.keyboard.internal.KeyboardCodesSet; +import org.kelar.inputmethod.latin.settings.SettingsValues; + +import javax.annotation.Nonnull; + +public final class Constants { + + public static final class Color { + /** + * The alpha value for fully opaque. + */ + public final static int ALPHA_OPAQUE = 255; + } + + public static final class ImeOption { + /** + * The private IME option used to indicate that no microphone should be shown for a given + * text field. For instance, this is specified by the search dialog when the dialog is + * already showing a voice search button. + * + * @deprecated Use {@link ImeOption#NO_MICROPHONE} with package name prefixed. + */ + @SuppressWarnings("dep-ann") + public static final String NO_MICROPHONE_COMPAT = "nm"; + + /** + * The private IME option used to indicate that no microphone should be shown for a given + * text field. For instance, this is specified by the search dialog when the dialog is + * already showing a voice search button. + */ + public static final String NO_MICROPHONE = "noMicrophoneKey"; + + /** + * The private IME option used to indicate that no settings key should be shown for a given + * text field. + */ + public static final String NO_SETTINGS_KEY = "noSettingsKey"; + + /** + * The private IME option used to indicate that the given text field needs ASCII code points + * input. + * + * @deprecated Use EditorInfo#IME_FLAG_FORCE_ASCII. + */ + @SuppressWarnings("dep-ann") + public static final String FORCE_ASCII = "forceAscii"; + + /** + * The private IME option used to suppress the floating gesture preview for a given text + * field. This overrides the corresponding keyboard settings preference. + * {@link SettingsValues#mGestureFloatingPreviewTextEnabled} + */ + public static final String NO_FLOATING_GESTURE_PREVIEW = "noGestureFloatingPreview"; + + private ImeOption() { + // This utility class is not publicly instantiable. + } + } + + public static final class Subtype { + /** + * The subtype mode used to indicate that the subtype is a keyboard. + */ + public static final String KEYBOARD_MODE = "keyboard"; + + public static final class ExtraValue { + /** + * The subtype extra value used to indicate that this subtype is capable of + * entering ASCII characters. + */ + public static final String ASCII_CAPABLE = "AsciiCapable"; + + /** + * The subtype extra value used to indicate that this subtype is enabled + * when the default subtype is not marked as ascii capable. + */ + public static final String ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE = + "EnabledWhenDefaultIsNotAsciiCapable"; + + /** + * The subtype extra value used to indicate that this subtype is capable of + * entering emoji characters. + */ + public static final String EMOJI_CAPABLE = "EmojiCapable"; + + /** + * The subtype extra value used to indicate that this subtype requires a network + * connection to work. + */ + public static final String REQ_NETWORK_CONNECTIVITY = "requireNetworkConnectivity"; + + /** + * The subtype extra value used to indicate that the display name of this subtype + * contains a "%s" for printf-like replacement and it should be replaced by + * this extra value. + * This extra value is supported on JellyBean and later. + */ + public static final String UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME = + "UntranslatableReplacementStringInSubtypeName"; + + /** + * The subtype extra value used to indicate this subtype keyboard layout set name. + * This extra value is private to LatinIME. + */ + public static final String KEYBOARD_LAYOUT_SET = "KeyboardLayoutSet"; + + /** + * The subtype extra value used to indicate that this subtype is an additional subtype + * that the user defined. This extra value is private to LatinIME. + */ + public static final String IS_ADDITIONAL_SUBTYPE = "isAdditionalSubtype"; + + /** + * The subtype extra value used to specify the combining rules. + */ + public static final String COMBINING_RULES = "CombiningRules"; + + private ExtraValue() { + // This utility class is not publicly instantiable. + } + } + + private Subtype() { + // This utility class is not publicly instantiable. + } + } + + public static final class TextUtils { + /** + * Capitalization mode for {@link android.text.TextUtils#getCapsMode}: don't capitalize + * characters. This value may be used with + * {@link android.text.TextUtils#CAP_MODE_CHARACTERS}, + * {@link android.text.TextUtils#CAP_MODE_WORDS}, and + * {@link android.text.TextUtils#CAP_MODE_SENTENCES}. + */ + // TODO: Straighten this out. It's bizarre to have to use android.text.TextUtils.CAP_MODE_* + // except for OFF that is in Constants.TextUtils. + public static final int CAP_MODE_OFF = 0; + + private TextUtils() { + // This utility class is not publicly instantiable. + } + } + + public static final int NOT_A_CODE = -1; + public static final int NOT_A_CURSOR_POSITION = -1; + // TODO: replace the following constants with state in InputTransaction? + public static final int NOT_A_COORDINATE = -1; + public static final int SUGGESTION_STRIP_COORDINATE = -2; + public static final int EXTERNAL_KEYBOARD_COORDINATE = -4; + + // A hint on how many characters to cache from the TextView. A good value of this is given by + // how many characters we need to be able to almost always find the caps mode. + public static final int EDITOR_CONTENTS_CACHE_SIZE = 1024; + // How many characters we accept for the recapitalization functionality. This needs to be + // large enough for all reasonable purposes, but avoid purposeful attacks. 100k sounds about + // right for this. + public static final int MAX_CHARACTERS_FOR_RECAPITALIZATION = 1024 * 100; + + // Key events coming any faster than this are long-presses. + public static final int LONG_PRESS_MILLISECONDS = 200; + // TODO: Set this value appropriately. + public static final int GET_SUGGESTED_WORDS_TIMEOUT = 200; + // How many continuous deletes at which to start deleting at a higher speed. + public static final int DELETE_ACCELERATE_AT = 20; + + public static final String WORD_SEPARATOR = " "; + + public static boolean isValidCoordinate(final int coordinate) { + // Detect {@link NOT_A_COORDINATE}, {@link SUGGESTION_STRIP_COORDINATE}, + // and {@link SPELL_CHECKER_COORDINATE}. + return coordinate >= 0; + } + + /** + * Custom request code used in + * {@link KeyboardActionListener#onCustomRequest(int)}. + */ + // The code to show input method picker. + public static final int CUSTOM_CODE_SHOW_INPUT_METHOD_PICKER = 1; + + /** + * Some common keys code. Must be positive. + */ + public static final int CODE_ENTER = '\n'; + public static final int CODE_TAB = '\t'; + public static final int CODE_SPACE = ' '; + public static final int CODE_PERIOD = '.'; + public static final int CODE_COMMA = ','; + public static final int CODE_DASH = '-'; + public static final int CODE_SINGLE_QUOTE = '\''; + public static final int CODE_DOUBLE_QUOTE = '"'; + public static final int CODE_SLASH = '/'; + public static final int CODE_BACKSLASH = '\\'; + public static final int CODE_VERTICAL_BAR = '|'; + public static final int CODE_COMMERCIAL_AT = '@'; + public static final int CODE_PLUS = '+'; + public static final int CODE_PERCENT = '%'; + public static final int CODE_CLOSING_PARENTHESIS = ')'; + public static final int CODE_CLOSING_SQUARE_BRACKET = ']'; + public static final int CODE_CLOSING_CURLY_BRACKET = '}'; + public static final int CODE_CLOSING_ANGLE_BRACKET = '>'; + public static final int CODE_INVERTED_QUESTION_MARK = 0xBF; // ¿ + public static final int CODE_INVERTED_EXCLAMATION_MARK = 0xA1; // ¡ + public static final int CODE_GRAVE_ACCENT = '`'; + public static final int CODE_CIRCUMFLEX_ACCENT = '^'; + public static final int CODE_TILDE = '~'; + + public static final String REGEXP_PERIOD = "\\."; + public static final String STRING_SPACE = " "; + + /** + * Special keys code. Must be negative. + * These should be aligned with constants in + * {@link KeyboardCodesSet}. + */ + public static final int CODE_SHIFT = -1; + public static final int CODE_CAPSLOCK = -2; + public static final int CODE_SWITCH_ALPHA_SYMBOL = -3; + public static final int CODE_OUTPUT_TEXT = -4; + public static final int CODE_DELETE = -5; + public static final int CODE_SETTINGS = -6; + public static final int CODE_SHORTCUT = -7; + public static final int CODE_ACTION_NEXT = -8; + public static final int CODE_ACTION_PREVIOUS = -9; + public static final int CODE_LANGUAGE_SWITCH = -10; + public static final int CODE_EMOJI = -11; + public static final int CODE_SHIFT_ENTER = -12; + public static final int CODE_SYMBOL_SHIFT = -13; + public static final int CODE_ALPHA_FROM_EMOJI = -14; + // Code value representing the code is not specified. + public static final int CODE_UNSPECIFIED = -15; + + public static boolean isLetterCode(final int code) { + return code >= CODE_SPACE; + } + + @Nonnull + public static String printableCode(final int code) { + switch (code) { + case CODE_SHIFT: return "shift"; + case CODE_CAPSLOCK: return "capslock"; + case CODE_SWITCH_ALPHA_SYMBOL: return "symbol"; + case CODE_OUTPUT_TEXT: return "text"; + case CODE_DELETE: return "delete"; + case CODE_SETTINGS: return "settings"; + case CODE_SHORTCUT: return "shortcut"; + case CODE_ACTION_NEXT: return "actionNext"; + case CODE_ACTION_PREVIOUS: return "actionPrevious"; + case CODE_LANGUAGE_SWITCH: return "languageSwitch"; + case CODE_EMOJI: return "emoji"; + case CODE_SHIFT_ENTER: return "shiftEnter"; + case CODE_ALPHA_FROM_EMOJI: return "alpha"; + case CODE_UNSPECIFIED: return "unspec"; + case CODE_TAB: return "tab"; + case CODE_ENTER: return "enter"; + case CODE_SPACE: return "space"; + default: + if (code < CODE_SPACE) return String.format("\\u%02X", code); + if (code < 0x100) return String.format("%c", code); + if (code < 0x10000) return String.format("\\u%04X", code); + return String.format("\\U%05X", code); + } + } + + @Nonnull + public static String printableCodes(@Nonnull final int[] codes) { + final StringBuilder sb = new StringBuilder(); + boolean addDelimiter = false; + for (final int code : codes) { + if (code == NOT_A_CODE) break; + if (addDelimiter) sb.append(", "); + sb.append(printableCode(code)); + addDelimiter = true; + } + return "[" + sb + "]"; + } + + /** + * Screen metrics (a.k.a. Device form factor) constants of + * {@link org.kelar.inputmethod.latin.R.integer#config_screen_metrics}. + */ + public static final int SCREEN_METRICS_SMALL_PHONE = 0; + public static final int SCREEN_METRICS_LARGE_PHONE = 1; + public static final int SCREEN_METRICS_LARGE_TABLET = 2; + public static final int SCREEN_METRICS_SMALL_TABLET = 3; + + @UsedForTesting + public static boolean isPhone(final int screenMetrics) { + return screenMetrics == SCREEN_METRICS_SMALL_PHONE + || screenMetrics == SCREEN_METRICS_LARGE_PHONE; + } + + @UsedForTesting + public static boolean isTablet(final int screenMetrics) { + return screenMetrics == SCREEN_METRICS_SMALL_TABLET + || screenMetrics == SCREEN_METRICS_LARGE_TABLET; + } + + /** + * Default capacity of gesture points container. + * This constant is used by {@link BatchInputArbiter} + * and etc. to preallocate regions that contain gesture event points. + */ + public static final int DEFAULT_GESTURE_POINTS_CAPACITY = 128; + + public static final int MAX_IME_DECODER_RESULTS = 20; + public static final int DECODER_SCORE_SCALAR = 1000000; + public static final int DECODER_MAX_SCORE = 1000000000; + + public static final int EVENT_BACKSPACE = 1; + public static final int EVENT_REJECTION = 2; + public static final int EVENT_REVERT = 3; + + private Constants() { + // This utility class is not publicly instantiable. + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/CoordinateUtils.java b/common/src/org/kelar/inputmethod/latin/common/CoordinateUtils.java new file mode 100644 index 000000000..ec46f743e --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/CoordinateUtils.java @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.latin.common; + +import javax.annotation.Nonnull; + +public final class CoordinateUtils { + private static final int INDEX_X = 0; + private static final int INDEX_Y = 1; + private static final int ELEMENT_SIZE = INDEX_Y + 1; + + private CoordinateUtils() { + // This utility class is not publicly instantiable. + } + + @Nonnull + public static int[] newInstance() { + return new int[ELEMENT_SIZE]; + } + + public static int x(@Nonnull final int[] coords) { + return coords[INDEX_X]; + } + + public static int y(@Nonnull final int[] coords) { + return coords[INDEX_Y]; + } + + public static void set(@Nonnull final int[] coords, final int x, final int y) { + coords[INDEX_X] = x; + coords[INDEX_Y] = y; + } + + public static void copy(@Nonnull final int[] destination, @Nonnull final int[] source) { + destination[INDEX_X] = source[INDEX_X]; + destination[INDEX_Y] = source[INDEX_Y]; + } + + @Nonnull + public static int[] newCoordinateArray(final int arraySize) { + return new int[ELEMENT_SIZE * arraySize]; + } + + @Nonnull + public static int[] newCoordinateArray(final int arraySize, + final int defaultX, final int defaultY) { + final int[] result = new int[ELEMENT_SIZE * arraySize]; + for (int i = 0; i < arraySize; ++i) { + setXYInArray(result, i, defaultX, defaultY); + } + return result; + } + + public static int xFromArray(@Nonnull final int[] coordsArray, final int index) { + return coordsArray[ELEMENT_SIZE * index + INDEX_X]; + } + + public static int yFromArray(@Nonnull final int[] coordsArray, final int index) { + return coordsArray[ELEMENT_SIZE * index + INDEX_Y]; + } + + @Nonnull + public static int[] coordinateFromArray(@Nonnull final int[] coordsArray, final int index) { + final int[] coords = newInstance(); + set(coords, xFromArray(coordsArray, index), yFromArray(coordsArray, index)); + return coords; + } + + public static void setXYInArray(@Nonnull final int[] coordsArray, final int index, + final int x, final int y) { + final int baseIndex = ELEMENT_SIZE * index; + coordsArray[baseIndex + INDEX_X] = x; + coordsArray[baseIndex + INDEX_Y] = y; + } + + public static void setCoordinateInArray(@Nonnull final int[] coordsArray, final int index, + @Nonnull final int[] coords) { + setXYInArray(coordsArray, index, x(coords), y(coords)); + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/FileUtils.java b/common/src/org/kelar/inputmethod/latin/common/FileUtils.java new file mode 100644 index 000000000..8696f26c1 --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/FileUtils.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2013 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.kelar.inputmethod.latin.common; + +import java.io.File; +import java.io.FilenameFilter; + +/** + * A simple class to help with removing directories recursively. + */ +public class FileUtils { + private static final String TAG = "FileUtils"; + + public static boolean deleteRecursively(final File path) { + if (path.isDirectory()) { + final File[] files = path.listFiles(); + if (files != null) { + for (final File child : files) { + deleteRecursively(child); + } + } + } + return path.delete(); + } + + public static boolean deleteFilteredFiles(final File dir, final FilenameFilter fileNameFilter) { + if (!dir.isDirectory()) { + return false; + } + final File[] files = dir.listFiles(fileNameFilter); + if (files == null) { + return false; + } + boolean hasDeletedAllFiles = true; + for (final File file : files) { + if (!deleteRecursively(file)) { + hasDeletedAllFiles = false; + } + } + return hasDeletedAllFiles; + } + + public static boolean renameTo(final File fromFile, final File toFile) { + toFile.delete(); + return fromFile.renameTo(toFile); + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/InputPointers.java b/common/src/org/kelar/inputmethod/latin/common/InputPointers.java new file mode 100644 index 000000000..3ee1dbe92 --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/InputPointers.java @@ -0,0 +1,166 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.latin.common; + +import org.kelar.inputmethod.annotations.UsedForTesting; + +import javax.annotation.Nonnull; + +// TODO: This class is not thread-safe. +public final class InputPointers { + private static final boolean DEBUG_TIME = false; + + private final int mDefaultCapacity; + private final ResizableIntArray mXCoordinates; + private final ResizableIntArray mYCoordinates; + private final ResizableIntArray mPointerIds; + private final ResizableIntArray mTimes; + + public InputPointers(final int defaultCapacity) { + mDefaultCapacity = defaultCapacity; + mXCoordinates = new ResizableIntArray(defaultCapacity); + mYCoordinates = new ResizableIntArray(defaultCapacity); + mPointerIds = new ResizableIntArray(defaultCapacity); + mTimes = new ResizableIntArray(defaultCapacity); + } + + private void fillWithLastTimeUntil(final int index) { + final int fromIndex = mTimes.getLength(); + // Fill the gap with the latest time. + // See {@link #getTime(int)} and {@link #isValidTimeStamps()}. + if (fromIndex <= 0) { + return; + } + final int fillLength = index - fromIndex + 1; + if (fillLength <= 0) { + return; + } + final int lastTime = mTimes.get(fromIndex - 1); + mTimes.fill(lastTime, fromIndex, fillLength); + } + + public void addPointerAt(final int index, final int x, final int y, final int pointerId, + final int time) { + mXCoordinates.addAt(index, x); + mYCoordinates.addAt(index, y); + mPointerIds.addAt(index, pointerId); + if (DEBUG_TIME) { + fillWithLastTimeUntil(index); + } + mTimes.addAt(index, time); + } + + @UsedForTesting + public void addPointer(final int x, final int y, final int pointerId, final int time) { + mXCoordinates.add(x); + mYCoordinates.add(y); + mPointerIds.add(pointerId); + mTimes.add(time); + } + + public void set(@Nonnull final InputPointers ip) { + mXCoordinates.set(ip.mXCoordinates); + mYCoordinates.set(ip.mYCoordinates); + mPointerIds.set(ip.mPointerIds); + mTimes.set(ip.mTimes); + } + + public void copy(@Nonnull final InputPointers ip) { + mXCoordinates.copy(ip.mXCoordinates); + mYCoordinates.copy(ip.mYCoordinates); + mPointerIds.copy(ip.mPointerIds); + mTimes.copy(ip.mTimes); + } + + /** + * Append the times, x-coordinates and y-coordinates in the specified {@link ResizableIntArray} + * to the end of this. + * @param pointerId the pointer id of the source. + * @param times the source {@link ResizableIntArray} to read the event times from. + * @param xCoordinates the source {@link ResizableIntArray} to read the x-coordinates from. + * @param yCoordinates the source {@link ResizableIntArray} to read the y-coordinates from. + * @param startPos the starting index of the data in {@code times} and etc. + * @param length the number of data to be appended. + */ + public void append(final int pointerId, @Nonnull final ResizableIntArray times, + @Nonnull final ResizableIntArray xCoordinates, + @Nonnull final ResizableIntArray yCoordinates, final int startPos, final int length) { + if (length == 0) { + return; + } + mXCoordinates.append(xCoordinates, startPos, length); + mYCoordinates.append(yCoordinates, startPos, length); + mPointerIds.fill(pointerId, mPointerIds.getLength(), length); + mTimes.append(times, startPos, length); + } + + /** + * Shift to the left by elementCount, discarding elementCount pointers at the start. + * @param elementCount how many elements to shift. + */ + @UsedForTesting + public void shift(final int elementCount) { + mXCoordinates.shift(elementCount); + mYCoordinates.shift(elementCount); + mPointerIds.shift(elementCount); + mTimes.shift(elementCount); + } + + public void reset() { + final int defaultCapacity = mDefaultCapacity; + mXCoordinates.reset(defaultCapacity); + mYCoordinates.reset(defaultCapacity); + mPointerIds.reset(defaultCapacity); + mTimes.reset(defaultCapacity); + } + + public int getPointerSize() { + return mXCoordinates.getLength(); + } + + @Nonnull + public int[] getXCoordinates() { + return mXCoordinates.getPrimitiveArray(); + } + + @Nonnull + public int[] getYCoordinates() { + return mYCoordinates.getPrimitiveArray(); + } + + @Nonnull + public int[] getPointerIds() { + return mPointerIds.getPrimitiveArray(); + } + + /** + * Gets the time each point was registered, in milliseconds, relative to the first event in the + * sequence. + * @return The time each point was registered, in milliseconds, relative to the first event in + * the sequence. + */ + @Nonnull + public int[] getTimes() { + return mTimes.getPrimitiveArray(); + } + + @Override + public String toString() { + return "size=" + getPointerSize() + " id=" + mPointerIds + " time=" + mTimes + + " x=" + mXCoordinates + " y=" + mYCoordinates; + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/LocaleUtils.java b/common/src/org/kelar/inputmethod/latin/common/LocaleUtils.java new file mode 100644 index 000000000..2ed3f1b85 --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/LocaleUtils.java @@ -0,0 +1,210 @@ +/* + * Copyright (C) 2011 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.kelar.inputmethod.latin.common; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Locale; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * A class to help with handling Locales in string form. + * + * This file has the same meaning and features (and shares all of its code) with the one with the + * same name in Latin IME. They need to be kept synchronized; for any update/bugfix to + * this file, consider also updating/fixing the version in Latin IME. + */ +public final class LocaleUtils { + private LocaleUtils() { + // Intentional empty constructor for utility class. + } + + // Locale match level constants. + // A higher level of match is guaranteed to have a higher numerical value. + // Some room is left within constants to add match cases that may arise necessary + // in the future, for example differentiating between the case where the countries + // are both present and different, and the case where one of the locales does not + // specify the countries. This difference is not needed now. + + // Nothing matches. + public static final int LOCALE_NO_MATCH = 0; + // The languages matches, but the country are different. Or, the reference locale requires a + // country and the tested locale does not have one. + public static final int LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER = 3; + // The languages and country match, but the variants are different. Or, the reference locale + // requires a variant and the tested locale does not have one. + public static final int LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER = 6; + // The required locale is null or empty so it will accept anything, and the tested locale + // is non-null and non-empty. + public static final int LOCALE_ANY_MATCH = 10; + // The language matches, and the tested locale specifies a country but the reference locale + // does not require one. + public static final int LOCALE_LANGUAGE_MATCH = 15; + // The language and the country match, and the tested locale specifies a variant but the + // reference locale does not require one. + public static final int LOCALE_LANGUAGE_AND_COUNTRY_MATCH = 20; + // The compared locales are fully identical. This is the best match level. + public static final int LOCALE_FULL_MATCH = 30; + + // The level at which a match is "normally" considered a locale match with standard algorithms. + // Don't use this directly, use #isMatch to test. + private static final int LOCALE_MATCH = LOCALE_ANY_MATCH; + + // Make this match the maximum match level. If this evolves to have more than 2 digits + // when written in base 10, also adjust the getMatchLevelSortedString method. + private static final int MATCH_LEVEL_MAX = 30; + + /** + * Return how well a tested locale matches a reference locale. + * + * This will check the tested locale against the reference locale and return a measure of how + * a well it matches the reference. The general idea is that the tested locale has to match + * every specified part of the required locale. A full match occur when they are equal, a + * partial match when the tested locale agrees with the reference locale but is more specific, + * and a difference when the tested locale does not comply with all requirements from the + * reference locale. + * In more detail, if the reference locale specifies at least a language and the testedLocale + * does not specify one, or specifies a different one, LOCALE_NO_MATCH is returned. If the + * reference locale is empty or null, it will match anything - in the form of LOCALE_FULL_MATCH + * if the tested locale is empty or null, and LOCALE_ANY_MATCH otherwise. If the reference and + * tested locale agree on the language, but not on the country, + * LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER is returned if the reference locale specifies a country, + * and LOCALE_LANGUAGE_MATCH otherwise. + * If they agree on both the language and the country, but not on the variant, + * LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER is returned if the reference locale + * specifies a variant, and LOCALE_LANGUAGE_AND_COUNTRY_MATCH otherwise. If everything matches, + * LOCALE_FULL_MATCH is returned. + * Examples: + * en <=> en_US => LOCALE_LANGUAGE_MATCH + * en_US <=> en => LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER + * en_US_POSIX <=> en_US_Android => LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER + * en_US <=> en_US_Android => LOCALE_LANGUAGE_AND_COUNTRY_MATCH + * sp_US <=> en_US => LOCALE_NO_MATCH + * de <=> de => LOCALE_FULL_MATCH + * en_US <=> en_US => LOCALE_FULL_MATCH + * "" <=> en_US => LOCALE_ANY_MATCH + * + * @param referenceLocale the reference locale to test against. + * @param testedLocale the locale to test. + * @return a constant that measures how well the tested locale matches the reference locale. + */ + public static int getMatchLevel(@Nullable final String referenceLocale, + @Nullable final String testedLocale) { + if (StringUtils.isEmpty(referenceLocale)) { + return StringUtils.isEmpty(testedLocale) ? LOCALE_FULL_MATCH : LOCALE_ANY_MATCH; + } + if (null == testedLocale) return LOCALE_NO_MATCH; + final String[] referenceParams = referenceLocale.split("_", 3); + final String[] testedParams = testedLocale.split("_", 3); + // By spec of String#split, [0] cannot be null and length cannot be 0. + if (!referenceParams[0].equals(testedParams[0])) return LOCALE_NO_MATCH; + switch (referenceParams.length) { + case 1: + return 1 == testedParams.length ? LOCALE_FULL_MATCH : LOCALE_LANGUAGE_MATCH; + case 2: + if (1 == testedParams.length) return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; + if (!referenceParams[1].equals(testedParams[1])) + return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; + if (3 == testedParams.length) return LOCALE_LANGUAGE_AND_COUNTRY_MATCH; + return LOCALE_FULL_MATCH; + case 3: + if (1 == testedParams.length) return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; + if (!referenceParams[1].equals(testedParams[1])) + return LOCALE_LANGUAGE_MATCH_COUNTRY_DIFFER; + if (2 == testedParams.length) return LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER; + if (!referenceParams[2].equals(testedParams[2])) + return LOCALE_LANGUAGE_AND_COUNTRY_MATCH_VARIANT_DIFFER; + return LOCALE_FULL_MATCH; + } + // It should be impossible to come here + return LOCALE_NO_MATCH; + } + + /** + * Return a string that represents this match level, with better matches first. + * + * The strings are sorted in lexicographic order: a better match will always be less than + * a worse match when compared together. + */ + public static String getMatchLevelSortedString(final int matchLevel) { + // This works because the match levels are 0~99 (actually 0~30) + // Ideally this should use a number of digits equals to the 1og10 of the greater matchLevel + return String.format(Locale.ROOT, "%02d", MATCH_LEVEL_MAX - matchLevel); + } + + /** + * Find out whether a match level should be considered a match. + * + * This method takes a match level as returned by the #getMatchLevel method, and returns whether + * it should be considered a match in the usual sense with standard Locale functions. + * + * @param level the match level, as returned by getMatchLevel. + * @return whether this is a match or not. + */ + public static boolean isMatch(final int level) { + return LOCALE_MATCH <= level; + } + + private static final HashMap sLocaleCache = new HashMap<>(); + + /** + * Creates a locale from a string specification. + * @param localeString a string specification of a locale, in a format of "ll_cc_variant" where + * "ll" is a language code, "cc" is a country code. + */ + @Nonnull + public static Locale constructLocaleFromString(@Nonnull final String localeString) { + synchronized (sLocaleCache) { + if (sLocaleCache.containsKey(localeString)) { + return sLocaleCache.get(localeString); + } + final String[] elements = localeString.split("_", 3); + final Locale locale; + if (elements.length == 1) { + locale = new Locale(elements[0] /* language */); + } else if (elements.length == 2) { + locale = new Locale(elements[0] /* language */, elements[1] /* country */); + } else { // localeParams.length == 3 + locale = new Locale(elements[0] /* language */, elements[1] /* country */, + elements[2] /* variant */); + } + sLocaleCache.put(localeString, locale); + return locale; + } + } + + // TODO: Get this information from the framework instead of maintaining here by ourselves. + private static final HashSet sRtlLanguageCodes = new HashSet<>(); + static { + // List of known Right-To-Left language codes. + sRtlLanguageCodes.add("ar"); // Arabic + sRtlLanguageCodes.add("fa"); // Persian + sRtlLanguageCodes.add("iw"); // Hebrew + sRtlLanguageCodes.add("ku"); // Kurdish + sRtlLanguageCodes.add("ps"); // Pashto + sRtlLanguageCodes.add("sd"); // Sindhi + sRtlLanguageCodes.add("ug"); // Uyghur + sRtlLanguageCodes.add("ur"); // Urdu + sRtlLanguageCodes.add("yi"); // Yiddish + } + + public static boolean isRtlLanguage(@Nonnull final Locale locale) { + return sRtlLanguageCodes.contains(locale.getLanguage()); + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/NativeSuggestOptions.java b/common/src/org/kelar/inputmethod/latin/common/NativeSuggestOptions.java new file mode 100644 index 000000000..fe7ed9e8e --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/NativeSuggestOptions.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2013 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.kelar.inputmethod.latin.common; + +public class NativeSuggestOptions { + // Need to update suggest_options.h when you add, remove or reorder options. + private static final int IS_GESTURE = 0; + private static final int USE_FULL_EDIT_DISTANCE = 1; + private static final int BLOCK_OFFENSIVE_WORDS = 2; + private static final int SPACE_AWARE_GESTURE_ENABLED = 3; + private static final int WEIGHT_FOR_LOCALE_IN_THOUSANDS = 4; + private static final int OPTIONS_SIZE = 5; + + private final int[] mOptions; + + public NativeSuggestOptions() { + mOptions = new int[OPTIONS_SIZE]; + } + + public void setIsGesture(final boolean value) { + setBooleanOption(IS_GESTURE, value); + } + + public void setUseFullEditDistance(final boolean value) { + setBooleanOption(USE_FULL_EDIT_DISTANCE, value); + } + + public void setBlockOffensiveWords(final boolean value) { + setBooleanOption(BLOCK_OFFENSIVE_WORDS, value); + } + + public void setWeightForLocale(final float value) { + // We're passing this option as a fixed point value, in thousands. This is decoded in + // native code by SuggestOptions#weightForLocale(). + setIntegerOption(WEIGHT_FOR_LOCALE_IN_THOUSANDS, (int) (value * 1000)); + } + + public int[] getOptions() { + return mOptions; + } + + private void setBooleanOption(final int key, final boolean value) { + mOptions[key] = value ? 1 : 0; + } + + private void setIntegerOption(final int key, final int value) { + mOptions[key] = value; + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/ResizableIntArray.java b/common/src/org/kelar/inputmethod/latin/common/ResizableIntArray.java new file mode 100644 index 000000000..74a1779fe --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/ResizableIntArray.java @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.latin.common; + +import org.kelar.inputmethod.annotations.UsedForTesting; + +import java.util.Arrays; + +import javax.annotation.Nonnull; + +// TODO: This class is not thread-safe. +public final class ResizableIntArray { + @Nonnull + private int[] mArray; + private int mLength; + + public ResizableIntArray(final int capacity) { + reset(capacity); + } + + public int get(final int index) { + if (index < mLength) { + return mArray[index]; + } + throw new ArrayIndexOutOfBoundsException("length=" + mLength + "; index=" + index); + } + + public void addAt(final int index, final int val) { + if (index < mLength) { + mArray[index] = val; + } else { + mLength = index; + add(val); + } + } + + public void add(final int val) { + final int currentLength = mLength; + ensureCapacity(currentLength + 1); + mArray[currentLength] = val; + mLength = currentLength + 1; + } + + /** + * Calculate the new capacity of {@code mArray}. + * @param minimumCapacity the minimum capacity that the {@code mArray} should have. + * @return the new capacity that the {@code mArray} should have. Returns zero when there is no + * need to expand {@code mArray}. + */ + private int calculateCapacity(final int minimumCapacity) { + final int currentCapcity = mArray.length; + if (currentCapcity < minimumCapacity) { + final int nextCapacity = currentCapcity * 2; + // The following is the same as return Math.max(minimumCapacity, nextCapacity); + return minimumCapacity > nextCapacity ? minimumCapacity : nextCapacity; + } + return 0; + } + + private void ensureCapacity(final int minimumCapacity) { + final int newCapacity = calculateCapacity(minimumCapacity); + if (newCapacity > 0) { + // TODO: Implement primitive array pool. + mArray = Arrays.copyOf(mArray, newCapacity); + } + } + + public int getLength() { + return mLength; + } + + public void setLength(final int newLength) { + ensureCapacity(newLength); + mLength = newLength; + } + + public void reset(final int capacity) { + // TODO: Implement primitive array pool. + mArray = new int[capacity]; + mLength = 0; + } + + @Nonnull + public int[] getPrimitiveArray() { + return mArray; + } + + public void set(@Nonnull final ResizableIntArray ip) { + // TODO: Implement primitive array pool. + mArray = ip.mArray; + mLength = ip.mLength; + } + + public void copy(@Nonnull final ResizableIntArray ip) { + final int newCapacity = calculateCapacity(ip.mLength); + if (newCapacity > 0) { + // TODO: Implement primitive array pool. + mArray = new int[newCapacity]; + } + System.arraycopy(ip.mArray, 0, mArray, 0, ip.mLength); + mLength = ip.mLength; + } + + public void append(@Nonnull final ResizableIntArray src, final int startPos, final int length) { + if (length == 0) { + return; + } + final int currentLength = mLength; + final int newLength = currentLength + length; + ensureCapacity(newLength); + System.arraycopy(src.mArray, startPos, mArray, currentLength, length); + mLength = newLength; + } + + public void fill(final int value, final int startPos, final int length) { + if (startPos < 0 || length < 0) { + throw new IllegalArgumentException("startPos=" + startPos + "; length=" + length); + } + final int endPos = startPos + length; + ensureCapacity(endPos); + Arrays.fill(mArray, startPos, endPos, value); + if (mLength < endPos) { + mLength = endPos; + } + } + + /** + * Shift to the left by elementCount, discarding elementCount pointers at the start. + * @param elementCount how many elements to shift. + */ + @UsedForTesting + public void shift(final int elementCount) { + System.arraycopy(mArray, elementCount, mArray, 0, mLength - elementCount); + mLength -= elementCount; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + for (int i = 0; i < mLength; i++) { + if (i != 0) { + sb.append(","); + } + sb.append(mArray[i]); + } + return "[" + sb + "]"; + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/StringUtils.java b/common/src/org/kelar/inputmethod/latin/common/StringUtils.java new file mode 100644 index 000000000..efbecd328 --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/StringUtils.java @@ -0,0 +1,704 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.kelar.inputmethod.latin.common; + +import org.kelar.inputmethod.annotations.UsedForTesting; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Locale; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +public final class StringUtils { + public static final int CAPITALIZE_NONE = 0; // No caps, or mixed case + public static final int CAPITALIZE_FIRST = 1; // First only + public static final int CAPITALIZE_ALL = 2; // All caps + + @Nonnull + private static final String EMPTY_STRING = ""; + + private static final char CHAR_LINE_FEED = 0X000A; + private static final char CHAR_VERTICAL_TAB = 0X000B; + private static final char CHAR_FORM_FEED = 0X000C; + private static final char CHAR_CARRIAGE_RETURN = 0X000D; + private static final char CHAR_NEXT_LINE = 0X0085; + private static final char CHAR_LINE_SEPARATOR = 0X2028; + private static final char CHAR_PARAGRAPH_SEPARATOR = 0X2029; + + private StringUtils() { + // This utility class is not publicly instantiable. + } + + // Taken from android.text.TextUtils. We are extensively using this method in many places, + // some of which don't have the android libraries available. + /** + * Returns true if the string is null or 0-length. + * @param str the string to be examined + * @return true if str is null or zero length + */ + public static boolean isEmpty(@Nullable final CharSequence str) { + return (str == null || str.length() == 0); + } + + // Taken from android.text.TextUtils to cut the dependency to the Android framework. + /** + * Returns a string containing the tokens joined by delimiters. + * @param delimiter the delimiter + * @param tokens an array objects to be joined. Strings will be formed from + * the objects by calling object.toString(). + */ + @Nonnull + public static String join(@Nonnull final CharSequence delimiter, + @Nonnull final Iterable tokens) { + final StringBuilder sb = new StringBuilder(); + boolean firstTime = true; + for (final Object token: tokens) { + if (firstTime) { + firstTime = false; + } else { + sb.append(delimiter); + } + sb.append(token); + } + return sb.toString(); + } + + // Taken from android.text.TextUtils to cut the dependency to the Android framework. + /** + * Returns true if a and b are equal, including if they are both null. + *

Note: In platform versions 1.1 and earlier, this method only worked well if + * both the arguments were instances of String.

+ * @param a first CharSequence to check + * @param b second CharSequence to check + * @return true if a and b are equal + */ + public static boolean equals(@Nullable final CharSequence a, @Nullable final CharSequence b) { + if (a == b) { + return true; + } + final int length; + if (a != null && b != null && (length = a.length()) == b.length()) { + if (a instanceof String && b instanceof String) { + return a.equals(b); + } + for (int i = 0; i < length; i++) { + if (a.charAt(i) != b.charAt(i)) { + return false; + } + } + return true; + } + return false; + } + + public static int codePointCount(@Nullable final CharSequence text) { + if (isEmpty(text)) { + return 0; + } + return Character.codePointCount(text, 0, text.length()); + } + + @Nonnull + public static String newSingleCodePointString(final int codePoint) { + if (Character.charCount(codePoint) == 1) { + // Optimization: avoid creating a temporary array for characters that are + // represented by a single char value + return String.valueOf((char) codePoint); + } + // For surrogate pair + return new String(Character.toChars(codePoint)); + } + + public static boolean containsInArray(@Nonnull final String text, + @Nonnull final String[] array) { + for (final String element : array) { + if (text.equals(element)) { + return true; + } + } + return false; + } + + /** + * Comma-Splittable Text is similar to Comma-Separated Values (CSV) but has much simpler syntax. + * Unlike CSV, Comma-Splittable Text has no escaping mechanism, so that the text can't contain + * a comma character in it. + */ + @Nonnull + private static final String SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT = ","; + + public static boolean containsInCommaSplittableText(@Nonnull final String text, + @Nullable final String extraValues) { + if (isEmpty(extraValues)) { + return false; + } + return containsInArray(text, extraValues.split(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT)); + } + + @Nonnull + public static String removeFromCommaSplittableTextIfExists(@Nonnull final String text, + @Nullable final String extraValues) { + if (isEmpty(extraValues)) { + return EMPTY_STRING; + } + final String[] elements = extraValues.split(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT); + if (!containsInArray(text, elements)) { + return extraValues; + } + final ArrayList result = new ArrayList<>(elements.length - 1); + for (final String element : elements) { + if (!text.equals(element)) { + result.add(element); + } + } + return join(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT, result); + } + + /** + * Remove duplicates from an array of strings. + * + * This method will always keep the first occurrence of all strings at their position + * in the array, removing the subsequent ones. + */ + public static void removeDupes(@Nonnull final ArrayList suggestions) { + if (suggestions.size() < 2) { + return; + } + int i = 1; + // Don't cache suggestions.size(), since we may be removing items + while (i < suggestions.size()) { + final String cur = suggestions.get(i); + // Compare each suggestion with each previous suggestion + for (int j = 0; j < i; j++) { + final String previous = suggestions.get(j); + if (equals(cur, previous)) { + suggestions.remove(i); + i--; + break; + } + } + i++; + } + } + + @Nonnull + public static String capitalizeFirstCodePoint(@Nonnull final String s, + @Nonnull final Locale locale) { + if (s.length() <= 1) { + return s.toUpperCase(getLocaleUsedForToTitleCase(locale)); + } + // Please refer to the comment below in + // {@link #capitalizeFirstAndDowncaseRest(String,Locale)} as this has the same shortcomings + final int cutoff = s.offsetByCodePoints(0, 1); + return s.substring(0, cutoff).toUpperCase(getLocaleUsedForToTitleCase(locale)) + + s.substring(cutoff); + } + + @Nonnull + public static String capitalizeFirstAndDowncaseRest(@Nonnull final String s, + @Nonnull final Locale locale) { + if (s.length() <= 1) { + return s.toUpperCase(getLocaleUsedForToTitleCase(locale)); + } + // TODO: fix the bugs below + // - It does not work for Serbian, because it fails to account for the "lj" character, + // which should be "Lj" in title case and "LJ" in upper case. + // - It does not work for Dutch, because it fails to account for the "ij" digraph when it's + // written as two separate code points. They are two different characters but both should + // be capitalized as "IJ" as if they were a single letter in most words (not all). If the + // unicode char for the ligature is used however, it works. + final int cutoff = s.offsetByCodePoints(0, 1); + return s.substring(0, cutoff).toUpperCase(getLocaleUsedForToTitleCase(locale)) + + s.substring(cutoff).toLowerCase(locale); + } + + @Nonnull + public static int[] toCodePointArray(@Nonnull final CharSequence charSequence) { + return toCodePointArray(charSequence, 0, charSequence.length()); + } + + @Nonnull + private static final int[] EMPTY_CODEPOINTS = {}; + + /** + * Converts a range of a string to an array of code points. + * @param charSequence the source string. + * @param startIndex the start index inside the string in java chars, inclusive. + * @param endIndex the end index inside the string in java chars, exclusive. + * @return a new array of code points. At most endIndex - startIndex, but possibly less. + */ + @Nonnull + public static int[] toCodePointArray(@Nonnull final CharSequence charSequence, + final int startIndex, final int endIndex) { + final int length = charSequence.length(); + if (length <= 0) { + return EMPTY_CODEPOINTS; + } + final int[] codePoints = + new int[Character.codePointCount(charSequence, startIndex, endIndex)]; + copyCodePointsAndReturnCodePointCount(codePoints, charSequence, startIndex, endIndex, + false /* downCase */); + return codePoints; + } + + /** + * Copies the codepoints in a CharSequence to an int array. + * + * This method assumes there is enough space in the array to store the code points. The size + * can be measured with Character#codePointCount(CharSequence, int, int) before passing to this + * method. If the int array is too small, an ArrayIndexOutOfBoundsException will be thrown. + * Also, this method makes no effort to be thread-safe. Do not modify the CharSequence while + * this method is running, or the behavior is undefined. + * This method can optionally downcase code points before copying them, but it pays no attention + * to locale while doing so. + * + * @param destination the int array. + * @param charSequence the CharSequence. + * @param startIndex the start index inside the string in java chars, inclusive. + * @param endIndex the end index inside the string in java chars, exclusive. + * @param downCase if this is true, code points will be downcased before being copied. + * @return the number of copied code points. + */ + public static int copyCodePointsAndReturnCodePointCount(@Nonnull final int[] destination, + @Nonnull final CharSequence charSequence, final int startIndex, final int endIndex, + final boolean downCase) { + int destIndex = 0; + for (int index = startIndex; index < endIndex; + index = Character.offsetByCodePoints(charSequence, index, 1)) { + final int codePoint = Character.codePointAt(charSequence, index); + // TODO: stop using this, as it's not aware of the locale and does not always do + // the right thing. + destination[destIndex] = downCase ? Character.toLowerCase(codePoint) : codePoint; + destIndex++; + } + return destIndex; + } + + @Nonnull + public static int[] toSortedCodePointArray(@Nonnull final String string) { + final int[] codePoints = toCodePointArray(string); + Arrays.sort(codePoints); + return codePoints; + } + + /** + * Construct a String from a code point array + * + * @param codePoints a code point array that is null terminated when its logical length is + * shorter than the array length. + * @return a string constructed from the code point array. + */ + @Nonnull + public static String getStringFromNullTerminatedCodePointArray( + @Nonnull final int[] codePoints) { + int stringLength = codePoints.length; + for (int i = 0; i < codePoints.length; i++) { + if (codePoints[i] == 0) { + stringLength = i; + break; + } + } + return new String(codePoints, 0 /* offset */, stringLength); + } + + // This method assumes the text is not null. For the empty string, it returns CAPITALIZE_NONE. + public static int getCapitalizationType(@Nonnull final String text) { + // If the first char is not uppercase, then the word is either all lower case or + // camel case, and in either case we return CAPITALIZE_NONE. + final int len = text.length(); + int index = 0; + for (; index < len; index = text.offsetByCodePoints(index, 1)) { + if (Character.isLetter(text.codePointAt(index))) { + break; + } + } + if (index == len) return CAPITALIZE_NONE; + if (!Character.isUpperCase(text.codePointAt(index))) { + return CAPITALIZE_NONE; + } + int capsCount = 1; + int letterCount = 1; + for (index = text.offsetByCodePoints(index, 1); index < len; + index = text.offsetByCodePoints(index, 1)) { + if (1 != capsCount && letterCount != capsCount) break; + final int codePoint = text.codePointAt(index); + if (Character.isUpperCase(codePoint)) { + ++capsCount; + ++letterCount; + } else if (Character.isLetter(codePoint)) { + // We need to discount non-letters since they may not be upper-case, but may + // still be part of a word (e.g. single quote or dash, as in "IT'S" or "FULL-TIME") + ++letterCount; + } + } + // We know the first char is upper case. So we want to test if either every letter other + // than the first is lower case, or if they are all upper case. If the string is exactly + // one char long, then we will arrive here with letterCount 1, and this is correct, too. + if (1 == capsCount) return CAPITALIZE_FIRST; + return (letterCount == capsCount ? CAPITALIZE_ALL : CAPITALIZE_NONE); + } + + public static boolean isIdenticalAfterUpcase(@Nonnull final String text) { + final int length = text.length(); + int i = 0; + while (i < length) { + final int codePoint = text.codePointAt(i); + if (Character.isLetter(codePoint) && !Character.isUpperCase(codePoint)) { + return false; + } + i += Character.charCount(codePoint); + } + return true; + } + + public static boolean isIdenticalAfterDowncase(@Nonnull final String text) { + final int length = text.length(); + int i = 0; + while (i < length) { + final int codePoint = text.codePointAt(i); + if (Character.isLetter(codePoint) && !Character.isLowerCase(codePoint)) { + return false; + } + i += Character.charCount(codePoint); + } + return true; + } + + public static boolean isIdenticalAfterCapitalizeEachWord(@Nonnull final String text, + @Nonnull final int[] sortedSeparators) { + boolean needsCapsNext = true; + final int len = text.length(); + for (int i = 0; i < len; i = text.offsetByCodePoints(i, 1)) { + final int codePoint = text.codePointAt(i); + if (Character.isLetter(codePoint)) { + if ((needsCapsNext && !Character.isUpperCase(codePoint)) + || (!needsCapsNext && !Character.isLowerCase(codePoint))) { + return false; + } + } + // We need a capital letter next if this is a separator. + needsCapsNext = (Arrays.binarySearch(sortedSeparators, codePoint) >= 0); + } + return true; + } + + // TODO: like capitalizeFirst*, this does not work perfectly for Dutch because of the IJ digraph + // which should be capitalized together in *some* cases. + @Nonnull + public static String capitalizeEachWord(@Nonnull final String text, + @Nonnull final int[] sortedSeparators, @Nonnull final Locale locale) { + final StringBuilder builder = new StringBuilder(); + boolean needsCapsNext = true; + final int len = text.length(); + for (int i = 0; i < len; i = text.offsetByCodePoints(i, 1)) { + final String nextChar = text.substring(i, text.offsetByCodePoints(i, 1)); + if (needsCapsNext) { + builder.append(nextChar.toUpperCase(locale)); + } else { + builder.append(nextChar.toLowerCase(locale)); + } + // We need a capital letter next if this is a separator. + needsCapsNext = (Arrays.binarySearch(sortedSeparators, nextChar.codePointAt(0)) >= 0); + } + return builder.toString(); + } + + /** + * Approximates whether the text before the cursor looks like a URL. + * + * This is not foolproof, but it should work well in the practice. + * Essentially it walks backward from the cursor until it finds something that's not a letter, + * digit, or common URL symbol like underscore. If it hasn't found a period yet, then it + * does not look like a URL. + * If the text: + * - starts with www and contains a period + * - starts with a slash preceded by either a slash, whitespace, or start-of-string + * Then it looks like a URL and we return true. Otherwise, we return false. + * + * Note: this method is called quite often, and should be fast. + * + * TODO: This will return that "abc./def" and ".abc/def" look like URLs to keep down the + * code complexity, but ideally it should not. It's acceptable for now. + */ + public static boolean lastPartLooksLikeURL(@Nonnull final CharSequence text) { + int i = text.length(); + if (0 == i) { + return false; + } + int wCount = 0; + int slashCount = 0; + boolean hasSlash = false; + boolean hasPeriod = false; + int codePoint = 0; + while (i > 0) { + codePoint = Character.codePointBefore(text, i); + if (codePoint < Constants.CODE_PERIOD || codePoint > 'z') { + // Handwavy heuristic to see if that's a URL character. Anything between period + // and z. This includes all lower- and upper-case ascii letters, period, + // underscore, arrobase, question mark, equal sign. It excludes spaces, exclamation + // marks, double quotes... + // Anything that's not a URL-like character causes us to break from here and + // evaluate normally. + break; + } + if (Constants.CODE_PERIOD == codePoint) { + hasPeriod = true; + } + if (Constants.CODE_SLASH == codePoint) { + hasSlash = true; + if (2 == ++slashCount) { + return true; + } + } else { + slashCount = 0; + } + if ('w' == codePoint) { + ++wCount; + } else { + wCount = 0; + } + i = Character.offsetByCodePoints(text, i, -1); + } + // End of the text run. + // If it starts with www and includes a period, then it looks like a URL. + if (wCount >= 3 && hasPeriod) { + return true; + } + // If it starts with a slash, and the code point before is whitespace, it looks like an URL. + if (1 == slashCount && (0 == i || Character.isWhitespace(codePoint))) { + return true; + } + // If it has both a period and a slash, it looks like an URL. + if (hasPeriod && hasSlash) { + return true; + } + // Otherwise, it doesn't look like an URL. + return false; + } + + /** + * Examines the string and returns whether we're inside a double quote. + * + * This is used to decide whether we should put an automatic space before or after a double + * quote character. If we're inside a quotation, then we want to close it, so we want a space + * after and not before. Otherwise, we want to open the quotation, so we want a space before + * and not after. Exception: after a digit, we never want a space because the "inch" or + * "minutes" use cases is dominant after digits. + * In the practice, we determine whether we are in a quotation or not by finding the previous + * double quote character, and looking at whether it's followed by whitespace. If so, that + * was a closing quotation mark, so we're not inside a double quote. If it's not followed + * by whitespace, then it was an opening quotation mark, and we're inside a quotation. + * + * @param text the text to examine. + * @return whether we're inside a double quote. + */ + public static boolean isInsideDoubleQuoteOrAfterDigit(@Nonnull final CharSequence text) { + int i = text.length(); + if (0 == i) { + return false; + } + int codePoint = Character.codePointBefore(text, i); + if (Character.isDigit(codePoint)) { + return true; + } + int prevCodePoint = 0; + while (i > 0) { + codePoint = Character.codePointBefore(text, i); + if (Constants.CODE_DOUBLE_QUOTE == codePoint) { + // If we see a double quote followed by whitespace, then that + // was a closing quote. + if (Character.isWhitespace(prevCodePoint)) { + return false; + } + } + if (Character.isWhitespace(codePoint) && Constants.CODE_DOUBLE_QUOTE == prevCodePoint) { + // If we see a double quote preceded by whitespace, then that + // was an opening quote. No need to continue seeking. + return true; + } + i -= Character.charCount(codePoint); + prevCodePoint = codePoint; + } + // We reached the start of text. If the first char is a double quote, then we're inside + // a double quote. Otherwise we're not. + return Constants.CODE_DOUBLE_QUOTE == codePoint; + } + + public static boolean isEmptyStringOrWhiteSpaces(@Nonnull final String s) { + final int N = codePointCount(s); + for (int i = 0; i < N; ++i) { + if (!Character.isWhitespace(s.codePointAt(i))) { + return false; + } + } + return true; + } + + @UsedForTesting + @Nonnull + public static String byteArrayToHexString(@Nullable final byte[] bytes) { + if (bytes == null || bytes.length == 0) { + return EMPTY_STRING; + } + final StringBuilder sb = new StringBuilder(); + for (final byte b : bytes) { + sb.append(String.format("%02x", b & 0xff)); + } + return sb.toString(); + } + + /** + * Convert hex string to byte array. The string length must be an even number. + */ + @UsedForTesting + @Nullable + public static byte[] hexStringToByteArray(@Nullable final String hexString) { + if (isEmpty(hexString)) { + return null; + } + final int N = hexString.length(); + if (N % 2 != 0) { + throw new NumberFormatException("Input hex string length must be an even number." + + " Length = " + N); + } + final byte[] bytes = new byte[N / 2]; + for (int i = 0; i < N; i += 2) { + bytes[i / 2] = (byte) ((Character.digit(hexString.charAt(i), 16) << 4) + + Character.digit(hexString.charAt(i + 1), 16)); + } + return bytes; + } + + private static final String LANGUAGE_GREEK = "el"; + + @Nonnull + private static Locale getLocaleUsedForToTitleCase(@Nonnull final Locale locale) { + // In Greek locale {@link String#toUpperCase(Locale)} eliminates accents from its result. + // In order to get accented upper case letter, {@link Locale#ROOT} should be used. + if (LANGUAGE_GREEK.equals(locale.getLanguage())) { + return Locale.ROOT; + } + return locale; + } + + @Nullable + public static String toTitleCaseOfKeyLabel(@Nullable final String label, + @Nonnull final Locale locale) { + if (label == null) { + return label; + } + return label.toUpperCase(getLocaleUsedForToTitleCase(locale)); + } + + public static int toTitleCaseOfKeyCode(final int code, @Nonnull final Locale locale) { + if (!Constants.isLetterCode(code)) { + return code; + } + final String label = newSingleCodePointString(code); + final String titleCaseLabel = toTitleCaseOfKeyLabel(label, locale); + return codePointCount(titleCaseLabel) == 1 + ? titleCaseLabel.codePointAt(0) : Constants.CODE_UNSPECIFIED; + } + + public static int getTrailingSingleQuotesCount(@Nonnull final CharSequence charSequence) { + final int lastIndex = charSequence.length() - 1; + int i = lastIndex; + while (i >= 0 && charSequence.charAt(i) == Constants.CODE_SINGLE_QUOTE) { + --i; + } + return lastIndex - i; + } + + @UsedForTesting + public static class Stringizer { + @Nonnull + private static final String[] EMPTY_STRING_ARRAY = new String[0]; + + @UsedForTesting + @Nonnull + public String stringize(@Nullable final E element) { + if (element == null) { + return "null"; + } + return element.toString(); + } + + @UsedForTesting + @Nonnull + public final String join(@Nullable final E[] array) { + return joinStringArray(toStringArray(array), null /* delimiter */); + } + + @UsedForTesting + public final String join(@Nullable final E[] array, @Nullable final String delimiter) { + return joinStringArray(toStringArray(array), delimiter); + } + + @Nonnull + protected String[] toStringArray(@Nullable final E[] array) { + if (array == null) { + return EMPTY_STRING_ARRAY; + } + final String[] stringArray = new String[array.length]; + for (int index = 0; index < array.length; index++) { + stringArray[index] = stringize(array[index]); + } + return stringArray; + } + + @Nonnull + protected String joinStringArray(@Nonnull final String[] stringArray, + @Nullable final String delimiter) { + if (delimiter == null) { + return Arrays.toString(stringArray); + } + final StringBuilder sb = new StringBuilder(); + for (int index = 0; index < stringArray.length; index++) { + sb.append(index == 0 ? "[" : delimiter); + sb.append(stringArray[index]); + } + return sb + "]"; + } + } + + /** + * Returns whether the last composed word contains line-breaking character (e.g. CR or LF). + * @param text the text to be examined. + * @return {@code true} if the last composed word contains line-breaking separator. + */ + public static boolean hasLineBreakCharacter(@Nullable final String text) { + if (isEmpty(text)) { + return false; + } + for (int i = text.length() - 1; i >= 0; --i) { + final char c = text.charAt(i); + switch (c) { + case CHAR_LINE_FEED: + case CHAR_VERTICAL_TAB: + case CHAR_FORM_FEED: + case CHAR_CARRIAGE_RETURN: + case CHAR_NEXT_LINE: + case CHAR_LINE_SEPARATOR: + case CHAR_PARAGRAPH_SEPARATOR: + return true; + } + } + return false; + } +} diff --git a/common/src/org/kelar/inputmethod/latin/common/UnicodeSurrogate.java b/common/src/org/kelar/inputmethod/latin/common/UnicodeSurrogate.java new file mode 100644 index 000000000..3221606b2 --- /dev/null +++ b/common/src/org/kelar/inputmethod/latin/common/UnicodeSurrogate.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2015 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.kelar.inputmethod.latin.common; + +/** + * Emojis are supplementary characters expressed as a low+high pair. For instance, + * the emoji U+1F625 is encoded as "\uD83D\uDE25" in UTF-16, where '\uD83D' is in + * the range of [0xd800, 0xdbff] and '\uDE25' is in the range of [0xdc00, 0xdfff]. + * {@see http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#unicode} + */ +public final class UnicodeSurrogate { + private static final char LOW_SURROGATE_MIN = '\uD800'; + private static final char LOW_SURROGATE_MAX = '\uDBFF'; + private static final char HIGH_SURROGATE_MIN = '\uDC00'; + private static final char HIGH_SURROGATE_MAX = '\uDFFF'; + + public static boolean isLowSurrogate(final char c) { + return c >= LOW_SURROGATE_MIN && c <= LOW_SURROGATE_MAX; + } + + public static boolean isHighSurrogate(final char c) { + return c >= HIGH_SURROGATE_MIN && c <= HIGH_SURROGATE_MAX; + } +} diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml index 633c68be3..03f5fecd8 100644 --- a/java/AndroidManifest.xml +++ b/java/AndroidManifest.xml @@ -15,13 +15,9 @@ --> - - @@ -37,21 +33,21 @@ - - @@ -92,7 +88,7 @@ android:resource="@xml/spellchecker"/> - @@ -144,7 +140,7 @@ - - @@ -181,17 +177,17 @@ - + - - - + + @@ -204,7 +200,7 @@ - + package="org.kelar.inputmethod.latin"> diff --git a/java/lint-baseline.xml b/java/lint-baseline.xml index 7e70f0136..c920eb82c 100644 --- a/java/lint-baseline.xml +++ b/java/lint-baseline.xml @@ -7,7 +7,7 @@ errorLine1=" return paint.hasGlyph(switzerland);" errorLine2=" ~~~~~~~~"> @@ -18,7 +18,7 @@ errorLine1=" return paint.hasGlyph(cheese);" errorLine2=" ~~~~~~~~"> @@ -29,7 +29,7 @@ errorLine1=" final WindowManager wm = getSystemService(WindowManager.class);" errorLine2=" ~~~~~~~~~~~~~~~~"> @@ -40,7 +40,7 @@ errorLine1=" ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());" errorLine2=" ~~~~~~~~~"> @@ -51,7 +51,7 @@ errorLine1=" ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());" errorLine2=" ~~~~~~~~~~~~~~~~~~"> @@ -62,9 +62,9 @@ errorLine1=" final UserManager userManager = context.getSystemService(UserManager.class);" errorLine2=" ~~~~~~~~~~~~~~~~"> - \ No newline at end of file + diff --git a/java/proguard.flags b/java/proguard.flags index 0ebca04de..94d4dbd6e 100644 --- a/java/proguard.flags +++ b/java/proguard.flags @@ -1,19 +1,19 @@ # Keep classes and methods that have the @UsedForTesting annotation # TODO(b/373579455): Evaluate if needs to be kept. --keep @com.android.inputmethod.annotations.UsedForTesting class * { +-keep @org.kelar.inputmethod.annotations.UsedForTesting class * { void (); } -keepclassmembers class * { - @com.android.inputmethod.annotations.UsedForTesting *; + @org.kelar.inputmethod.annotations.UsedForTesting *; } # Keep classes and methods that have the @ExternallyReferenced annotation # TODO(b/373579455): Evaluate if needs to be kept. --keep @com.android.inputmethod.annotations.ExternallyReferenced class * { +-keep @org.kelar.inputmethod.annotations.ExternallyReferenced class * { void (); } -keepclassmembers class * { - @com.android.inputmethod.annotations.ExternallyReferenced *; + @org.kelar.inputmethod.annotations.ExternallyReferenced *; } # Keep native methods @@ -24,26 +24,26 @@ # Keep classes that are used as a parameter type of methods that are also marked as keep # to preserve changing those methods' signature. # TODO(b/373579455): Evaluate if needs to be kept. --keep class com.android.inputmethod.latin.AssetFileAddress { +-keep class org.kelar.inputmethod.latin.AssetFileAddress { void (); } # TODO(b/373579455): Evaluate if needs to be kept. --keep class com.android.inputmethod.latin.Dictionary { +-keep class org.kelar.inputmethod.latin.Dictionary { void (); } # TODO(b/373579455): Evaluate if needs to be kept. --keep class com.android.inputmethod.latin.NgramContext { +-keep class org.kelar.inputmethod.latin.NgramContext { void (); } # TODO(b/373579455): Evaluate if needs to be kept. --keep class com.android.inputmethod.latin.makedict.ProbabilityInfo { +-keep class org.kelar.inputmethod.latin.makedict.ProbabilityInfo { void (); } # TODO(b/373579455): Evaluate if needs to be kept. --keep class com.android.inputmethod.latin.utils.LanguageModelParam { +-keep class org.kelar.inputmethod.latin.utils.LanguageModelParam { void (); } # TODO: remove once used in code. --keep class com.android.inputmethod.keyboard.KeyboardLayout { *; } +-keep class org.kelar.inputmethod.keyboard.KeyboardLayout { *; } diff --git a/java/res/drawable/keyboard_key_feedback_ics.xml b/java/res/drawable/keyboard_key_feedback_ics.xml index b52a61fbf..cd42a1433 100644 --- a/java/res/drawable/keyboard_key_feedback_ics.xml +++ b/java/res/drawable/keyboard_key_feedback_ics.xml @@ -16,7 +16,7 @@ - - - + diff --git a/java/res/layout/emoji_keyboard_page.xml b/java/res/layout/emoji_keyboard_page.xml index 0d1086171..67f6f3f3e 100644 --- a/java/res/layout/emoji_keyboard_page.xml +++ b/java/res/layout/emoji_keyboard_page.xml @@ -18,7 +18,7 @@ */ --> - - - @@ -129,4 +129,4 @@ android:hapticFeedbackEnabled="false" android:soundEffectsEnabled="false" /> - + diff --git a/java/res/layout/input_view.xml b/java/res/layout/input_view.xml index ae3c19db5..3d80533de 100644 --- a/java/res/layout/input_view.xml +++ b/java/res/layout/input_view.xml @@ -18,7 +18,7 @@ */ --> - - + diff --git a/java/res/layout/main_keyboard_frame.xml b/java/res/layout/main_keyboard_frame.xml index ebf746679..95b36639d 100644 --- a/java/res/layout/main_keyboard_frame.xml +++ b/java/res/layout/main_keyboard_frame.xml @@ -27,7 +27,7 @@ - - - - - - - diff --git a/java/res/layout/setup_steps_cards.xml b/java/res/layout/setup_steps_cards.xml index 9b03a3e93..06792fae3 100644 --- a/java/res/layout/setup_steps_cards.xml +++ b/java/res/layout/setup_steps_cards.xml @@ -38,7 +38,7 @@ style="@style/setupStepBulletStyle" android:text="@string/setup_step3_bullet" /> - - diff --git a/java/res/values-en-rAU/strings-appname.xml b/java/res/values-en-rAU/strings-appname.xml index f37c98141..810138b08 100644 --- a/java/res/values-en-rAU/strings-appname.xml +++ b/java/res/values-en-rAU/strings-appname.xml @@ -20,8 +20,8 @@ - "Android Keyboard (AOSP)" - "Android Spell Checker (AOSP)" - "Android Keyboard Settings (AOSP)" - "Android Spell Checker Settings (AOSP)" + "Kelar Keyboard" + "Kelar Spell Checker" + "Kelar Keyboard Settings" + "Kelar Spell Checker Settings" diff --git a/java/res/values-en-rCA/strings-appname.xml b/java/res/values-en-rCA/strings-appname.xml index f37c98141..810138b08 100644 --- a/java/res/values-en-rCA/strings-appname.xml +++ b/java/res/values-en-rCA/strings-appname.xml @@ -20,8 +20,8 @@ - "Android Keyboard (AOSP)" - "Android Spell Checker (AOSP)" - "Android Keyboard Settings (AOSP)" - "Android Spell Checker Settings (AOSP)" + "Kelar Keyboard" + "Kelar Spell Checker" + "Kelar Keyboard Settings" + "Kelar Spell Checker Settings" diff --git a/java/res/values-en-rGB/strings-appname.xml b/java/res/values-en-rGB/strings-appname.xml index f37c98141..810138b08 100644 --- a/java/res/values-en-rGB/strings-appname.xml +++ b/java/res/values-en-rGB/strings-appname.xml @@ -20,8 +20,8 @@ - "Android Keyboard (AOSP)" - "Android Spell Checker (AOSP)" - "Android Keyboard Settings (AOSP)" - "Android Spell Checker Settings (AOSP)" + "Kelar Keyboard" + "Kelar Spell Checker" + "Kelar Keyboard Settings" + "Kelar Spell Checker Settings" diff --git a/java/res/values-en-rIN/strings-appname.xml b/java/res/values-en-rIN/strings-appname.xml index f37c98141..810138b08 100644 --- a/java/res/values-en-rIN/strings-appname.xml +++ b/java/res/values-en-rIN/strings-appname.xml @@ -20,8 +20,8 @@ - "Android Keyboard (AOSP)" - "Android Spell Checker (AOSP)" - "Android Keyboard Settings (AOSP)" - "Android Spell Checker Settings (AOSP)" + "Kelar Keyboard" + "Kelar Spell Checker" + "Kelar Keyboard Settings" + "Kelar Spell Checker Settings" diff --git a/java/res/values-en-rXC/strings-appname.xml b/java/res/values-en-rXC/strings-appname.xml index b5412726e..9f311218d 100644 --- a/java/res/values-en-rXC/strings-appname.xml +++ b/java/res/values-en-rXC/strings-appname.xml @@ -20,8 +20,8 @@ - "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‎‏‏‏‎‎‎‏‎‏‎‏‏‎‏‎‏‏‏‏‏‎‏‎‏‏‏‏‏‏‎‏‎‏‎‏‏‏‎‎‏‏‏‏‎‏‏‎‎‏‎‏‎‎‎Android Keyboard (AOSP)‎‏‎‎‏‎" - "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‏‏‏‏‎‎‎‎‏‎‏‎‏‏‏‏‎‎‎‎‎‏‎‏‎‎‎‏‎‏‎‏‏‎‏‏‎‎‎‏‏‏‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎Android Spell Checker (AOSP)‎‏‎‎‏‎" - "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‎‏‏‎‏‎‎‏‏‎‎‏‎‎‎‎‏‏‎‏‏‎‎‏‏‎‏‏‎‏‏‏‏‎‎‏‏‎‏‏‎‏‎‏‏‎‎‎‎‏‎‏‎‎‎‎‎‎‎‏‎‏‏‎Android Keyboard Settings (AOSP)‎‏‎‎‏‎" - "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎‎‎‏‏‎‏‏‏‏‏‏‎‎‎‎‎‏‎‏‏‎‏‏‏‎‎‏‎‎‎‏‎‎‎‎‏‎‏‏‎‎‎‎‏‎‏‎‎‎Android Spell Checker Settings (AOSP)‎‏‎‎‏‎" + "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‎‏‏‏‎‎‎‏‎‏‎‏‏‎‏‎‏‏‏‏‏‎‏‎‏‏‏‏‏‏‎‏‎‏‎‏‏‏‎‎‏‏‏‏‎‏‏‎‎‏‎‏‎‎‎Kelar Keyboard‎‏‎‎‏‎" + "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‏‏‏‏‎‎‎‎‏‎‏‎‏‏‏‏‎‎‎‎‎‏‎‏‎‎‎‏‎‏‎‏‏‎‏‏‎‎‎‏‏‏‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎Kelar Spell Checker‎‏‎‎‏‎" + "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‎‏‏‎‏‎‎‏‏‎‎‏‎‎‎‎‏‏‎‏‏‎‎‏‏‎‏‏‎‏‏‏‏‎‎‏‏‎‏‏‎‏‎‏‏‎‎‎‎‏‎‏‎‎‎‎‎‎‎‏‎‏‏‎Kelar Keyboard Settings‎‏‎‎‏‎" + "‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎‎‎‏‏‎‏‏‏‏‏‏‎‎‎‎‎‏‎‏‏‎‏‏‏‎‎‏‎‎‎‏‎‎‎‎‏‎‏‏‎‎‎‎‏‎‏‎‎‎Kelar Spell Checker Settings‎‏‎‎‏‎" diff --git a/java/res/values-fa/strings-appname.xml b/java/res/values-fa/strings-appname.xml index 32bbaeda2..9d500476a 100644 --- a/java/res/values-fa/strings-appname.xml +++ b/java/res/values-fa/strings-appname.xml @@ -20,8 +20,8 @@ - "‏صفحه‌کلید Android ‏(AOSP)" - "‏غلط‌گیر Android ‏(AOSP)" - "‏تنظیمات صفحه‌کلید Android ‏(AOSP)" - "‏تنظیمات غلط‌گیر Android ‏(AOSP)" + "‏صفحه‌کلید کلار" + "‏غلط‌گیر کلار" + "‏تنظیمات صفحه‌کلید کلار" + "‏تنظیمات غلط‌گیر کلار" diff --git a/java/res/values-sw600dp/touch-position-correction.xml b/java/res/values-sw600dp/touch-position-correction.xml index 6aaa605a6..c50ec5bb7 100644 --- a/java/res/values-sw600dp/touch-position-correction.xml +++ b/java/res/values-sw600dp/touch-position-correction.xml @@ -18,7 +18,7 @@ */ --> - + {@link org.kelar.inputmethod.latin.suggestions.SuggestionStripLayoutHelper.AUTO_CORRECT_BOLD} etc. --> @@ -233,7 +233,7 @@ + {@link org.kelar.inputmethod.keyboard.KeyboardTheme#THEME_ID_ICS} etc. --> @@ -256,7 +256,7 @@ + {@link org.kelar.inputmethod.keyboard.internal.KeyboardIconsSet#NAMES_AND_ATTR_IDS} --> @@ -303,7 +303,7 @@ + {@link org.kelar.inputmethod.keyboard.Key#BACKGROUND_TYPE_NORMAL} etc. --> @@ -315,7 +315,7 @@ + {@link org.kelar.inputmethod.keyboard.Key#ACTION_FLAGS_IS_REPEATABLE} etc. --> @@ -330,7 +330,7 @@ + {@link org.kelar.inputmethod.keyboard.Key#LABEL_FLAGS_FONT_NORMAL} etc. --> @@ -376,7 +376,7 @@ If the value is fillRight, the actual key width will be determined to fill out the area up to the right edge of the keyboard. --> + {@link org.kelar.inputmethod.keyboard.internal.KeyboardRow#KEYWIDTH_FILL_RIGHT}. --> @@ -410,11 +410,11 @@ + {@link org.kelar.inputmethod.latin.utils.TypefaceUtils#KEY_LABEL_REFERENCE_CHAR}. --> + {@link org.kelar.inputmethod.latin.utils.TypefaceUtils#KEY_LABEL_REFERENCE_CHAR}. --> @@ -445,7 +445,7 @@ + {@link org.kelar.inputmethod.keyboard.KeyboardId#ELEMENT_ALPHABET} etc. --> @@ -476,7 +476,7 @@ + {@link org.kelar.inputmethod.keyboard.KeyboardTheme#THEME_ID_ICS} etc. --> @@ -484,7 +484,7 @@ + {@link org.kelar.inputmethod.keyboard.KeyboardId#MODE_TEXT} etc. --> @@ -512,7 +512,7 @@ + {@link org.kelar.inputmethod.latin.utils.InputTypeUtils#IME_ACTION_CUSTOM_LABEL}. --> @@ -530,7 +530,7 @@ + {@link org.kelar.inputmethod.keyboard.KeyboardId#ELEMENT_ALPHABET} etc. --> @@ -571,7 +571,7 @@ + {@link org.kelar.inputmethod.latin.utils.ScriptUtils#SCRIPT_ARABIC} etc. --> diff --git a/java/res/values/dictionary-pack.xml b/java/res/values/dictionary-pack.xml index 31834b52f..6b7274cce 100644 --- a/java/res/values/dictionary-pack.xml +++ b/java/res/values/dictionary-pack.xml @@ -18,10 +18,10 @@ */ --> - com.android.inputmethod.latin + org.kelar.inputmethod.latin - com.android.inputmethod.dictionarypack.DictionarySettingsActivity - com.android.inputmethod.dictionarypack.aosp + org.kelar.inputmethod.dictionarypack.DictionarySettingsActivity + org.kelar.inputmethod.dictionarypack.aosp metadata.json diff --git a/java/res/values/donottranslate-debug-settings.xml b/java/res/values/donottranslate-debug-settings.xml index 9df73ae4f..53d8bb3e5 100644 --- a/java/res/values/donottranslate-debug-settings.xml +++ b/java/res/values/donottranslate-debug-settings.xml @@ -18,8 +18,8 @@ */ --> - - Android Keyboard Debug settings + + Kelar Keyboard Debug settings Debug Mode Force non-distinct multitouch Show LXX suggestion UI diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml index 08d8bb260..3e6fe870a 100644 --- a/java/res/values/donottranslate.xml +++ b/java/res/values/donottranslate.xml @@ -19,7 +19,7 @@ --> + @see org.kelar.inputmethod.latin.settings.SettingsValues#needsToShowVoiceInputKey(android.content.SharedPreferences,android.content.res.Resources) --> 0 + {@link org.kelar.inputmethod.keyboard.KeyboardTheme#THEME_ID_ICS} etc. --> 3 4 diff --git a/java/res/values/phantom-sudden-move-event-device-list.xml b/java/res/values/phantom-sudden-move-event-device-list.xml index 4f91cd389..955824cd5 100644 --- a/java/res/values/phantom-sudden-move-event-device-list.xml +++ b/java/res/values/phantom-sudden-move-event-device-list.xml @@ -20,7 +20,7 @@ + See {@link org.kelar.inputmethod.keyboard.PointerTracker}. --> HARDWARE=stingray,true diff --git a/java/res/values/strings-appname.xml b/java/res/values/strings-appname.xml index 46d8c44ac..77b80d274 100644 --- a/java/res/values/strings-appname.xml +++ b/java/res/values/strings-appname.xml @@ -19,19 +19,19 @@ --> - - Android Keyboard (AOSP) + Kelar Keyboard - - Android Spell Checker (AOSP) + Kelar Spell Checker - - Android Keyboard Settings (AOSP) + Kelar Keyboard Settings - - Android Spell Checker Settings (AOSP) + Kelar Spell Checker Settings diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 6b985cec9..853dcb5c7 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -117,7 +117,7 @@ Personalized suggestions - "Improve %s" + "Improve %s" Double-space period @@ -394,7 +394,7 @@ mobile devices. [CHAR LIMIT=25] --> Default - "Welcome to %s" + "Welcome to %s" with Gesture Typing @@ -402,23 +402,23 @@ mobile devices. [CHAR LIMIT=25] --> Next step - "Setting up %s" + "Setting up %s" 1 - "Enable %s" + "Enable %s" - "Please check \"%s\" in your Languages & input settings. This will authorize it to run on your device." + "Please check \"%s\" in your Languages & input settings. This will authorize it to run on your device." - "%s is already enabled in your Languages & input settings, so this step is done. On to the next one!" + "%s is already enabled in your Languages & input settings, so this step is done. On to the next one!" Enable in Settings 2 - "Switch to %s" + "Switch to %s" - "Next, select \"%s\" as your active text-input method." + "Next, select \"%s\" as your active text-input method." Switch input methods @@ -426,7 +426,7 @@ mobile devices. [CHAR LIMIT=25] --> "Congratulations, you're all set!" - Now you can type in all your favorite apps with %s. + Now you can type in all your favorite apps with %s. Configure additional languages diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml index 2f768de71..7d49cb03c 100644 --- a/java/res/values/themes-common.xml +++ b/java/res/values/themes-common.xml @@ -105,9 +105,9 @@ - - - -