diff options
Diffstat (limited to 'java')
26 files changed, 543 insertions, 451 deletions
diff --git a/java/res/values-in/strings.xml b/java/res/values-in/strings.xml index 3b5cf9192..c5f0fc3b0 100644 --- a/java/res/values-in/strings.xml +++ b/java/res/values-in/strings.xml @@ -194,7 +194,7 @@ <string name="dictionary_provider_name" msgid="3027315045397363079">"Penyedia Kamus"</string> <string name="dictionary_service_name" msgid="6237472350693511448">"Layanan Kamus"</string> <string name="download_description" msgid="6014835283119198591">"Informasi pembaruan kamus"</string> - <string name="dictionary_settings_title" msgid="8091417676045693313">"Kamus add-on"</string> + <string name="dictionary_settings_title" msgid="8091417676045693313">"Kamus pengaya"</string> <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"Kamus yang tersedia"</string> <string name="dictionary_settings_summary" msgid="5305694987799824349">"Setelan untuk kamus"</string> <string name="user_dictionaries" msgid="3582332055892252845">"Kamus pengguna"</string> diff --git a/java/res/values-ja/strings.xml b/java/res/values-ja/strings.xml index 4567ec925..c4b185225 100644 --- a/java/res/values-ja/strings.xml +++ b/java/res/values-ja/strings.xml @@ -135,7 +135,7 @@ <string name="subtype_with_layout_en_GB" msgid="1931018968641592304">"英語(英国)(<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_en_US" msgid="8809311287529805422">"英語(米国)(<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_es_US" msgid="510930471167541338">"スペイン語(米国)(<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> - <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g>(繁体)"</string> + <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g>(伝統言語)"</string> <string name="subtype_no_language" msgid="7137390094240139495">"言語なし(アルファベット)"</string> <string name="subtype_no_language_qwerty" msgid="244337630616742604">"アルファベット(QWERTY)"</string> <string name="subtype_no_language_qwertz" msgid="443066912507547976">"アルファベット(QWERTZ)"</string> diff --git a/java/res/values-ms-rMY/strings.xml b/java/res/values-ms-rMY/strings.xml index 96735c0b4..294dd7f4f 100644 --- a/java/res/values-ms-rMY/strings.xml +++ b/java/res/values-ms-rMY/strings.xml @@ -135,8 +135,7 @@ <string name="subtype_with_layout_en_GB" msgid="1931018968641592304">"Bahasa Inggeris (UK) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_en_US" msgid="8809311287529805422">"Bahasa Inggeris (AS) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_es_US" msgid="510930471167541338">"Bahasa Sepanyol (AS) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> - <!-- no translation found for subtype_generic_traditional (8584594350973800586) --> - <skip /> + <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (Tradisional)"</string> <string name="subtype_no_language" msgid="7137390094240139495">"Tiada bahasa (Abjad)"</string> <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Abjad (QWERTY)"</string> <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Abjad (QWERTZ)"</string> diff --git a/java/res/values-nb/strings.xml b/java/res/values-nb/strings.xml index fe38a863f..02cc7deb6 100644 --- a/java/res/values-nb/strings.xml +++ b/java/res/values-nb/strings.xml @@ -135,7 +135,7 @@ <string name="subtype_with_layout_en_GB" msgid="1931018968641592304">"Engelsk (Storbritannia) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_en_US" msgid="8809311287529805422">"Engelsk (USA) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_es_US" msgid="510930471167541338">"Spansk (USA) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> - <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (tradisjonell)"</string> + <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (tradisjonelt)"</string> <string name="subtype_no_language" msgid="7137390094240139495">"Ingen språk (alfabet)"</string> <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Alfabet (QWERTY)"</string> <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Alfabet (QWERTZ)"</string> diff --git a/java/res/values-ne-rNP/strings.xml b/java/res/values-ne-rNP/strings.xml index 2bf1fb70d..055d16ccf 100644 --- a/java/res/values-ne-rNP/strings.xml +++ b/java/res/values-ne-rNP/strings.xml @@ -167,7 +167,7 @@ <string name="read_external_dictionary_multiple_files_title" msgid="7637749044265808628">"स्थापना गर्न कुनै शब्दकोश फाइल चयन गर्नुहोस्"</string> <string name="read_external_dictionary_confirm_install_message" msgid="4782116251651288054">"वास्तवमै <xliff:g id="LANGUAGE_NAME">%s</xliff:g> को लागि यो फाइल स्थापना गर्नुहुन्छ?"</string> <string name="error" msgid="8940763624668513648">"कुनै त्रुटि भयो"</string> - <string name="prefs_dump_contacts_dict" msgid="7227327764402323097">"सम्पर्क शब्दकोश डम्प गर्नुहोस्"</string> + <string name="prefs_dump_contacts_dict" msgid="7227327764402323097">"सम्पर्क शब्दकोश भेला गर्नुहोस्"</string> <string name="prefs_dump_user_dict" msgid="294870685041741951">"व्यक्तिगत शब्दकोश डम्प गर्नुहोस्"</string> <string name="prefs_dump_user_history_dict" msgid="6821075152449554628">"प्रयोगकर्ता इतिहास शब्दकोश डम्प गर"</string> <string name="prefs_dump_personalization_dict" msgid="7558387996151745284">"निजीकरण शब्दकोश डम्प गर्नुहोस्"</string> diff --git a/java/res/values-ro/strings.xml b/java/res/values-ro/strings.xml index 2d5fd1f18..96a774449 100644 --- a/java/res/values-ro/strings.xml +++ b/java/res/values-ro/strings.xml @@ -135,8 +135,7 @@ <string name="subtype_with_layout_en_GB" msgid="1931018968641592304">"Engleză (Regatul Unit) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_en_US" msgid="8809311287529805422">"Engleză (S.U.A.) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_es_US" msgid="510930471167541338">"Spaniolă (S.U.A.) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> - <!-- no translation found for subtype_generic_traditional (8584594350973800586) --> - <skip /> + <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (tradițională)"</string> <string name="subtype_no_language" msgid="7137390094240139495">"Nicio limbă (alfabet)"</string> <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Alfabet (QWERTY)"</string> <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Alfabet (QWERTZ)"</string> diff --git a/java/res/values-zu/strings.xml b/java/res/values-zu/strings.xml index e499bd902..1fd1e0363 100644 --- a/java/res/values-zu/strings.xml +++ b/java/res/values-zu/strings.xml @@ -135,7 +135,7 @@ <string name="subtype_with_layout_en_GB" msgid="1931018968641592304">"I-English (UK) ( <xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g> )"</string> <string name="subtype_with_layout_en_US" msgid="8809311287529805422">"I-English (US) ( <xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g> )"</string> <string name="subtype_with_layout_es_US" msgid="510930471167541338">"Isi-Spanish (US) ( <xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g> )"</string> - <string name="subtype_generic_traditional" msgid="8584594350973800586">"Isi-<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (Eyosiko)"</string> + <string name="subtype_generic_traditional" msgid="8584594350973800586">"Isi-<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (Tradition)"</string> <string name="subtype_no_language" msgid="7137390094240139495">"Alikho ulimi (Alfabhethi)"</string> <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Alfabhethi (QWERTY)"</string> <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Alfabhethi (QWERTZ)"</string> diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 937a79933..a4e2d2914 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -365,18 +365,12 @@ (Compact) can be an abbreviation to fit in the CHAR LIMIT. TODO: Remove translatable=false once we are settled down with the naming. --> <string name="subtype_generic_compact" translatable="false"><xliff:g id="LANGUAGE_NAME" example="Hindi">%s</xliff:g> (Compact)</string> - <!-- TODO: Uncomment once we can handle IETF language tag with script name specified. - Description for Serbian Cyrillic keyboard subtype [CHAR LIMIT=25] - (Cyrillic) can be an abbreviation to fit in the CHAR LIMIT. - <string name="subtype_serbian_cyrillic">Serbian (Cyrillic)</string> - Description for Serbian Latin keyboard subtype [CHAR LIMIT=25] - (Latin) can be an abbreviation to fit in the CHAR LIMIT. - <string name="subtype_serbian_latin">Serbian (Latin)</string> - Description for Serbian Latin keyboard subtype with explicit keyboard layout [CHAR LIMIT=25] - (Latin) can be an abbreviation to fit in the CHAR LIMIT. - This should be identical to subtype_serbian_latin aside from the trailing (%s). - <string name="subtype_with_layout_sr-Latn">Serbian (Latin) (<xliff:g id="KEYBOARD_LAYOUT" example="QWERTY">%s</xliff:g>)</string> - --> + <!-- Description for "LANGUAGE_NAME" (Cyrillic) keyboard subtype [CHAR LIMIT=25] + (Cyrillic) can be an abbreviation to fit in the CHAR LIMIT. --> + <string name="subtype_generic_cyrillic"><xliff:g id="LANGUAGE_NAME" example="Serbian">%s</xliff:g> (Cyrillic)</string> + <!-- Description for "LANGUAGE_NAME" (Latin) keyboard subtype [CHAR LIMIT=25] + (Latin) can be an abbreviation to fit in the CHAR LIMIT. --> + <string name="subtype_generic_latin"><xliff:g id="LANGUAGE_NAME" example="Serbian">%s</xliff:g> (Latin)</string> <!-- This string is displayed in a language list that allows to choose a language for suggestions in a software keyboard. This setting won't give suggestions in any particular language, hence "No language". diff --git a/java/res/xml-sw600dp/rows_myanmar.xml b/java/res/xml-sw600dp/rows_myanmar.xml index 778b330af..8eedf9d2f 100644 --- a/java/res/xml-sw600dp/rows_myanmar.xml +++ b/java/res/xml-sw600dp/rows_myanmar.xml @@ -24,7 +24,7 @@ <include latin:keyboardLayout="@xml/key_styles_common" /> <Row - latin:keyWidth="8.1818%p" + latin:keyWidth="9.0%p" > <include latin:keyboardLayout="@xml/rowkeys_myanmar1" /> @@ -33,40 +33,30 @@ latin:keyWidth="fillRight" /> </Row> <Row - latin:keyWidth="8.1818%p" + latin:keyWidth="9.0%p" > <include latin:keyboardLayout="@xml/rowkeys_myanmar2" /> </Row> <Row - latin:keyWidth="8.1818%p" + latin:keyWidth="9.0%p" > <include - latin:keyXPos="4.0909%p" latin:keyboardLayout="@xml/rowkeys_myanmar3" /> <Key latin:keyStyle="enterKeyStyle" latin:keyWidth="fillRight" /> </Row> <Row - latin:keyWidth="8.1818%p" + latin:keyWidth="9.0%p" > <Key latin:keyStyle="shiftKeyStyle" latin:keyWidth="10.0%p" /> <include latin:keyboardLayout="@xml/rowkeys_myanmar4" /> - <switch> - <case - latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" - > - <Spacer /> - </case> - <default> - <include - latin:keyboardLayout="@xml/keys_exclamation_question" /> - </default> - </switch> + <include + latin:keyboardLayout="@xml/keys_exclamation_question" /> </Row> <include latin:keyboardLayout="@xml/row_qwerty4" /> diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml index 6d8f78773..28eceb8db 100644 --- a/java/res/xml/method.xml +++ b/java/res/xml/method.xml @@ -57,6 +57,7 @@ in: Indonesian/qwerty # "id" is the official language code of Indonesian. is: Icelandic/qwerty it: Italian/qwerty + it_CH: Italian (Switzerland)/swiss iw: Hebrew/hebrew # "he" is the official language code of Hebrew. ka_GE: Georgian (Georgia)/georgian kk: Kazakh/east_slavic @@ -328,6 +329,8 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=hindi,EmojiCapable" android:isAsciiCapable="false" /> + <!-- TODO: This hindi_compact keyboard is a preliminary layout. + This isn't based on the final specification. --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic_compact" android:subtypeId="0xe49c89a1" @@ -385,6 +388,14 @@ android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable" android:isAsciiCapable="true" /> + <subtype android:icon="@drawable/ic_ime_switcher_dark" + android:label="@string/subtype_generic" + android:subtypeId="0xd914fe1a" + android:imeSubtypeLocale="it_CH" + android:imeSubtypeMode="keyboard" + android:imeSubtypeExtraValue="KeyboardLayoutSet=swiss,AsciiCapable,EmojiCapable" + android:isAsciiCapable="true" + /> <!-- Java uses the deprecated "iw" code instead of the standard "he" code for Hebrew. --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" @@ -466,8 +477,6 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=mongolian,EmojiCapable" android:isAsciiCapable="false" /> - <!-- TODO: This Myanmar keyboard is a preliminary layout. - This isn't based on the final specification. --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x84c87c61" @@ -476,6 +485,8 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable" android:isAsciiCapable="true" /> + <!-- TODO: This Myanmar keyboard is a preliminary layout. + This isn't based on the final specification. --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0xea266ea4" diff --git a/java/res/xml/rowkeys_greek1.xml b/java/res/xml/rowkeys_greek1.xml index c5033d029..6d767794c 100644 --- a/java/res/xml/rowkeys_greek1.xml +++ b/java/res/xml/rowkeys_greek1.xml @@ -69,7 +69,7 @@ latin:keySpec="ε" latin:keyHintLabel="3" latin:additionalMoreKeys="3" - latin:moreKeys="έ" /> + latin:moreKeys="έ,%" /> <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO --> <Key latin:keySpec="ρ" @@ -88,7 +88,7 @@ latin:keySpec="υ" latin:keyHintLabel="6" latin:additionalMoreKeys="6" - latin:moreKeys="ύ,ϋ,ΰ" /> + latin:moreKeys="ύ,%,ϋ,ΰ" /> <!-- U+03B8: "θ" GREEK SMALL LETTER THETA --> <Key latin:keySpec="θ" @@ -102,14 +102,14 @@ latin:keySpec="ι" latin:keyHintLabel="8" latin:additionalMoreKeys="8" - latin:moreKeys="ί,ϊ,ΐ" /> + latin:moreKeys="ί,%,ϊ,ΐ" /> <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS --> <Key latin:keySpec="ο" latin:keyHintLabel="9" latin:additionalMoreKeys="9" - latin:moreKeys="ό" /> + latin:moreKeys="ό,%" /> <!-- U+03C0: "π" GREEK SMALL LETTER PI --> <Key latin:keySpec="π" diff --git a/java/res/xml/rowkeys_myanmar1.xml b/java/res/xml/rowkeys_myanmar1.xml index 6460af565..b7c820922 100644 --- a/java/res/xml/rowkeys_myanmar1.xml +++ b/java/res/xml/rowkeys_myanmar1.xml @@ -25,50 +25,49 @@ <case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" > - <!-- U+100E: "ဎ" MYANMAR LETTER DDHA --> + <!-- U+1027: "ဧ" MYANMAR LETTER E --> <Key - latin:keySpec="ဎ" + latin:keySpec="ဧ" latin:keyLabelFlags="fontNormal" /> - <!-- U+100D: "ဍ" MYANMAR LETTER DDA --> + <!-- U+104F: "၏" MYANMAR SYMBOL GENITIVE --> <Key - latin:keySpec="ဍ" + latin:keySpec="၏" latin:keyLabelFlags="fontNormal" /> - <!-- U+1052: "ၒ" MYANMAR LETTER VOCALIC R --> + <!-- U+1024: "ဤ" MYANMAR LETTER II --> <Key - latin:keySpec="ၒ" + latin:keySpec="ဤ" latin:keyLabelFlags="fontNormal" /> - <!-- U+100B: "ဋ" MYANMAR LETTER TTA --> + <!-- U+1023: "ဣ" MYANMAR LETTER I --> <Key - latin:keySpec="ဋ" + latin:keySpec="ဣ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1053: "ၓ" MYANMAR LETTER VOCALIC RR --> + <!-- U+104E: "၎" MYANMAR SYMBOL AFOREMENTIONED --> <Key - latin:keySpec="ၓ" + latin:keySpec="၎" latin:keyLabelFlags="fontNormal" /> - <!-- U+1054: "ၔ" MYANMAR LETTER VOCALIC L --> + <!-- U+1000/U+103B/U+1015/U+103A: "ကျပ်" + MYANMAR LETTER KA/MYANMAR CONSONANT SIGN MEDIAL YA/MYANMAR LETTER PA/MYANMAR SIGN ASAT --> <Key - latin:keySpec="ၔ" - latin:keyLabelFlags="fontNormal" /> - <!-- U+1055: "ၕ" MYANMAR LETTER VOCALIC LL --> - <Key - latin:keySpec="ၕ" - latin:keyLabelFlags="fontNormal" /> - <!-- U+101B: "ရ" MYANMAR LETTER RA --> + latin:keySpec="ကျပ်" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio|autoScale" /> + <!-- U+1029: "ဩ" MYANMAR LETTER O --> <Key - latin:keySpec="ရ" - latin:keyLabelFlags="fontNormal" /> + latin:keySpec="ဩ" + latin:keyLabelFlags="fontNormal|autoScale" /> + <!-- U+102A: "ဪ" MYANMAR LETTER AU --> <Key - latin:keySpec="*" /> + latin:keySpec="ဪ" + latin:keyLabelFlags="fontNormal|autoScale" /> + <!-- U+104D: "၍" MYANMAR SYMBOL COMPLETED --> <Key - latin:keySpec="(" /> + latin:keySpec="၍" + latin:keyLabelFlags="fontNormal" /> + <!-- U+104C: "၌" MYANMAR SYMBOL LOCATIVE --> <Key - latin:keySpec=")" /> + latin:keySpec="၌" + latin:keyLabelFlags="fontNormal" /> </case> <default> - <!-- U+1050: "ၐ" MYANMAR LETTER SHA --> - <Key - latin:keySpec="ၐ" - latin:keyLabelFlags="fontNormal" /> <!-- U+1041: "၁" MYANMAR DIGIT ONE --> <Key latin:keySpec="၁" diff --git a/java/res/xml/rowkeys_myanmar2.xml b/java/res/xml/rowkeys_myanmar2.xml index 558c38d4d..5f0115f39 100644 --- a/java/res/xml/rowkeys_myanmar2.xml +++ b/java/res/xml/rowkeys_myanmar2.xml @@ -25,49 +25,45 @@ <case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" > - <!-- U+1008: "ဈ" MYANMAR LETTER JHA --> + <!-- U+1017: "ဗ" MYANMAR LETTER BA --> <Key - latin:keySpec="ဈ" + latin:keySpec="ဗ" latin:keyLabelFlags="fontNormal" /> - <!-- U+101D: "ဝ" MYANMAR LETTER WA --> + <!-- U+1012: "ဒ" MYANMAR LETTER DA --> <Key - latin:keySpec="ဝ" + latin:keySpec="ဒ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1023: "ဣ" MYANMAR LETTER I --> + <!-- U+1013: "ဓ" MYANMAR LETTER DHA --> <Key - latin:keySpec="ဣ" + latin:keySpec="ဓ" latin:keyLabelFlags="fontNormal" /> - <!-- U+104E: "၎" MYANMAR SYMBOL AFOREMENTIONED --> + <!-- U+1003: "ဃ" MYANMAR LETTER GHA --> <Key - latin:keySpec="၎" + latin:keySpec="ဃ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1024: "ဤ" MYANMAR LETTER II --> + <!-- U+100E: "ဎ" MYANMAR LETTER DDHA --> <Key - latin:keySpec="ဤ" + latin:keySpec="ဎ" latin:keyLabelFlags="fontNormal" /> - <!-- U+104C: "၌" MYANMAR SYMBOL LOCATIVE --> + <!-- U+103F: "ဿ" MYANMAR LETTER GREAT SA --> <Key - latin:keySpec="၌" + latin:keySpec="ဿ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1025: "ဥ" MYANMAR LETTER U --> + <!-- U+100F: "ဏ" MYANMAR LETTER NNA --> <Key - latin:keySpec="ဥ" + latin:keySpec="ဏ" latin:keyLabelFlags="fontNormal" /> - <!-- U+104D: "၍" MYANMAR SYMBOL COMPLETED --> + <!-- U+1008: "ဈ" MYANMAR LETTER JHA --> <Key - latin:keySpec="၍" + latin:keySpec="ဈ" latin:keyLabelFlags="fontNormal" /> - <!-- U+103F: "ဿ" MYANMAR LETTER GREAT SA --> - <Key - latin:keySpec="ဿ" - latin:keyLabelFlags="fontNormal|autoXScale" /> - <!-- U+100F: "ဏ" MYANMAR LETTER NNA --> + <!-- U+1007: "ဇ" MYANMAR LETTER JA --> <Key - latin:keySpec="ဏ" + latin:keySpec="ဇ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1027: "ဧ" MYANMAR LETTER E --> + <!-- U+1002: "ဂ" MYANMAR LETTER GA --> <Key - latin:keySpec="ဧ" + latin:keySpec="ဂ" latin:keyLabelFlags="fontNormal" /> </case> <default> @@ -111,10 +107,6 @@ <Key latin:keySpec="စ" latin:keyLabelFlags="fontNormal" /> - <!-- U+101F: "ဟ" MYANMAR LETTER HA --> - <Key - latin:keySpec="ဟ" - latin:keyLabelFlags="fontNormal" /> </default> </switch> </merge> diff --git a/java/res/xml/rowkeys_myanmar3.xml b/java/res/xml/rowkeys_myanmar3.xml index 2d0d48cc7..612bcd31b 100644 --- a/java/res/xml/rowkeys_myanmar3.xml +++ b/java/res/xml/rowkeys_myanmar3.xml @@ -25,10 +25,18 @@ <case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" > - <!-- U+1017: "ဗ" MYANMAR LETTER BA --> + <!-- U+101A: "ယ" MYANMAR LETTER YA --> <Key - latin:keySpec="ဗ" + latin:keySpec="ယ" latin:keyLabelFlags="fontNormal" /> + <!-- U+1039: "္" MYANMAR SIGN VIRAMA --> + <Key + latin:keySpec="္" + latin:keyLabelFlags="fontNormal" /> + <!-- U+1004/U+103A/U+1039: "င်္င" MYANMAR LETTER NGA/MYANMAR SIGN ASAT/MYANMAR SIGN VIRAMA --> + <Key + latin:keySpec="င်္" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> <!-- U+103E: "ှ" MYANMAR CONSONANT SIGN MEDIAL HA --> <Key latin:keySpec="ှ" @@ -37,33 +45,25 @@ <Key latin:keySpec="ီ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1039: "္" MYANMAR SIGN VIRAMA --> - <Key - latin:keySpec="္" - latin:keyLabelFlags="fontNormal" /> - <!-- U+103D: "ွ" MYANMAR CONSONANT SIGN MEDIAL WA --> + <!-- U+1030: "ူ" MYANMAR VOWEL SIGN UU --> <Key - latin:keySpec="ွ" + latin:keySpec="ူ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1036: "ံ" MYANMAR SIGN ANUSVARA --> + <!-- U+102B: "ါ" MYANMAR VOWEL SIGN TALL AA --> <Key - latin:keySpec="ံ" + latin:keySpec="ါ" latin:keyLabelFlags="fontNormal" /> <!-- U+1032: "ဲ" MYANMAR VOWEL SIGN AI --> <Key latin:keySpec="ဲ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1012: "ဒ" MYANMAR LETTER DA --> - <Key - latin:keySpec="ဒ" - latin:keyLabelFlags="fontNormal" /> - <!-- U+1013: "ဓ" MYANMAR LETTER DHA --> + <!-- U+1036: "ံ" MYANMAR SIGN ANUSVARA --> <Key - latin:keySpec="ဓ" + latin:keySpec="ံ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1002: "ဂ" MYANMAR LETTER GA --> + <!-- U+101F: "ဟ" MYANMAR LETTER HA --> <Key - latin:keySpec="ဂ" + latin:keySpec="ဟ" latin:keyLabelFlags="fontNormal" /> </case> <default> @@ -75,33 +75,44 @@ <Key latin:keySpec="ျ" latin:keyLabelFlags="fontNormal" /> - <!-- U+102D: "ိ" MYANMAR VOWEL SIGN I --> + <!-- U+103C: "ြ" MYANMAR CONSONANT SIGN MEDIAL RA --> <Key - latin:keySpec="ိ" + latin:keySpec="ြ" latin:keyLabelFlags="fontNormal" /> - <!-- U+103A: "်" MYANMAR SIGN ASAT --> + <!-- U+103D: "ွ" MYANMAR CONSONANT SIGN MEDIAL WA + U+103E: "ှ" MYANMAR CONSONANT SIGN MEDIAL HA + U+103D/U+103E: "ွှ" MYANMAR CONSONANT SIGN MEDIAL WA/MYANMAR CONSONANT SIGN MEDIAL HA --> <Key - latin:keySpec="်" + latin:keySpec="ွ" + latin:moreKeys="ှ,ွှ" latin:keyLabelFlags="fontNormal" /> - <!-- U+102B: "ါ" MYANMAR VOWEL SIGN TALL AA --> + <!-- U+102D: "ိ" MYANMAR VOWEL SIGN I + U+102E: "ီ" MYANMAR VOWEL SIGN II --> <Key - latin:keySpec="ါ" + latin:keySpec="ိ" + latin:moreKeys="ီ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1037: "့" MYANMAR SIGN DOT BELOW --> + <!-- U+102F: "ု" MYANMAR VOWEL SIGN U + U+1030: "ူ" MYANMAR VOWEL SIGN UU --> <Key - latin:keySpec="့" + latin:keySpec="ု" + latin:moreKeys="ူ" latin:keyLabelFlags="fontNormal" /> - <!-- U+103C: "ြ" MYANMAR CONSONANT SIGN MEDIAL RA --> + <!-- U+102C: "ာ" MYANMAR VOWEL SIGN AA --> <Key - latin:keySpec="ြ" + latin:keySpec="ာ" latin:keyLabelFlags="fontNormal" /> - <!-- U+102F: "ု" MYANMAR VOWEL SIGN U --> + <!-- U+103A: "်" MYANMAR SIGN ASAT + U+1032: "ဲ" MYANMAR VOWEL SIGN AI --> <Key - latin:keySpec="ု" + latin:keySpec="်" + latin:moreKeys="ဲ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1030: "ူ" MYANMAR VOWEL SIGN UU --> + <!-- U+1037: "့" MYANMAR SIGN DOT BELOW + U+1036: "ံ" MYANMAR SIGN ANUSVARA --> <Key - latin:keySpec="ူ" + latin:keySpec="့" + latin:moreKeys="ံ" latin:keyLabelFlags="fontNormal" /> <!-- U+1038: "း" MYANMAR SIGN VISARGA --> <Key diff --git a/java/res/xml/rowkeys_myanmar4.xml b/java/res/xml/rowkeys_myanmar4.xml index cfd11123c..57466c565 100644 --- a/java/res/xml/rowkeys_myanmar4.xml +++ b/java/res/xml/rowkeys_myanmar4.xml @@ -25,42 +25,40 @@ <case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" > - <!-- U+1007: "ဇ" MYANMAR LETTER JA --> + <!-- U+1025: "ဥ" MYANMAR LETTER U --> <Key - latin:keySpec="ဇ" + latin:keySpec="ဥ" latin:keyLabelFlags="fontNormal" /> - <!-- U+100C: "ဌ" MYANMAR LETTER TTHA --> - <Key - latin:keySpec="ဌ" - latin:keyLabelFlags="fontNormal" /> - <!-- U+1003: "ဃ" MYANMAR LETTER GHA --> + <!-- U+1026: "ဦ" MYANMAR LETTER UU --> <Key - latin:keySpec="ဃ" + latin:keySpec="ဦ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1020: "ဠ" MYANMAR LETTER LLA --> + <!-- U+100C: "ဌ" MYANMAR LETTER TTHA --> <Key - latin:keySpec="ဠ" + latin:keySpec="ဌ" latin:keyLabelFlags="fontNormal" /> - <!-- U+101A: "ယ" MYANMAR LETTER YA --> + <!-- U+100B: "ဋ" MYANMAR LETTER TTA --> <Key - latin:keySpec="ယ" + latin:keySpec="ဋ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1009: "ဉ" MYANMAR LETTER NYA --> + <!-- U+100D: "ဍ" MYANMAR LETTER DDA --> <Key - latin:keySpec="ဉ" + latin:keySpec="ဍ" latin:keyLabelFlags="fontNormal" /> - <!-- U+1026: "ဦ" MYANMAR LETTER UU --> + <!-- U+1020: "ဠ" MYANMAR LETTER LLA --> <Key - latin:keySpec="ဦ" + latin:keySpec="ဠ" latin:keyLabelFlags="fontNormal" /> - <!-- U+102A: "ဪ" MYANMAR LETTER AU --> + <!-- U+100B/U+1039/U+100C: "ဋ္ဌ" MYANMAR LETTER TTA/MYANMAR SIGN VIRAMA/MYANMAR LETTER TTHA --> <Key - latin:keySpec="ဪ" - latin:keyLabelFlags="fontNormal|autoXScale" /> - <!-- U+1051: "ၑ" MYANMAR LETTER SSA --> + latin:keySpec="ဋ္ဌ" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+100F/U+1039/U+100D: "ဏ္ဍ" MYANMAR LETTER NNA/MYANMAR SIGN VIRAMA/MYANMAR LETTER DDA + U+100F/U+1039/U+100C: "ဏ္ဌ" MYANMAR LETTER NNA/MYANMAR SIGN VIRAMA/MYANMAR LETTER TTHA --> <Key - latin:keySpec="ၑ" - latin:keyLabelFlags="fontNormal" /> + latin:keySpec="ဏ္ဍ" + latin:moreKeys="ဏ္ဌ" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> </case> <default> <!-- U+1016: "ဖ" MYANMAR LETTER PHA --> @@ -83,21 +81,19 @@ <Key latin:keySpec="ဘ" latin:keyLabelFlags="fontNormal" /> - <!-- U+100A: "ည" MYANMAR LETTER NNYA --> + <!-- U+100A: "ည" MYANMAR LETTER NNYA + U+1009: "ဉ" MYANMAR LETTER NYA --> <Key latin:keySpec="ည" + latin:moreKeys="ဉ" latin:keyLabelFlags="fontNormal" /> - <!-- U+102C: "ာ" MYANMAR VOWEL SIGN AA --> - <Key - latin:keySpec="ာ" - latin:keyLabelFlags="fontNormal" /> - <!-- U+1029: "ဩ" MYANMAR LETTER O --> + <!-- U+101B: "ရ" MYANMAR LETTER RA --> <Key - latin:keySpec="ဩ" + latin:keySpec="ရ" latin:keyLabelFlags="fontNormal" /> - <!-- U+104F: "၏" MYANMAR SYMBOL GENITIVE --> + <!-- U+101D: "ဝ" MYANMAR LETTER WA --> <Key - latin:keySpec="၏" + latin:keySpec="ဝ" latin:keyLabelFlags="fontNormal" /> </default> </switch> diff --git a/java/res/xml/rows_myanmar.xml b/java/res/xml/rows_myanmar.xml index 32c923dec..5de47f7b8 100644 --- a/java/res/xml/rows_myanmar.xml +++ b/java/res/xml/rows_myanmar.xml @@ -24,26 +24,25 @@ <include latin:keyboardLayout="@xml/key_styles_common" /> <Row - latin:keyWidth="9.0909%p" + latin:keyWidth="10.0%p" > <include latin:keyboardLayout="@xml/rowkeys_myanmar1" /> </Row> <Row - latin:keyWidth="9.0909%p" + latin:keyWidth="10.0%p" > <include latin:keyboardLayout="@xml/rowkeys_myanmar2" /> </Row> <Row - latin:keyWidth="9.0909%p" + latin:keyWidth="10.0%p" > <include - latin:keyXPos="4.5454%p" latin:keyboardLayout="@xml/rowkeys_myanmar3" /> </Row> <Row - latin:keyWidth="9.0909%p" + latin:keyWidth="10.0%p" > <Key latin:keyStyle="shiftKeyStyle" /> diff --git a/java/src/com/android/inputmethod/compat/LooperCompatUtils.java b/java/src/com/android/inputmethod/compat/LooperCompatUtils.java new file mode 100644 index 000000000..d647dbbd3 --- /dev/null +++ b/java/src/com/android/inputmethod/compat/LooperCompatUtils.java @@ -0,0 +1,42 @@ +/* + * 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.compat; + +import android.os.Looper; + +import java.lang.reflect.Method; + +/** + * Helper to call Looper#quitSafely, which was introduced in API + * level 18 (Build.VERSION_CODES.JELLY_BEAN_MR2). + * + * In unit tests, we create lots of instances of LatinIME, which means we need to clean up + * some Loopers lest we leak file descriptors. In normal use on a device though, this is never + * necessary (although it does not hurt). + */ +public final class LooperCompatUtils { + private static final Method METHOD_quitSafely = CompatUtils.getMethod( + Looper.class, "quitSafely"); + + public static void quitSafely(final Looper looper) { + if (null != METHOD_quitSafely) { + CompatUtils.invoke(looper, null /* default return value */, METHOD_quitSafely); + } else { + looper.quit(); + } + } +} diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 2e4a0902d..949f03794 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -297,12 +297,19 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } // Implements {@link KeyboardState.SwitchActions}. + // TODO[IL]: merge the two following methods; remove the one without args. @Override public void requestUpdatingShiftState() { mState.onUpdateShiftState(mLatinIME.getCurrentAutoCapsState(), mLatinIME.getCurrentRecapitalizeState()); } + // Future method for requesting an updating to the shift state. + public void requestUpdatingShiftState(final int currentAutoCapsState, + final int currentRecapitalizeState) { + mState.onUpdateShiftState(currentAutoCapsState, currentRecapitalizeState); + } + // Implements {@link KeyboardState.SwitchActions}. @Override public void startDoubleTapShiftKeyTimer() { diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java index f0356df79..14fa76744 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -120,98 +120,98 @@ public final class KeyboardTextsTable { /* 30: 5 */ "keyspec_east_slavic_row3_5", /* 31: 5 */ "morekeys_cyrillic_soft_sign", /* 32: 4 */ "morekeys_nordic_row2_11", - /* 33: 4 */ "keyspec_symbols_1", - /* 34: 4 */ "keyspec_symbols_2", - /* 35: 4 */ "keyspec_symbols_3", - /* 36: 4 */ "keyspec_symbols_4", - /* 37: 4 */ "keyspec_symbols_5", - /* 38: 4 */ "keyspec_symbols_6", - /* 39: 4 */ "keyspec_symbols_7", - /* 40: 4 */ "keyspec_symbols_8", - /* 41: 4 */ "keyspec_symbols_9", - /* 42: 4 */ "keyspec_symbols_0", - /* 43: 4 */ "keylabel_to_symbol", - /* 44: 4 */ "additional_morekeys_symbols_1", - /* 45: 4 */ "additional_morekeys_symbols_2", - /* 46: 4 */ "additional_morekeys_symbols_3", - /* 47: 4 */ "additional_morekeys_symbols_4", - /* 48: 4 */ "additional_morekeys_symbols_5", - /* 49: 4 */ "additional_morekeys_symbols_6", - /* 50: 4 */ "additional_morekeys_symbols_7", - /* 51: 4 */ "additional_morekeys_symbols_8", - /* 52: 4 */ "additional_morekeys_symbols_9", - /* 53: 4 */ "additional_morekeys_symbols_0", - /* 54: 3 */ "morekeys_punctuation", - /* 55: 3 */ "morekeys_star", - /* 56: 3 */ "keyspec_left_parenthesis", - /* 57: 3 */ "keyspec_right_parenthesis", - /* 58: 3 */ "keyspec_left_square_bracket", - /* 59: 3 */ "keyspec_right_square_bracket", - /* 60: 3 */ "keyspec_left_curly_bracket", - /* 61: 3 */ "keyspec_right_curly_bracket", - /* 62: 3 */ "keyspec_less_than", - /* 63: 3 */ "keyspec_greater_than", - /* 64: 3 */ "keyspec_less_than_equal", - /* 65: 3 */ "keyspec_greater_than_equal", - /* 66: 3 */ "keyspec_left_double_angle_quote", - /* 67: 3 */ "keyspec_right_double_angle_quote", - /* 68: 3 */ "keyspec_left_single_angle_quote", - /* 69: 3 */ "keyspec_right_single_angle_quote", - /* 70: 3 */ "keyspec_tablet_comma", - /* 71: 3 */ "morekeys_tablet_period", - /* 72: 3 */ "morekeys_question", - /* 73: 2 */ "morekeys_h", - /* 74: 2 */ "morekeys_w", - /* 75: 2 */ "morekeys_east_slavic_row2_2", - /* 76: 2 */ "morekeys_cyrillic_u", - /* 77: 2 */ "morekeys_cyrillic_en", - /* 78: 2 */ "morekeys_cyrillic_ghe", - /* 79: 2 */ "morekeys_cyrillic_o", - /* 80: 2 */ "morekeys_cyrillic_i", - /* 81: 2 */ "keyspec_south_slavic_row1_6", - /* 82: 2 */ "keyspec_south_slavic_row2_11", - /* 83: 2 */ "keyspec_south_slavic_row3_1", - /* 84: 2 */ "keyspec_south_slavic_row3_8", - /* 85: 2 */ "keyspec_swiss_row1_11", - /* 86: 2 */ "keyspec_swiss_row2_10", - /* 87: 2 */ "keyspec_swiss_row2_11", - /* 88: 2 */ "morekeys_swiss_row1_11", - /* 89: 2 */ "morekeys_swiss_row2_10", - /* 90: 2 */ "morekeys_swiss_row2_11", - /* 91: 2 */ "keyspec_spanish_row2_10", - /* 92: 2 */ "morekeys_bullet", - /* 93: 2 */ "morekeys_left_parenthesis", - /* 94: 2 */ "morekeys_right_parenthesis", - /* 95: 2 */ "morekeys_arabic_diacritics", - /* 96: 2 */ "keyspec_comma", - /* 97: 2 */ "keyhintlabel_tablet_comma", - /* 98: 2 */ "morekeys_tablet_comma", - /* 99: 2 */ "keyhintlabel_period", - /* 100: 2 */ "morekeys_period", - /* 101: 2 */ "keyhintlabel_tablet_period", - /* 102: 2 */ "keyspec_symbols_question", - /* 103: 2 */ "keyspec_symbols_semicolon", - /* 104: 2 */ "keyspec_symbols_percent", - /* 105: 2 */ "morekeys_symbols_semicolon", - /* 106: 2 */ "morekeys_symbols_percent", - /* 107: 1 */ "morekeys_v", - /* 108: 1 */ "morekeys_j", - /* 109: 1 */ "morekeys_q", - /* 110: 1 */ "morekeys_x", - /* 111: 1 */ "keyspec_q", - /* 112: 1 */ "keyspec_w", - /* 113: 1 */ "keyspec_y", - /* 114: 1 */ "keyspec_x", - /* 115: 1 */ "morekeys_east_slavic_row2_11", - /* 116: 1 */ "morekeys_cyrillic_ka", - /* 117: 1 */ "morekeys_cyrillic_a", - /* 118: 1 */ "morekeys_currency_dollar", - /* 119: 1 */ "morekeys_tablet_punctuation", - /* 120: 1 */ "morekeys_plus", - /* 121: 1 */ "morekeys_less_than", - /* 122: 1 */ "morekeys_greater_than", - /* 123: 1 */ "keyspec_period", - /* 124: 1 */ "keyspec_tablet_period", + /* 33: 4 */ "morekeys_punctuation", + /* 34: 4 */ "keyspec_symbols_1", + /* 35: 4 */ "keyspec_symbols_2", + /* 36: 4 */ "keyspec_symbols_3", + /* 37: 4 */ "keyspec_symbols_4", + /* 38: 4 */ "keyspec_symbols_5", + /* 39: 4 */ "keyspec_symbols_6", + /* 40: 4 */ "keyspec_symbols_7", + /* 41: 4 */ "keyspec_symbols_8", + /* 42: 4 */ "keyspec_symbols_9", + /* 43: 4 */ "keyspec_symbols_0", + /* 44: 4 */ "keylabel_to_symbol", + /* 45: 4 */ "additional_morekeys_symbols_1", + /* 46: 4 */ "additional_morekeys_symbols_2", + /* 47: 4 */ "additional_morekeys_symbols_3", + /* 48: 4 */ "additional_morekeys_symbols_4", + /* 49: 4 */ "additional_morekeys_symbols_5", + /* 50: 4 */ "additional_morekeys_symbols_6", + /* 51: 4 */ "additional_morekeys_symbols_7", + /* 52: 4 */ "additional_morekeys_symbols_8", + /* 53: 4 */ "additional_morekeys_symbols_9", + /* 54: 4 */ "additional_morekeys_symbols_0", + /* 55: 4 */ "keyspec_tablet_comma", + /* 56: 3 */ "keyspec_swiss_row1_11", + /* 57: 3 */ "keyspec_swiss_row2_10", + /* 58: 3 */ "keyspec_swiss_row2_11", + /* 59: 3 */ "morekeys_swiss_row1_11", + /* 60: 3 */ "morekeys_swiss_row2_10", + /* 61: 3 */ "morekeys_swiss_row2_11", + /* 62: 3 */ "morekeys_star", + /* 63: 3 */ "keyspec_left_parenthesis", + /* 64: 3 */ "keyspec_right_parenthesis", + /* 65: 3 */ "keyspec_left_square_bracket", + /* 66: 3 */ "keyspec_right_square_bracket", + /* 67: 3 */ "keyspec_left_curly_bracket", + /* 68: 3 */ "keyspec_right_curly_bracket", + /* 69: 3 */ "keyspec_less_than", + /* 70: 3 */ "keyspec_greater_than", + /* 71: 3 */ "keyspec_less_than_equal", + /* 72: 3 */ "keyspec_greater_than_equal", + /* 73: 3 */ "keyspec_left_double_angle_quote", + /* 74: 3 */ "keyspec_right_double_angle_quote", + /* 75: 3 */ "keyspec_left_single_angle_quote", + /* 76: 3 */ "keyspec_right_single_angle_quote", + /* 77: 3 */ "morekeys_tablet_comma", + /* 78: 3 */ "keyhintlabel_period", + /* 79: 3 */ "morekeys_tablet_period", + /* 80: 3 */ "morekeys_question", + /* 81: 2 */ "morekeys_h", + /* 82: 2 */ "morekeys_w", + /* 83: 2 */ "morekeys_east_slavic_row2_2", + /* 84: 2 */ "morekeys_cyrillic_u", + /* 85: 2 */ "morekeys_cyrillic_en", + /* 86: 2 */ "morekeys_cyrillic_ghe", + /* 87: 2 */ "morekeys_cyrillic_o", + /* 88: 2 */ "morekeys_cyrillic_i", + /* 89: 2 */ "keyspec_south_slavic_row1_6", + /* 90: 2 */ "keyspec_south_slavic_row2_11", + /* 91: 2 */ "keyspec_south_slavic_row3_1", + /* 92: 2 */ "keyspec_south_slavic_row3_8", + /* 93: 2 */ "morekeys_tablet_punctuation", + /* 94: 2 */ "keyspec_spanish_row2_10", + /* 95: 2 */ "morekeys_bullet", + /* 96: 2 */ "morekeys_left_parenthesis", + /* 97: 2 */ "morekeys_right_parenthesis", + /* 98: 2 */ "morekeys_arabic_diacritics", + /* 99: 2 */ "keyspec_comma", + /* 100: 2 */ "keyhintlabel_tablet_comma", + /* 101: 2 */ "keyspec_period", + /* 102: 2 */ "morekeys_period", + /* 103: 2 */ "keyspec_tablet_period", + /* 104: 2 */ "keyhintlabel_tablet_period", + /* 105: 2 */ "keyspec_symbols_question", + /* 106: 2 */ "keyspec_symbols_semicolon", + /* 107: 2 */ "keyspec_symbols_percent", + /* 108: 2 */ "morekeys_symbols_semicolon", + /* 109: 2 */ "morekeys_symbols_percent", + /* 110: 1 */ "morekeys_v", + /* 111: 1 */ "morekeys_j", + /* 112: 1 */ "morekeys_q", + /* 113: 1 */ "morekeys_x", + /* 114: 1 */ "keyspec_q", + /* 115: 1 */ "keyspec_w", + /* 116: 1 */ "keyspec_y", + /* 117: 1 */ "keyspec_x", + /* 118: 1 */ "morekeys_east_slavic_row2_11", + /* 119: 1 */ "morekeys_cyrillic_ka", + /* 120: 1 */ "morekeys_cyrillic_a", + /* 121: 1 */ "morekeys_currency_dollar", + /* 122: 1 */ "morekeys_plus", + /* 123: 1 */ "morekeys_less_than", + /* 124: 1 */ "morekeys_greater_than", /* 125: 1 */ "morekeys_exclamation", /* 126: 0 */ "morekeys_currency", /* 127: 0 */ "morekeys_symbols_1", @@ -278,6 +278,7 @@ public final class KeyboardTextsTable { /* morekeys_r ~ */ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, /* ~ morekeys_nordic_row2_11 */ + /* morekeys_punctuation */ "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&", /* keyspec_symbols_1 */ "1", /* keyspec_symbols_2 */ "2", /* keyspec_symbols_3 */ "3", @@ -293,7 +294,10 @@ public final class KeyboardTextsTable { /* additional_morekeys_symbols_1 ~ */ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, /* ~ additional_morekeys_symbols_0 */ - /* morekeys_punctuation */ "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&", + /* keyspec_tablet_comma */ ",", + /* keyspec_swiss_row1_11 ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ morekeys_swiss_row2_11 */ // U+2020: "†" DAGGER // U+2021: "‡" DOUBLE DAGGER // U+2605: "★" BLACK STAR @@ -320,14 +324,15 @@ public final class KeyboardTextsTable { /* keyspec_right_double_angle_quote */ "\u00BB", /* keyspec_left_single_angle_quote */ "\u2039", /* keyspec_right_single_angle_quote */ "\u203A", - /* keyspec_tablet_comma */ ",", + /* morekeys_tablet_comma */ EMPTY, + /* keyhintlabel_period */ EMPTY, /* morekeys_tablet_period */ "!text/morekeys_tablet_punctuation", // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "\u00BF", /* morekeys_h ~ */ - EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, - EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, - /* ~ morekeys_swiss_row2_11 */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ keyspec_south_slavic_row3_8 */ + /* morekeys_tablet_punctuation */ "!autoColumnOrder!7,\\,,',#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,@,:,-,\",+,\\%,&", // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE /* keyspec_spanish_row2_10 */ "\u00F1", // U+266A: "♪" EIGHTH NOTE @@ -341,10 +346,11 @@ public final class KeyboardTextsTable { /* morekeys_arabic_diacritics */ EMPTY, // Comma key /* keyspec_comma */ ",", - /* keyhintlabel_tablet_comma ~ */ - EMPTY, EMPTY, EMPTY, - /* ~ keyhintlabel_period */ + /* keyhintlabel_tablet_comma */ EMPTY, + // Period key + /* keyspec_period */ ".", /* morekeys_period */ "!text/morekeys_punctuation", + /* keyspec_tablet_period */ ".", /* keyhintlabel_tablet_period */ EMPTY, /* keyspec_symbols_question */ "?", /* keyspec_symbols_semicolon */ ";", @@ -368,14 +374,10 @@ public final class KeyboardTextsTable { // U+00A5: "¥" YEN SIGN // U+20B1: "₱" PESO SIGN /* morekeys_currency_dollar */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", - /* morekeys_tablet_punctuation */ "!autoColumnOrder!7,\\,,',#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,@,:,-,\",+,\\%,&", // U+00B1: "±" PLUS-MINUS SIGN /* morekeys_plus */ "\u00B1", /* morekeys_less_than */ "!fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_left_double_angle_quote", /* morekeys_greater_than */ "!fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_right_double_angle_quote", - // Period key - /* keyspec_period */ ".", - /* keyspec_tablet_period */ ".", // U+00A1: "¡" INVERTED EXCLAMATION MARK /* morekeys_exclamation */ "\u00A1", /* morekeys_currency */ "$,\u00A2,\u20AC,\u00A3,\u00A5,\u20B1", @@ -534,8 +536,8 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0623\u200C\u0628\u200C\u062C", /* morekeys_s ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, - /* ~ morekeys_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, + /* ~ morekeys_punctuation */ // U+0661: "١" ARABIC-INDIC DIGIT ONE /* keyspec_symbols_1 */ "\u0661", // U+0662: "٢" ARABIC-INDIC DIGIT TWO @@ -571,7 +573,13 @@ public final class KeyboardTextsTable { // U+066B: "٫" ARABIC DECIMAL SEPARATOR // U+066C: "٬" ARABIC THOUSANDS SEPARATOR /* additional_morekeys_symbols_0 */ "0,\u066B,\u066C", - /* morekeys_punctuation */ null, + // U+061F: "؟" ARABIC QUESTION MARK + // U+060C: "،" ARABIC COMMA + // U+061B: "؛" ARABIC SEMICOLON + /* keyspec_tablet_comma */ "\u060C", + /* keyspec_swiss_row1_11 ~ */ + null, null, null, null, null, null, + /* ~ morekeys_swiss_row2_11 */ // U+2605: "★" BLACK STAR // U+066D: "٭" ARABIC FIVE POINTED STAR /* morekeys_star */ "\u2605,\u066D", @@ -595,16 +603,14 @@ public final class KeyboardTextsTable { /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", /* keyspec_left_single_angle_quote */ "\u2039|\u203A", /* keyspec_right_single_angle_quote */ "\u203A|\u2039", - // U+061F: "؟" ARABIC QUESTION MARK - // U+060C: "،" ARABIC COMMA - // U+061B: "؛" ARABIC SEMICOLON - /* keyspec_tablet_comma */ "\u060C", + /* morekeys_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\",\'", + // U+0651: "ّ" ARABIC SHADDA + /* keyhintlabel_period */ "\u0651", /* morekeys_tablet_period */ "!text/morekeys_arabic_diacritics", // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "?,\u00BF", /* morekeys_h ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ keyspec_spanish_row2_10 */ // U+266A: "♪" EIGHTH NOTE /* morekeys_bullet */ "\u266A", @@ -634,10 +640,9 @@ public final class KeyboardTextsTable { // U+060C: "،" ARABIC COMMA /* keyspec_comma */ "\u060C", /* keyhintlabel_tablet_comma */ "\u061F", - /* morekeys_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\",\'", - // U+0651: "ّ" ARABIC SHADDA - /* keyhintlabel_period */ "\u0651", + /* keyspec_period */ null, /* morekeys_period */ "!text/morekeys_arabic_diacritics", + /* keyspec_tablet_period */ null, /* keyhintlabel_tablet_period */ "\u0651", /* keyspec_symbols_question */ "\u061F", /* keyspec_symbols_semicolon */ "\u061B", @@ -805,23 +810,19 @@ public final class KeyboardTextsTable { /* morekeys_l */ "l\u00B7l,\u0142", /* morekeys_g ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, - /* ~ additional_morekeys_symbols_0 */ + null, null, + /* ~ morekeys_nordic_row2_11 */ // U+00B7: "·" MIDDLE DOT /* morekeys_punctuation */ "!autoColumnOrder!9,\\,,?,!,\u00B7,#,),(,/,;,',@,:,-,\",+,\\%,&", - /* morekeys_star ~ */ + /* keyspec_symbols_1 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, - /* ~ morekeys_swiss_row2_11 */ - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - /* keyspec_spanish_row2_10 */ "\u00E7", - /* morekeys_bullet ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ morekeys_currency_dollar */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keyspec_south_slavic_row3_8 */ /* morekeys_tablet_punctuation */ "!autoColumnOrder!8,\\,,',\u00B7,#,),(,/,;,@,:,-,\",+,\\%,&", + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + /* keyspec_spanish_row2_10 */ "\u00E7", }; /* Locale cs: Czech */ @@ -981,7 +982,7 @@ public final class KeyboardTextsTable { // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - /* morekeys_a */ "\u00E4,\u00E2,\u00E0,\u00E1,\u00E6,\u00E3,\u00E5,\u0101", + /* morekeys_a */ "\u00E4,%,\u00E2,\u00E0,\u00E1,\u00E6,\u00E3,\u00E5,\u0101", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -990,13 +991,13 @@ public final class KeyboardTextsTable { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - /* morekeys_o */ "\u00F6,\u00F4,\u00F2,\u00F3,\u00F5,\u0153,\u00F8,\u014D", + /* morekeys_o */ "\u00F6,%,\u00F4,\u00F2,\u00F3,\u00F5,\u0153,\u00F8,\u014D", // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - /* morekeys_u */ "\u00FC,\u00FB,\u00F9,\u00FA,\u016B", + /* morekeys_u */ "\u00FC,%,\u00FB,\u00F9,\u00FA,\u016B", // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -1023,10 +1024,8 @@ public final class KeyboardTextsTable { /* keyspec_currency ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, - /* ~ keyspec_south_slavic_row3_8 */ + null, null, null, null, null, null, null, + /* ~ keyspec_tablet_comma */ // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS /* keyspec_swiss_row1_11 */ "\u00FC", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -1220,7 +1219,7 @@ public final class KeyboardTextsTable { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_question */ // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX // U+0127: "ħ" LATIN SMALL LETTER H WITH STROKE @@ -1228,9 +1227,8 @@ public final class KeyboardTextsTable { // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX /* morekeys_w */ "w,\u0175", /* morekeys_east_slavic_row2_2 ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, - /* ~ morekeys_swiss_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ morekeys_tablet_punctuation */ // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX /* keyspec_spanish_row2_10 */ "\u0135", /* morekeys_bullet ~ */ @@ -1305,10 +1303,8 @@ public final class KeyboardTextsTable { /* morekeys_n */ "\u00F1,\u0144", /* single_quotes ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, - /* ~ additional_morekeys_symbols_0 */ + null, null, null, null, null, null, null, null, null, null, + /* ~ morekeys_nordic_row2_11 */ // U+00A1: "¡" INVERTED EXCLAMATION MARK // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_punctuation */ "!autoColumnOrder!9,\\,,?,!,#,),(,/,;,\u00A1,',@,:,-,\",+,\\%,&,\u00BF", @@ -1488,8 +1484,8 @@ public final class KeyboardTextsTable { // U+FDFC: "﷼" RIAL SIGN /* keyspec_currency */ "\uFDFC", /* morekeys_r ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ morekeys_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ morekeys_punctuation */ // U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE /* keyspec_symbols_1 */ "\u06F1", // U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO @@ -1525,7 +1521,15 @@ public final class KeyboardTextsTable { // U+066B: "٫" ARABIC DECIMAL SEPARATOR // U+066C: "٬" ARABIC THOUSANDS SEPARATOR /* additional_morekeys_symbols_0 */ "0,\u066B,\u066C", - /* morekeys_punctuation */ null, + // U+060C: "،" ARABIC COMMA + // U+061B: "؛" ARABIC SEMICOLON + // U+061F: "؟" ARABIC QUESTION MARK + // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + /* keyspec_tablet_comma */ "\u060C", + /* keyspec_swiss_row1_11 ~ */ + null, null, null, null, null, null, + /* ~ morekeys_swiss_row2_11 */ // U+2605: "★" BLACK STAR // U+066D: "٭" ARABIC FIVE POINTED STAR /* morekeys_star */ "\u2605,\u066D", @@ -1543,18 +1547,14 @@ public final class KeyboardTextsTable { /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", /* keyspec_left_single_angle_quote */ "\u2039|\u203A", /* keyspec_right_single_angle_quote */ "\u203A|\u2039", - // U+060C: "،" ARABIC COMMA - // U+061B: "؛" ARABIC SEMICOLON - // U+061F: "؟" ARABIC QUESTION MARK - // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - /* keyspec_tablet_comma */ "\u060C", + /* morekeys_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", + // U+064B: "ً" ARABIC FATHATAN + /* keyhintlabel_period */ "\u064B", /* morekeys_tablet_period */ "!text/morekeys_arabic_diacritics", // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "?,\u00BF", /* morekeys_h ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ keyspec_spanish_row2_10 */ // U+266A: "♪" EIGHTH NOTE /* morekeys_bullet */ "\u266A", @@ -1584,10 +1584,9 @@ public final class KeyboardTextsTable { // U+060C: "،" ARABIC COMMA /* keyspec_comma */ "\u060C", /* keyhintlabel_tablet_comma */ "\u061F", - /* morekeys_tablet_comma */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote", - // U+064B: "ً" ARABIC FATHATAN - /* keyhintlabel_period */ "\u064B", + /* keyspec_period */ null, /* morekeys_period */ "!text/morekeys_arabic_diacritics", + /* keyspec_tablet_period */ null, /* keyhintlabel_tablet_period */ "\u064B", /* keyspec_symbols_question */ "\u061F", /* keyspec_symbols_semicolon */ "\u061B", @@ -1597,7 +1596,7 @@ public final class KeyboardTextsTable { // U+2030: "‰" PER MILLE SIGN /* morekeys_symbols_percent */ "\\%,\u2030", /* morekeys_v ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_plus */ // U+2264: "≤" LESS-THAN OR EQUAL TO // U+2265: "≥" GREATER-THAN EQUAL TO @@ -1714,10 +1713,8 @@ public final class KeyboardTextsTable { /* morekeys_d ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keyspec_south_slavic_row3_8 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keyspec_tablet_comma */ // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE /* keyspec_swiss_row1_11 */ "\u00E8", // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE @@ -1802,8 +1799,8 @@ public final class KeyboardTextsTable { // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", /* morekeys_r ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ morekeys_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ morekeys_punctuation */ // U+0967: "१" DEVANAGARI DIGIT ONE /* keyspec_symbols_1 */ "\u0967", // U+0968: "२" DEVANAGARI DIGIT TWO @@ -1937,9 +1934,8 @@ public final class KeyboardTextsTable { /* keylabel_to_alpha */ "\u0531\u0532\u0533", /* morekeys_s ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ additional_morekeys_symbols_0 */ + null, null, null, null, null, null, null, null, + /* ~ morekeys_nordic_row2_11 */ // U+055E: "՞" ARMENIAN QUESTION MARK // U+055C: "՜" ARMENIAN EXCLAMATION MARK // U+055A: "՚" ARMENIAN APOSTROPHE @@ -1951,28 +1947,36 @@ public final class KeyboardTextsTable { // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK // U+055F: "՟" ARMENIAN ABBREVIATION MARK /* morekeys_punctuation */ "!autoColumnOrder!8,\\,,\u055E,\u055C,.,\u055A,\u0559,?,!,\u055D,\u055B,\u058A,\u00BB,\u00AB,\u055F,;,:", - /* morekeys_star ~ */ + /* keyspec_symbols_1 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keyspec_right_single_angle_quote */ + null, null, null, null, null, null, + /* ~ additional_morekeys_symbols_0 */ // U+058F: "֏" ARMENIAN DRAM SIGN // TODO: Enable this when we have glyph for the following letter // <string name="keyspec_currency">֏</string> // // U+055D: "՝" ARMENIAN COMMA /* keyspec_tablet_comma */ "\u055D", + /* keyspec_swiss_row1_11 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + /* ~ keyhintlabel_period */ /* morekeys_tablet_period */ "!text/morekeys_punctuation", // U+055E: "՞" ARMENIAN QUESTION MARK // U+00BF: "¿" INVERTED QUESTION MARK /* morekeys_question */ "\u055E,\u00BF", /* morekeys_h ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ morekeys_greater_than */ + /* ~ keyhintlabel_tablet_comma */ // U+0589: "։" ARMENIAN FULL STOP /* keyspec_period */ "\u0589", + /* morekeys_period */ null, /* keyspec_tablet_period */ "\u0589", + /* keyhintlabel_tablet_period ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, + /* ~ morekeys_greater_than */ // U+055C: "՜" ARMENIAN EXCLAMATION MARK // U+00A1: "¡" INVERTED EXCLAMATION MARK /* morekeys_exclamation */ "\u055C,\u00A1", @@ -2078,6 +2082,24 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* morekeys_i */ "\u00EC,\u00ED,\u00EE,\u00EF,\u012F,\u012B", + /* morekeys_c ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, + /* ~ keyspec_tablet_comma */ + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + /* keyspec_swiss_row1_11 */ "\u00FC", + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + /* keyspec_swiss_row2_10 */ "\u00F6", + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + /* keyspec_swiss_row2_11 */ "\u00E4", + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + /* morekeys_swiss_row1_11 */ "\u00E8", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + /* morekeys_swiss_row2_10 */ "\u00E9", + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + /* morekeys_swiss_row2_11 */ "\u00E0", }; /* Locale iw: Hebrew */ @@ -2101,8 +2123,8 @@ public final class KeyboardTextsTable { /* morekeys_r ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, - /* ~ morekeys_punctuation */ + null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ morekeys_swiss_row2_11 */ // U+2605: "★" BLACK STAR /* morekeys_star */ "\u2605", // The all letters need to be mirrored are found at @@ -2127,12 +2149,11 @@ public final class KeyboardTextsTable { /* keyspec_right_double_angle_quote */ "\u00BB|\u00AB", /* keyspec_left_single_angle_quote */ "\u2039|\u203A", /* keyspec_right_single_angle_quote */ "\u203A|\u2039", - /* keyspec_tablet_comma ~ */ + /* morekeys_tablet_comma ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, - /* ~ morekeys_tablet_punctuation */ + /* ~ morekeys_currency_dollar */ // U+00B1: "±" PLUS-MINUS SIGN // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN /* morekeys_plus */ "\u00B1,\uFB29", @@ -2184,7 +2205,8 @@ public final class KeyboardTextsTable { /* morekeys_nordic_row2_11 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, /* ~ morekeys_w */ // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I /* morekeys_east_slavic_row2_2 */ "\u0456", @@ -2200,7 +2222,6 @@ public final class KeyboardTextsTable { /* morekeys_cyrillic_i ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, /* ~ keyspec_x */ // U+04BB: "һ" CYRILLIC SMALL LETTER SHHA /* morekeys_east_slavic_row2_11 */ "\u04BB", @@ -2228,7 +2249,7 @@ public final class KeyboardTextsTable { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, null, null, /* ~ morekeys_cyrillic_a */ // U+17DB: "៛" KHMER CURRENCY SYMBOL RIEL /* morekeys_currency_dollar */ "\u17DB,\u00A2,\u00A3,\u20AC,\u00A5,\u20B1", @@ -2265,7 +2286,8 @@ public final class KeyboardTextsTable { /* morekeys_nordic_row2_11 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, /* ~ morekeys_east_slavic_row2_2 */ // U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U /* morekeys_cyrillic_u */ "\u04AF", @@ -2504,7 +2526,8 @@ public final class KeyboardTextsTable { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, /* ~ morekeys_cyrillic_o */ // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE /* morekeys_cyrillic_i */ "\u045D", @@ -2545,6 +2568,34 @@ public final class KeyboardTextsTable { // U+1001: "ခ" MYANMAR LETTER KHA // U+1002: "ဂ" MYANMAR LETTER GA /* keylabel_to_alpha */ "\u1000\u1001\u1002", + /* morekeys_s ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + /* ~ morekeys_nordic_row2_11 */ + /* morekeys_punctuation */ "!autoColumnOrder!9,\u104A,.,?,!,#,),(,/,;,...,',@,:,-,\",+,\\%,&", + /* keyspec_symbols_1 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, + /* ~ additional_morekeys_symbols_0 */ + // U+104A: "၊" MYANMAR SIGN LITTLE SECTION + // U+104B: "။" MYANMAR SIGN SECTION + /* keyspec_tablet_comma */ "\u104A", + /* keyspec_swiss_row1_11 ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, + /* ~ keyspec_right_single_angle_quote */ + /* morekeys_tablet_comma */ "\\,", + /* keyhintlabel_period */ "\u104A", + /* morekeys_tablet_period ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ keyspec_south_slavic_row3_8 */ + /* morekeys_tablet_punctuation */ "!autoColumnOrder!8,.,',#,),(,/,;,@,...,:,-,\",+,\\%,&", + /* keyspec_spanish_row2_10 ~ */ + null, null, null, null, null, null, null, + /* ~ keyhintlabel_tablet_comma */ + /* keyspec_period */ "\u104B", + /* morekeys_period */ null, + /* keyspec_tablet_period */ "\u104B", }; /* Locale nb: Norwegian Bokmål */ @@ -2617,8 +2668,8 @@ public final class KeyboardTextsTable { // U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN /* keyspec_currency */ "\u0930\u0941.", /* morekeys_r ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ morekeys_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, + /* ~ morekeys_punctuation */ // U+0967: "१" DEVANAGARI DIGIT ONE /* keyspec_symbols_1 */ "\u0967", // U+0968: "२" DEVANAGARI DIGIT TWO @@ -3045,7 +3096,8 @@ public final class KeyboardTextsTable { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, /* ~ morekeys_cyrillic_o */ // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE /* morekeys_cyrillic_i */ "\u045D", @@ -3369,7 +3421,8 @@ public final class KeyboardTextsTable { /* morekeys_nordic_row2_11 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, /* ~ morekeys_w */ // U+0457: "ї" CYRILLIC SMALL LETTER YI /* morekeys_east_slavic_row2_2 */ "\u0457", @@ -3639,7 +3692,7 @@ public final class KeyboardTextsTable { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_question */ // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX /* morekeys_h */ "\u0125", @@ -3647,8 +3700,7 @@ public final class KeyboardTextsTable { /* morekeys_w */ "\u0175", /* morekeys_east_slavic_row2_2 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_v */ // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX /* morekeys_j */ "\u0135", @@ -3658,43 +3710,43 @@ public final class KeyboardTextsTable { // "locale", TEXT_ARRAY, /* numberOfNonNullText/lengthOf_TEXT_ARRAY localeName */ "DEFAULT", TEXTS_DEFAULT, /* 168/168 DEFAULT */ "af" , TEXTS_af, /* 7/ 12 Afrikaans */ - "ar" , TEXTS_ar, /* 55/107 Arabic */ + "ar" , TEXTS_ar, /* 55/110 Arabic */ "az_AZ" , TEXTS_az_AZ, /* 8/ 17 Azerbaijani (Azerbaijan) */ "be_BY" , TEXTS_be_BY, /* 9/ 32 Belarusian (Belarus) */ "bg" , TEXTS_bg, /* 2/ 10 Bulgarian */ - "ca" , TEXTS_ca, /* 11/120 Catalan */ + "ca" , TEXTS_ca, /* 11/ 95 Catalan */ "cs" , TEXTS_cs, /* 17/ 21 Czech */ "da" , TEXTS_da, /* 19/ 33 Danish */ - "de" , TEXTS_de, /* 16/ 91 German */ + "de" , TEXTS_de, /* 16/ 62 German */ "el" , TEXTS_el, /* 1/ 10 Greek */ "en" , TEXTS_en, /* 8/ 11 English */ - "eo" , TEXTS_eo, /* 26/115 Esperanto */ - "es" , TEXTS_es, /* 8/ 55 Spanish */ + "eo" , TEXTS_eo, /* 26/118 Esperanto */ + "es" , TEXTS_es, /* 8/ 34 Spanish */ "et_EE" , TEXTS_et_EE, /* 22/ 27 Estonian (Estonia) */ "eu_ES" , TEXTS_eu_ES, /* 7/ 8 Basque (Spain) */ - "fa" , TEXTS_fa, /* 58/123 Persian */ + "fa" , TEXTS_fa, /* 58/125 Persian */ "fi" , TEXTS_fi, /* 10/ 33 Finnish */ - "fr" , TEXTS_fr, /* 13/ 91 French */ + "fr" , TEXTS_fr, /* 13/ 62 French */ "gl_ES" , TEXTS_gl_ES, /* 7/ 8 Gallegan (Spain) */ - "hi" , TEXTS_hi, /* 23/ 54 Hindi */ + "hi" , TEXTS_hi, /* 23/ 55 Hindi */ "hr" , TEXTS_hr, /* 9/ 19 Croatian */ "hu" , TEXTS_hu, /* 9/ 19 Hungarian */ "hy_AM" , TEXTS_hy_AM, /* 8/126 Armenian (Armenia) */ "is" , TEXTS_is, /* 10/ 15 Icelandic */ - "it" , TEXTS_it, /* 5/ 5 Italian */ - "iw" , TEXTS_iw, /* 20/121 Hebrew */ + "it" , TEXTS_it, /* 11/ 62 Italian */ + "iw" , TEXTS_iw, /* 20/123 Hebrew */ "ka_GE" , TEXTS_ka_GE, /* 3/ 10 Georgian (Georgia) */ - "kk" , TEXTS_kk, /* 15/118 Kazakh */ - "km_KH" , TEXTS_km_KH, /* 2/119 Khmer (Cambodia) */ - "ky" , TEXTS_ky, /* 10/ 80 Kirghiz */ + "kk" , TEXTS_kk, /* 15/121 Kazakh */ + "km_KH" , TEXTS_km_KH, /* 2/122 Khmer (Cambodia) */ + "ky" , TEXTS_ky, /* 10/ 88 Kirghiz */ "lo_LA" , TEXTS_lo_LA, /* 2/ 20 Lao (Laos) */ "lt" , TEXTS_lt, /* 18/ 22 Lithuanian */ "lv" , TEXTS_lv, /* 18/ 22 Latvian */ - "mk" , TEXTS_mk, /* 9/ 85 Macedonian */ + "mk" , TEXTS_mk, /* 9/ 93 Macedonian */ "mn_MN" , TEXTS_mn_MN, /* 2/ 20 Mongolian (Mongolia) */ - "my_MM" , TEXTS_my_MM, /* 1/ 10 Burmese (Myanmar) */ + "my_MM" , TEXTS_my_MM, /* 8/104 Burmese (Myanmar) */ "nb" , TEXTS_nb, /* 11/ 33 Norwegian Bokmål */ - "ne_NP" , TEXTS_ne_NP, /* 23/ 54 Nepali (Nepal) */ + "ne_NP" , TEXTS_ne_NP, /* 23/ 55 Nepali (Nepal) */ "nl" , TEXTS_nl, /* 9/ 12 Dutch */ "pl" , TEXTS_pl, /* 10/ 16 Polish */ "pt" , TEXTS_pt, /* 6/ 6 Portuguese */ @@ -3703,16 +3755,16 @@ public final class KeyboardTextsTable { "ru" , TEXTS_ru, /* 9/ 32 Russian */ "sk" , TEXTS_sk, /* 20/ 22 Slovak */ "sl" , TEXTS_sl, /* 8/ 19 Slovenian */ - "sr" , TEXTS_sr, /* 11/ 85 Serbian */ + "sr" , TEXTS_sr, /* 11/ 93 Serbian */ "sv" , TEXTS_sv, /* 21/ 33 Swedish */ "sw" , TEXTS_sw, /* 9/ 17 Swahili */ "th" , TEXTS_th, /* 2/ 20 Thai */ "tl" , TEXTS_tl, /* 7/ 8 Tagalog */ "tr" , TEXTS_tr, /* 7/ 17 Turkish */ - "uk" , TEXTS_uk, /* 11/ 79 Ukrainian */ + "uk" , TEXTS_uk, /* 11/ 87 Ukrainian */ "vi" , TEXTS_vi, /* 8/ 20 Vietnamese */ "zu" , TEXTS_zu, /* 8/ 11 Zulu */ - "zz" , TEXTS_zz, /* 19/109 Alphabet */ + "zz" , TEXTS_zz, /* 19/112 Alphabet */ }; static { diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java index 2a16ab5ab..232bf7407 100644 --- a/java/src/com/android/inputmethod/latin/LastComposedWord.java +++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java @@ -44,7 +44,6 @@ public final class LastComposedWord { public static final String NOT_A_SEPARATOR = ""; - public final int[] mPrimaryKeyCodes; public final ArrayList<Event> mEvents; public final String mTypedWord; public final CharSequence mCommittedWord; @@ -57,16 +56,15 @@ public final class LastComposedWord { private boolean mActive; public static final LastComposedWord NOT_A_COMPOSED_WORD = - new LastComposedWord(null, new ArrayList<Event>(), null, "", "", + new LastComposedWord(new ArrayList<Event>(), null, "", "", NOT_A_SEPARATOR, null, WordComposer.CAPS_MODE_OFF); // Warning: this is using the passed objects as is and fully expects them to be // immutable. Do not fiddle with their contents after you passed them to this constructor. - public LastComposedWord(final int[] primaryKeyCodes, final ArrayList<Event> events, + public LastComposedWord(final ArrayList<Event> events, final InputPointers inputPointers, final String typedWord, final CharSequence committedWord, final String separatorString, final String prevWord, final int capitalizedMode) { - mPrimaryKeyCodes = primaryKeyCodes; if (inputPointers != null) { mInputPointers.copy(inputPointers); } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 2cfecd740..059f36288 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -199,7 +199,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen latinIme.mSettings.getCurrent()); break; case MSG_UPDATE_SHIFT_STATE: - switcher.requestUpdatingShiftState(); + switcher.requestUpdatingShiftState(latinIme.getCurrentAutoCapsState(), + latinIme.getCurrentRecapitalizeState()); break; case MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP: if (msg.arg1 == ARG1_NOT_GESTURE_INPUT) { @@ -641,6 +642,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen super.onDestroy(); } + @UsedForTesting + public void recycle() { + mInputLogic.recycle(); + } + @Override public void onConfigurationChanged(final Configuration conf) { // If orientation changed while predicting, commit the change @@ -844,7 +850,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // we need to re-evaluate the shift state, but not the whole layout which would be // disruptive. // Space state must be updated before calling updateShiftState - switcher.requestUpdatingShiftState(); + switcher.requestUpdatingShiftState(getCurrentAutoCapsState(), + getCurrentRecapitalizeState()); } // This will set the punctuation suggestions if next word suggestion is off; // otherwise it will clear the suggestion strip. @@ -923,7 +930,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO: find a better way to simulate actual execution. if (isInputViewShown() && mInputLogic.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd)) { - mKeyboardSwitcher.requestUpdatingShiftState(); + mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), + getCurrentRecapitalizeState()); } mSubtypeState.currentSubtypeUsed(); @@ -1275,7 +1283,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO: have the keyboard pass the correct key code when we need it. final Event event = Event.createSoftwareTextEvent(rawText, Event.NOT_A_KEY_CODE); mInputLogic.onTextInput(mSettings.getCurrent(), event, mHandler); - mKeyboardSwitcher.requestUpdatingShiftState(); + mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), + getCurrentRecapitalizeState()); mKeyboardSwitcher.onCodeInput(Constants.CODE_OUTPUT_TEXT, getCurrentAutoCapsState()); } @@ -1519,7 +1528,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mHandler.postUpdateShiftState(); break; case InputTransaction.SHIFT_UPDATE_NOW: - mKeyboardSwitcher.requestUpdatingShiftState(); + mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), + getCurrentRecapitalizeState()); break; default: // SHIFT_NO_UPDATE } diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index 02f18cdd3..1268e5aac 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -42,11 +42,6 @@ public final class WordComposer { private CombinerChain mCombinerChain; - // An array of code points representing the characters typed so far. - // The array is limited to MAX_WORD_LENGTH code points, but mTypedWord extends past that - // and mCodePointSize can go past that. If mCodePointSize is greater than MAX_WORD_LENGTH, - // this just does not contain the associated code points past MAX_WORD_LENGTH. - private int[] mPrimaryKeyCodes; // The list of events that served to compose this string. private final ArrayList<Event> mEvents; private final InputPointers mInputPointers = new InputPointers(MAX_WORD_LENGTH); @@ -71,7 +66,6 @@ public final class WordComposer { private int mCapsCount; private int mDigitsCount; private int mCapitalizedMode; - private int mTrailingSingleQuotesCount; // This is the number of code points entered so far. This is not limited to MAX_WORD_LENGTH. // In general, this contains the size of mPrimaryKeyCodes, except when this is greater than // MAX_WORD_LENGTH in which case mPrimaryKeyCodes only contain the first MAX_WORD_LENGTH @@ -86,10 +80,8 @@ public final class WordComposer { public WordComposer() { mCombinerChain = new CombinerChain(); - mPrimaryKeyCodes = new int[MAX_WORD_LENGTH]; mEvents = CollectionUtils.newArrayList(); mAutoCorrection = null; - mTrailingSingleQuotesCount = 0; mIsResumed = false; mIsBatchMode = false; mCursorPositionWithinWord = 0; @@ -108,7 +100,6 @@ public final class WordComposer { mCapsCount = 0; mDigitsCount = 0; mIsFirstCharCapitalized = false; - mTrailingSingleQuotesCount = 0; mIsResumed = false; mIsBatchMode = false; mCursorPositionWithinWord = 0; @@ -143,10 +134,7 @@ public final class WordComposer { */ public int copyCodePointsExceptTrailingSingleQuotesAndReturnCodePointCount( final int[] destination, final int maxSize) { - int i = mTypedWordCache.length() - 1; - while (i >= 0 && mTypedWordCache.charAt(i) == Constants.CODE_SINGLE_QUOTE) { - --i; - } + final int i = mTypedWordCache.length() - 1 - trailingSingleQuotesCount(); if (i < 0) { // The string is empty or contains only single quotes. return 0; @@ -198,28 +186,8 @@ public final class WordComposer { if (0 == mCodePointSize) { mIsFirstCharCapitalized = false; } - if (Constants.CODE_DELETE == event.mKeyCode) { - if (mTrailingSingleQuotesCount > 0) { - --mTrailingSingleQuotesCount; - } else { - // Delete, but we didn't end in a quote: must recompute mTrailingSingleQuotesCount - // We're only searching for single quotes, so no need to account for code points - for (int i = mTypedWordCache.length() - 1; i > 0; --i) { - if (Constants.CODE_SINGLE_QUOTE != mTypedWordCache.charAt(i)) { - break; - } - ++mTrailingSingleQuotesCount; - } - } - } else { - if (Constants.CODE_SINGLE_QUOTE == primaryCode) { - ++mTrailingSingleQuotesCount; - } else { - mTrailingSingleQuotesCount = 0; - } + if (Constants.CODE_DELETE != event.mKeyCode) { if (newIndex < MAX_WORD_LENGTH) { - mPrimaryKeyCodes[newIndex] = primaryCode >= Constants.CODE_SPACE - ? Character.toLowerCase(primaryCode) : primaryCode; // In the batch input mode, the {@code mInputPointers} holds batch input points and // shouldn't be overridden by the "typed key" coordinates // (See {@link #setBatchInputWord}). @@ -263,15 +231,8 @@ public final class WordComposer { mCombinerChain.reset(); int actualMoveAmountWithinWord = 0; int cursorPos = mCursorPositionWithinWord; - final int[] codePoints; - if (mCodePointSize >= MAX_WORD_LENGTH) { - // If we have more than MAX_WORD_LENGTH characters, we don't have everything inside - // mPrimaryKeyCodes. This should be rare enough that we can afford to just compute - // the array on the fly when this happens. - codePoints = StringUtils.toCodePointArray(mTypedWordCache); - } else { - codePoints = mPrimaryKeyCodes; - } + // TODO: Don't make that copy. We can do this directly from mTypedWordCache. + final int[] codePoints = StringUtils.toCodePointArray(mTypedWordCache); if (expectedMoveAmount >= 0) { // Moving the cursor forward for the expected amount or until the end of the word has // been reached, whichever comes first. @@ -353,7 +314,12 @@ public final class WordComposer { } public int trailingSingleQuotesCount() { - return mTrailingSingleQuotesCount; + final int lastIndex = mTypedWordCache.length() - 1; + int i = lastIndex; + while (i >= 0 && mTypedWordCache.charAt(i) == Constants.CODE_SINGLE_QUOTE) { + --i; + } + return lastIndex - i; } /** @@ -443,9 +409,7 @@ public final class WordComposer { // Note: currently, we come here whenever we commit a word. If it's a MANUAL_PICK // or a DECIDED_WORD we may cancel the commit later; otherwise, we should deactivate // the last composed word to ensure this does not happen. - final int[] primaryKeyCodes = mPrimaryKeyCodes; - mPrimaryKeyCodes = new int[MAX_WORD_LENGTH]; - final LastComposedWord lastComposedWord = new LastComposedWord(primaryKeyCodes, mEvents, + final LastComposedWord lastComposedWord = new LastComposedWord(mEvents, mInputPointers, mTypedWordCache.toString(), committedWord, separatorString, prevWord, mCapitalizedMode); mInputPointers.reset(); @@ -460,7 +424,6 @@ public final class WordComposer { mCombinerChain.reset(); mEvents.clear(); mCodePointSize = 0; - mTrailingSingleQuotesCount = 0; mIsFirstCharCapitalized = false; mCapitalizedMode = CAPS_MODE_OFF; refreshTypedWordCache(); @@ -480,7 +443,6 @@ public final class WordComposer { public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord, final String previousWord) { - mPrimaryKeyCodes = lastComposedWord.mPrimaryKeyCodes; mEvents.clear(); Collections.copy(mEvents, lastComposedWord.mEvents); mInputPointers.set(lastComposedWord.mInputPointers); diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 7cf8c5e49..bf8467eb6 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -148,6 +148,17 @@ public final class InputLogic { mInputLogicHandler.reset(); } + // Normally this class just gets out of scope after the process ends, but in unit tests, we + // create several instances of LatinIME in the same process, which results in several + // instances of InputLogic. This cleans up the associated handler so that tests don't leak + // handlers. + public void recycle() { + final InputLogicHandler inputLogicHandler = mInputLogicHandler; + mInputLogicHandler = InputLogicHandler.NULL_HANDLER; + inputLogicHandler.destroy(); + mSuggest.mDictionaryFacilitator.closeDictionaries(); + } + /** * React to a string input. * @@ -537,7 +548,8 @@ public final class InputLogic { // after typing some letters and a period, then gesturing; the keyboard is not in // caps mode yet, but since a gesture is starting, it should go in caps mode, // unless the user explictly said it should not. - keyboardSwitcher.requestUpdatingShiftState(); + keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues), + getCurrentRecapitalizeState()); } } mConnection.endBatchEdit(); @@ -579,7 +591,8 @@ public final class InputLogic { promotePhantomSpace(settingsValues); mConnection.commitText(commitParts[0], 0); mSpaceState = SpaceState.PHANTOM; - keyboardSwitcher.requestUpdatingShiftState(); + keyboardSwitcher.requestUpdatingShiftState( + getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState()); mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime( getActualCapsMode(settingsValues, keyboardSwitcher.getKeyboardShiftMode()), commitParts[0]); @@ -1819,7 +1832,8 @@ public final class InputLogic { } // Space state must be updated before calling updateShiftState mSpaceState = SpaceState.PHANTOM; - keyboardSwitcher.requestUpdatingShiftState(); + keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues), + getCurrentRecapitalizeState()); } /** diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java index e3b8ab465..64bba681f 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java @@ -20,6 +20,7 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.Message; +import com.android.inputmethod.compat.LooperCompatUtils; import com.android.inputmethod.latin.InputPointers; import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.Suggest; @@ -80,6 +81,12 @@ class InputLogicHandler implements Handler.Callback { mNonUIThreadHandler.removeCallbacksAndMessages(null); } + // In unit tests, we create several instances of LatinIME, which results in several instances + // of InputLogicHandler. To avoid these handlers lingering, we call this. + public void destroy() { + LooperCompatUtils.quitSafely(mNonUIThreadHandler.getLooper()); + } + /** * Handle a message. * @see android.os.Handler.Callback#handleMessage(android.os.Message) diff --git a/java/src/com/android/inputmethod/latin/utils/SpacebarLanguageUtils.java b/java/src/com/android/inputmethod/latin/utils/SpacebarLanguageUtils.java index 89837c641..1ca895fdb 100644 --- a/java/src/com/android/inputmethod/latin/utils/SpacebarLanguageUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/SpacebarLanguageUtils.java @@ -18,8 +18,6 @@ package com.android.inputmethod.latin.utils; import android.view.inputmethod.InputMethodSubtype; -import java.util.Locale; - public final class SpacebarLanguageUtils { private SpacebarLanguageUtils() { // Intentional empty constructor for utility class. @@ -55,7 +53,6 @@ public final class SpacebarLanguageUtils { if (SubtypeLocaleUtils.isNoLanguage(subtype)) { return SubtypeLocaleUtils.getKeyboardLayoutSetDisplayName(subtype); } - final Locale locale = SubtypeLocaleUtils.getSubtypeLocale(subtype); - return SubtypeLocaleUtils.getSubtypeLocaleDisplayName(locale.getLanguage()); + return SubtypeLocaleUtils.getSubtypeLanguageDisplayName(subtype.getLocale()); } } diff --git a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java index 2452864d5..b37779bdc 100644 --- a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java @@ -25,7 +25,7 @@ import android.os.Build; import android.util.Log; import android.view.inputmethod.InputMethodSubtype; -import com.android.inputmethod.latin.DictionaryFactory; +import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.R; import java.util.Arrays; @@ -33,10 +33,10 @@ import java.util.HashMap; import java.util.Locale; public final class SubtypeLocaleUtils { - static final String TAG = SubtypeLocaleUtils.class.getSimpleName(); - // This class must be located in the same package as LatinIME.java. - private static final String RESOURCE_PACKAGE_NAME = - DictionaryFactory.class.getPackage().getName(); + private static final String TAG = SubtypeLocaleUtils.class.getSimpleName(); + + // This reference class {@link Constants} must be located in the same package as LatinIME.java. + private static final String RESOURCE_PACKAGE_NAME = Constants.class.getPackage().getName(); // Special language code to represent "no language". public static final String NO_LANGUAGE = "zz"; @@ -44,7 +44,8 @@ public final class SubtypeLocaleUtils { public static final String EMOJI = "emoji"; public static final int UNKNOWN_KEYBOARD_LAYOUT = R.string.subtype_generic; - private static boolean sInitialized = false; + private static volatile boolean sInitialized = false; + private static final Object sInitializeLock = new Object(); private static Resources sResources; private static String[] sPredefinedKeyboardLayoutSet; // Keyboard layout to its display name map. @@ -77,9 +78,16 @@ public final class SubtypeLocaleUtils { } // Note that this initialization method can be called multiple times. - public static synchronized void init(final Context context) { - if (sInitialized) return; + public static void init(final Context context) { + synchronized (sInitializeLock) { + if (sInitialized == false) { + initLocked(context); + sInitialized = true; + } + } + } + private static void initLocked(final Context context) { final Resources res = context.getResources(); sResources = res; @@ -122,8 +130,6 @@ public final class SubtypeLocaleUtils { final String keyboardLayoutSet = keyboardLayoutSetMap[i + 1]; sLocaleAndExtraValueToKeyboardLayoutSetMap.put(key, keyboardLayoutSet); } - - sInitialized = true; } public static String[] getPredefinedKeyboardLayoutSet() { @@ -167,8 +173,18 @@ public final class SubtypeLocaleUtils { return getSubtypeLocaleDisplayNameInternal(localeString, displayLocale); } + public static String getSubtypeLanguageDisplayName(final String localeString) { + final Locale locale = LocaleUtils.constructLocaleFromString(localeString); + final Locale displayLocale = getDisplayLocaleOfSubtypeLocale(localeString); + return getSubtypeLocaleDisplayNameInternal(locale.getLanguage(), displayLocale); + } + private static String getSubtypeLocaleDisplayNameInternal(final String localeString, final Locale displayLocale) { + if (NO_LANGUAGE.equals(localeString)) { + // No language subtype should be displayed in system locale. + return sResources.getString(R.string.subtype_no_language); + } final Integer exceptionalNameResId = sExceptionalLocaleToNameIdsMap.get(localeString); final String displayName; if (exceptionalNameResId != null) { @@ -179,9 +195,6 @@ public final class SubtypeLocaleUtils { } }; displayName = getExceptionalName.runInLocale(sResources, displayLocale); - } else if (NO_LANGUAGE.equals(localeString)) { - // No language subtype should be displayed in system locale. - return sResources.getString(R.string.subtype_no_language); } else { final Locale locale = LocaleUtils.constructLocaleFromString(localeString); displayName = locale.getDisplayName(displayLocale); |