diff options
89 files changed, 698 insertions, 241 deletions
diff --git a/java/res/values-af/strings-talkback-descriptions.xml b/java/res/values-af/strings-talkback-descriptions.xml index 439b39119..a893a2596 100644 --- a/java/res/values-af/strings-talkback-descriptions.xml +++ b/java/res/values-af/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Plekke"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simbole"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emosiekone"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-am/strings-talkback-descriptions.xml b/java/res/values-am/strings-talkback-descriptions.xml index 79c4d08ec..85f490835 100644 --- a/java/res/values-am/strings-talkback-descriptions.xml +++ b/java/res/values-am/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"ቦታዎች"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"ምልክቶች"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"ስሜት ገላጭ አዶዎች"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ar/strings-talkback-descriptions.xml b/java/res/values-ar/strings-talkback-descriptions.xml index a9110a7b5..2b84e333d 100644 --- a/java/res/values-ar/strings-talkback-descriptions.xml +++ b/java/res/values-ar/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"أماكن"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"رموز"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"رموز تعبيرية"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-az-rAZ/strings-talkback-descriptions.xml b/java/res/values-az-rAZ/strings-talkback-descriptions.xml index 0ff31f3b4..54d8cacda 100644 --- a/java/res/values-az-rAZ/strings-talkback-descriptions.xml +++ b/java/res/values-az-rAZ/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Yerlər"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simvollar"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikonlar"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-bg/strings-talkback-descriptions.xml b/java/res/values-bg/strings-talkback-descriptions.xml index 6997424c1..55e27a2c0 100644 --- a/java/res/values-bg/strings-talkback-descriptions.xml +++ b/java/res/values-bg/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Места"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Символи"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Емотикони"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ca/strings-talkback-descriptions.xml b/java/res/values-ca/strings-talkback-descriptions.xml index bd6077ad0..4520a5445 100644 --- a/java/res/values-ca/strings-talkback-descriptions.xml +++ b/java/res/values-ca/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Llocs"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Símbols"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticones"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-cs/strings-talkback-descriptions.xml b/java/res/values-cs/strings-talkback-descriptions.xml index 0e35c8239..250b96c3d 100644 --- a/java/res/values-cs/strings-talkback-descriptions.xml +++ b/java/res/values-cs/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Místa"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symboly"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikony"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-da/strings-talkback-descriptions.xml b/java/res/values-da/strings-talkback-descriptions.xml index 669c18375..e32f1332e 100644 --- a/java/res/values-da/strings-talkback-descriptions.xml +++ b/java/res/values-da/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Steder"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symboler"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Humørikoner"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-de/strings-talkback-descriptions.xml b/java/res/values-de/strings-talkback-descriptions.xml index d5c54e04a..5110301c9 100644 --- a/java/res/values-de/strings-talkback-descriptions.xml +++ b/java/res/values-de/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Orte"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symbole"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticons"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-el/strings-talkback-descriptions.xml b/java/res/values-el/strings-talkback-descriptions.xml index aef593cd7..073971f31 100644 --- a/java/res/values-el/strings-talkback-descriptions.xml +++ b/java/res/values-el/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Μέρη"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Σύμβολα"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticon"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-en-rGB/strings-talkback-descriptions.xml b/java/res/values-en-rGB/strings-talkback-descriptions.xml index c6c8f6d79..de3954afb 100644 --- a/java/res/values-en-rGB/strings-talkback-descriptions.xml +++ b/java/res/values-en-rGB/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Places"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symbols"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticons"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-en-rIN/strings-talkback-descriptions.xml b/java/res/values-en-rIN/strings-talkback-descriptions.xml index c6c8f6d79..de3954afb 100644 --- a/java/res/values-en-rIN/strings-talkback-descriptions.xml +++ b/java/res/values-en-rIN/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Places"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symbols"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticons"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-es-rUS/strings-talkback-descriptions.xml b/java/res/values-es-rUS/strings-talkback-descriptions.xml index 7ccc35f86..345944d02 100644 --- a/java/res/values-es-rUS/strings-talkback-descriptions.xml +++ b/java/res/values-es-rUS/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Lugares"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Símbolos"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticones"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-es/strings-talkback-descriptions.xml b/java/res/values-es/strings-talkback-descriptions.xml index 2e21b6c44..cd45d28ea 100644 --- a/java/res/values-es/strings-talkback-descriptions.xml +++ b/java/res/values-es/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Sitios"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Símbolos"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticonos"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-et-rEE/strings-talkback-descriptions.xml b/java/res/values-et-rEE/strings-talkback-descriptions.xml index 000107195..d8fab6321 100644 --- a/java/res/values-et-rEE/strings-talkback-descriptions.xml +++ b/java/res/values-et-rEE/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Kohad"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Sümbolid"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikonid"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-fa/strings-talkback-descriptions.xml b/java/res/values-fa/strings-talkback-descriptions.xml index c4d4b2525..1a457e403 100644 --- a/java/res/values-fa/strings-talkback-descriptions.xml +++ b/java/res/values-fa/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"مکانها"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"نمادها"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"شکلکها"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-fi/strings-talkback-descriptions.xml b/java/res/values-fi/strings-talkback-descriptions.xml index b12b742cf..ac608abc1 100644 --- a/java/res/values-fi/strings-talkback-descriptions.xml +++ b/java/res/values-fi/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Paikat"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symbolit"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Hymiöt"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-fr-rCA/strings-talkback-descriptions.xml b/java/res/values-fr-rCA/strings-talkback-descriptions.xml index 7f9eaaab7..41250eaea 100644 --- a/java/res/values-fr-rCA/strings-talkback-descriptions.xml +++ b/java/res/values-fr-rCA/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Lieux"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symboles"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Émoticônes"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-fr/strings-talkback-descriptions.xml b/java/res/values-fr/strings-talkback-descriptions.xml index 97f5c6cac..5f0ed301b 100644 --- a/java/res/values-fr/strings-talkback-descriptions.xml +++ b/java/res/values-fr/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Lieux"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symboles"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Émoticônes"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-hi/strings-talkback-descriptions.xml b/java/res/values-hi/strings-talkback-descriptions.xml index 39e53ad96..759cb67d5 100644 --- a/java/res/values-hi/strings-talkback-descriptions.xml +++ b/java/res/values-hi/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"स्थान"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"प्रतीक"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"इमोटिकॉन्स"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-hr/strings-talkback-descriptions.xml b/java/res/values-hr/strings-talkback-descriptions.xml index c3a2da015..f8fce67e7 100644 --- a/java/res/values-hr/strings-talkback-descriptions.xml +++ b/java/res/values-hr/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Mjesta"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simboli"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikoni"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-hu/strings-talkback-descriptions.xml b/java/res/values-hu/strings-talkback-descriptions.xml index 2bf2a8aeb..971927e98 100644 --- a/java/res/values-hu/strings-talkback-descriptions.xml +++ b/java/res/values-hu/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Helyek"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Szimbólumok"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Hangulatjelek"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-hy-rAM/strings-talkback-descriptions.xml b/java/res/values-hy-rAM/strings-talkback-descriptions.xml index 149e91a53..d18606bfc 100644 --- a/java/res/values-hy-rAM/strings-talkback-descriptions.xml +++ b/java/res/values-hy-rAM/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Վայրեր"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Նշաններ"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Զմայլիկներ"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-in/strings-talkback-descriptions.xml b/java/res/values-in/strings-talkback-descriptions.xml index 8f51fb709..5d033296f 100644 --- a/java/res/values-in/strings-talkback-descriptions.xml +++ b/java/res/values-in/strings-talkback-descriptions.xml @@ -27,14 +27,10 @@ <string name="spoken_auto_correct_obscured" msgid="7769449372355268412">"<xliff:g id="KEY_NAME">%1$s</xliff:g> melakukan koreksi otomatis"</string> <string name="spoken_description_unknown" msgid="2382510329910793539">"Kode tombol %d"</string> <string name="spoken_description_shift" msgid="7209798151676638728">"Shift"</string> - <!-- no translation found for spoken_description_symbols_shift (3483198879916435717) --> - <skip /> - <!-- no translation found for spoken_description_shift_shifted (3122704922642232605) --> - <skip /> - <!-- no translation found for spoken_description_symbols_shift_shifted (5179175466878186081) --> - <skip /> - <!-- no translation found for spoken_description_caps_lock (1224851412185975036) --> - <skip /> + <string name="spoken_description_symbols_shift" msgid="3483198879916435717">"Simbol lainnya"</string> + <string name="spoken_description_shift_shifted" msgid="3122704922642232605">"Shift"</string> + <string name="spoken_description_symbols_shift_shifted" msgid="5179175466878186081">"Simbol"</string> + <string name="spoken_description_caps_lock" msgid="1224851412185975036">"Shift"</string> <string name="spoken_description_delete" msgid="3878902286264983302">"Hapus"</string> <string name="spoken_description_to_symbol" msgid="8244903740201126590">"Simbol"</string> <string name="spoken_description_to_alpha" msgid="4081215210530031950">"Huruf"</string> @@ -53,8 +49,7 @@ <string name="spoken_description_shiftmode_on" msgid="5107180516341258979">"Shift diaktifkan"</string> <string name="spoken_description_shiftmode_locked" msgid="7307477738053606881">"Caps lock diaktifkan"</string> <string name="spoken_description_mode_symbol" msgid="111186851131446691">"Mode simbol"</string> - <!-- no translation found for spoken_description_mode_symbol_shift (4305607977537665389) --> - <skip /> + <string name="spoken_description_mode_symbol_shift" msgid="4305607977537665389">"Mode simbol lainnya"</string> <string name="spoken_description_mode_alpha" msgid="4676004119618778911">"Mode huruf"</string> <string name="spoken_description_mode_phone" msgid="2061220553756692903">"Mode telepon"</string> <string name="spoken_description_mode_phone_shift" msgid="7879963803547701090">"Mode simbol telepon"</string> @@ -76,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Tempat"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simbol"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikon"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-it/strings-talkback-descriptions.xml b/java/res/values-it/strings-talkback-descriptions.xml index f1d0dae81..b59e873eb 100644 --- a/java/res/values-it/strings-talkback-descriptions.xml +++ b/java/res/values-it/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Luoghi"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simboli"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticon"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-iw/strings-talkback-descriptions.xml b/java/res/values-iw/strings-talkback-descriptions.xml index eee16eb0a..ed1ddb0bb 100644 --- a/java/res/values-iw/strings-talkback-descriptions.xml +++ b/java/res/values-iw/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"מקומות"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"סמלים"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"רגשונים"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ja/strings-talkback-descriptions.xml b/java/res/values-ja/strings-talkback-descriptions.xml index 24796037c..d76fa74a9 100644 --- a/java/res/values-ja/strings-talkback-descriptions.xml +++ b/java/res/values-ja/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"場所"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"記号"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"絵文字"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ka-rGE/strings-talkback-descriptions.xml b/java/res/values-ka-rGE/strings-talkback-descriptions.xml index dc6af527e..ae3734822 100644 --- a/java/res/values-ka-rGE/strings-talkback-descriptions.xml +++ b/java/res/values-ka-rGE/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"ადგილები"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"სიმბოლოები"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"სიცილაკები"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-km-rKH/strings-talkback-descriptions.xml b/java/res/values-km-rKH/strings-talkback-descriptions.xml index 7a2c71042..e7a2eb789 100644 --- a/java/res/values-km-rKH/strings-talkback-descriptions.xml +++ b/java/res/values-km-rKH/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"ទីកន្លែង"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"និមិត្តសញ្ញា"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"សញ្ញាអារម្មណ៍"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ko/strings-talkback-descriptions.xml b/java/res/values-ko/strings-talkback-descriptions.xml index c02976d89..e632753f3 100644 --- a/java/res/values-ko/strings-talkback-descriptions.xml +++ b/java/res/values-ko/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"장소"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"기호"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"이모티콘"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-lo-rLA/strings-talkback-descriptions.xml b/java/res/values-lo-rLA/strings-talkback-descriptions.xml index 4b9294c6e..abc8e645d 100644 --- a/java/res/values-lo-rLA/strings-talkback-descriptions.xml +++ b/java/res/values-lo-rLA/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"ສະຖານທີ່"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"ສັນຍາລັກ"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"ອີໂມຕິຄອນ"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-lt/strings-talkback-descriptions.xml b/java/res/values-lt/strings-talkback-descriptions.xml index 63b52a1d4..27abcea75 100644 --- a/java/res/values-lt/strings-talkback-descriptions.xml +++ b/java/res/values-lt/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Vietos"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simboliai"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Jaustukai"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-lv/strings-talkback-descriptions.xml b/java/res/values-lv/strings-talkback-descriptions.xml index 81a65c496..b3a861904 100644 --- a/java/res/values-lv/strings-talkback-descriptions.xml +++ b/java/res/values-lv/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Vietas"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simboli"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emocijzīmes"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-mn-rMN/strings-talkback-descriptions.xml b/java/res/values-mn-rMN/strings-talkback-descriptions.xml index fb0d382a8..201b84453 100644 --- a/java/res/values-mn-rMN/strings-talkback-descriptions.xml +++ b/java/res/values-mn-rMN/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Газар"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Симбол"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Эмотикон"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ms-rMY/strings-talkback-descriptions.xml b/java/res/values-ms-rMY/strings-talkback-descriptions.xml index e47b63909..28a1802b1 100644 --- a/java/res/values-ms-rMY/strings-talkback-descriptions.xml +++ b/java/res/values-ms-rMY/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Tempat"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simbol"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikon"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-nb/strings-talkback-descriptions.xml b/java/res/values-nb/strings-talkback-descriptions.xml index cdf80575a..bdecad143 100644 --- a/java/res/values-nb/strings-talkback-descriptions.xml +++ b/java/res/values-nb/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Steder"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symboler"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Smilefjes"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ne-rNP/strings-talkback-descriptions.xml b/java/res/values-ne-rNP/strings-talkback-descriptions.xml index d5bcea943..96d80773c 100644 --- a/java/res/values-ne-rNP/strings-talkback-descriptions.xml +++ b/java/res/values-ne-rNP/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"स्थानहरू"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"प्रतिकहरू"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"ईमोटिकन्स"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-nl/strings-talkback-descriptions.xml b/java/res/values-nl/strings-talkback-descriptions.xml index 7d61d5660..f8fa85aba 100644 --- a/java/res/values-nl/strings-talkback-descriptions.xml +++ b/java/res/values-nl/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Plaatsen"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symbolen"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticons"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-pl/strings-talkback-descriptions.xml b/java/res/values-pl/strings-talkback-descriptions.xml index da5f46b25..aba2250c6 100644 --- a/java/res/values-pl/strings-talkback-descriptions.xml +++ b/java/res/values-pl/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Miejsca"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symbole"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikony"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-pt-rPT/strings-talkback-descriptions.xml b/java/res/values-pt-rPT/strings-talkback-descriptions.xml index b49b58bc2..a8fcd9b63 100644 --- a/java/res/values-pt-rPT/strings-talkback-descriptions.xml +++ b/java/res/values-pt-rPT/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Locais"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Símbolos"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Ícones expressivos"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-pt/strings-talkback-descriptions.xml b/java/res/values-pt/strings-talkback-descriptions.xml index b9a70f397..d81f6865f 100644 --- a/java/res/values-pt/strings-talkback-descriptions.xml +++ b/java/res/values-pt/strings-talkback-descriptions.xml @@ -27,14 +27,10 @@ <string name="spoken_auto_correct_obscured" msgid="7769449372355268412">"<xliff:g id="KEY_NAME">%1$s</xliff:g> realiza correção automática"</string> <string name="spoken_description_unknown" msgid="2382510329910793539">"Código de tecla %d"</string> <string name="spoken_description_shift" msgid="7209798151676638728">"Shift"</string> - <!-- no translation found for spoken_description_symbols_shift (3483198879916435717) --> - <skip /> - <!-- no translation found for spoken_description_shift_shifted (3122704922642232605) --> - <skip /> - <!-- no translation found for spoken_description_symbols_shift_shifted (5179175466878186081) --> - <skip /> - <!-- no translation found for spoken_description_caps_lock (1224851412185975036) --> - <skip /> + <string name="spoken_description_symbols_shift" msgid="3483198879916435717">"Mais símbolos"</string> + <string name="spoken_description_shift_shifted" msgid="3122704922642232605">"Shift"</string> + <string name="spoken_description_symbols_shift_shifted" msgid="5179175466878186081">"Símbolos"</string> + <string name="spoken_description_caps_lock" msgid="1224851412185975036">"Shift"</string> <string name="spoken_description_delete" msgid="3878902286264983302">"Excluir"</string> <string name="spoken_description_to_symbol" msgid="8244903740201126590">"Símbolos"</string> <string name="spoken_description_to_alpha" msgid="4081215210530031950">"Letras"</string> @@ -53,8 +49,7 @@ <string name="spoken_description_shiftmode_on" msgid="5107180516341258979">"Shift ativado"</string> <string name="spoken_description_shiftmode_locked" msgid="7307477738053606881">"Caps Lock ativado"</string> <string name="spoken_description_mode_symbol" msgid="111186851131446691">"Modo de símbolos"</string> - <!-- no translation found for spoken_description_mode_symbol_shift (4305607977537665389) --> - <skip /> + <string name="spoken_description_mode_symbol_shift" msgid="4305607977537665389">"Modo mais símbolos"</string> <string name="spoken_description_mode_alpha" msgid="4676004119618778911">"Modo de letras"</string> <string name="spoken_description_mode_phone" msgid="2061220553756692903">"Modo de telefone"</string> <string name="spoken_description_mode_phone_shift" msgid="7879963803547701090">"Modo de símbolos do telefone"</string> @@ -76,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Lugares"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Símbolos"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticons"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ro/strings-talkback-descriptions.xml b/java/res/values-ro/strings-talkback-descriptions.xml index 8a6ceb315..540f2f235 100644 --- a/java/res/values-ro/strings-talkback-descriptions.xml +++ b/java/res/values-ro/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Locații"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simboluri"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emoticonuri"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-ru/strings-talkback-descriptions.xml b/java/res/values-ru/strings-talkback-descriptions.xml index b1cdbb20b..2c0e80df5 100644 --- a/java/res/values-ru/strings-talkback-descriptions.xml +++ b/java/res/values-ru/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Места."</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Символы."</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Смайлики."</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-sk/strings-talkback-descriptions.xml b/java/res/values-sk/strings-talkback-descriptions.xml index 9c0a85752..335a528d4 100644 --- a/java/res/values-sk/strings-talkback-descriptions.xml +++ b/java/res/values-sk/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Miesta"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symboly"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Emotikony"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-sl/strings-talkback-descriptions.xml b/java/res/values-sl/strings-talkback-descriptions.xml index 9cb296c27..40c9ebafc 100644 --- a/java/res/values-sl/strings-talkback-descriptions.xml +++ b/java/res/values-sl/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Mesta"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simboli"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Čustveni simboli"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-sr/strings-talkback-descriptions.xml b/java/res/values-sr/strings-talkback-descriptions.xml index 0f062ab70..b0c255c19 100644 --- a/java/res/values-sr/strings-talkback-descriptions.xml +++ b/java/res/values-sr/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Места"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Симболи"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Емотикони"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-sv/strings-talkback-descriptions.xml b/java/res/values-sv/strings-talkback-descriptions.xml index 062d337b4..149e90ee1 100644 --- a/java/res/values-sv/strings-talkback-descriptions.xml +++ b/java/res/values-sv/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Platser"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Symboler"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Uttryckssymboler"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-sw/strings-talkback-descriptions.xml b/java/res/values-sw/strings-talkback-descriptions.xml index 703dc4db7..028913a1f 100644 --- a/java/res/values-sw/strings-talkback-descriptions.xml +++ b/java/res/values-sw/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Maeneo"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Alama"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Vikaragosi"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-th/strings-talkback-descriptions.xml b/java/res/values-th/strings-talkback-descriptions.xml index 0a7133020..912708768 100644 --- a/java/res/values-th/strings-talkback-descriptions.xml +++ b/java/res/values-th/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"สถานที่"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"สัญลักษณ์"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"ไอคอนสื่ออารมณ์"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-tl/strings-talkback-descriptions.xml b/java/res/values-tl/strings-talkback-descriptions.xml index 4c34ad46f..1695a9dc4 100644 --- a/java/res/values-tl/strings-talkback-descriptions.xml +++ b/java/res/values-tl/strings-talkback-descriptions.xml @@ -27,14 +27,10 @@ <string name="spoken_auto_correct_obscured" msgid="7769449372355268412">"Nagsasagawa ang <xliff:g id="KEY_NAME">%1$s</xliff:g> ng auto-correction"</string> <string name="spoken_description_unknown" msgid="2382510329910793539">"Key code %d"</string> <string name="spoken_description_shift" msgid="7209798151676638728">"Shift"</string> - <!-- no translation found for spoken_description_symbols_shift (3483198879916435717) --> - <skip /> - <!-- no translation found for spoken_description_shift_shifted (3122704922642232605) --> - <skip /> - <!-- no translation found for spoken_description_symbols_shift_shifted (5179175466878186081) --> - <skip /> - <!-- no translation found for spoken_description_caps_lock (1224851412185975036) --> - <skip /> + <string name="spoken_description_symbols_shift" msgid="3483198879916435717">"Marami pang simbolo"</string> + <string name="spoken_description_shift_shifted" msgid="3122704922642232605">"Shift"</string> + <string name="spoken_description_symbols_shift_shifted" msgid="5179175466878186081">"Mga Simbolo"</string> + <string name="spoken_description_caps_lock" msgid="1224851412185975036">"Shift"</string> <string name="spoken_description_delete" msgid="3878902286264983302">"Tanggalin"</string> <string name="spoken_description_to_symbol" msgid="8244903740201126590">"Mga Simbolo"</string> <string name="spoken_description_to_alpha" msgid="4081215210530031950">"Mga Titik"</string> @@ -53,8 +49,7 @@ <string name="spoken_description_shiftmode_on" msgid="5107180516341258979">"Naka-enable ang shift"</string> <string name="spoken_description_shiftmode_locked" msgid="7307477738053606881">"Naka-enable ang caps lock"</string> <string name="spoken_description_mode_symbol" msgid="111186851131446691">"Symbols mode"</string> - <!-- no translation found for spoken_description_mode_symbol_shift (4305607977537665389) --> - <skip /> + <string name="spoken_description_mode_symbol_shift" msgid="4305607977537665389">"Mode na marami pang simbolo"</string> <string name="spoken_description_mode_alpha" msgid="4676004119618778911">"Letters mode"</string> <string name="spoken_description_mode_phone" msgid="2061220553756692903">"Phone mode"</string> <string name="spoken_description_mode_phone_shift" msgid="7879963803547701090">"Phone symbols mode"</string> @@ -76,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Mga Lugar"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Mga Simbolo"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Mga Emoticon"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-tr/strings-talkback-descriptions.xml b/java/res/values-tr/strings-talkback-descriptions.xml index 829fe6109..1b7ead8e1 100644 --- a/java/res/values-tr/strings-talkback-descriptions.xml +++ b/java/res/values-tr/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Yerler"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Simgeler"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"İfadeler"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-uk/strings-talkback-descriptions.xml b/java/res/values-uk/strings-talkback-descriptions.xml index ddb821436..847f09f6b 100644 --- a/java/res/values-uk/strings-talkback-descriptions.xml +++ b/java/res/values-uk/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Місця"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Символи"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Смайли"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-vi/strings-talkback-descriptions.xml b/java/res/values-vi/strings-talkback-descriptions.xml index 10a64a7ee..057adcb75 100644 --- a/java/res/values-vi/strings-talkback-descriptions.xml +++ b/java/res/values-vi/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Địa điểm"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Biểu tượng"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Biểu tượng cảm xúc"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-zh-rCN/strings-talkback-descriptions.xml b/java/res/values-zh-rCN/strings-talkback-descriptions.xml index 3d25cd1da..f49c3efc1 100644 --- a/java/res/values-zh-rCN/strings-talkback-descriptions.xml +++ b/java/res/values-zh-rCN/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"地点"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"符号"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"表情图标"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-zh-rHK/strings-talkback-descriptions.xml b/java/res/values-zh-rHK/strings-talkback-descriptions.xml index baa56e4cd..88f260432 100644 --- a/java/res/values-zh-rHK/strings-talkback-descriptions.xml +++ b/java/res/values-zh-rHK/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"地點"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"符號"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"表情符號"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-zh-rTW/strings-talkback-descriptions.xml b/java/res/values-zh-rTW/strings-talkback-descriptions.xml index d8a0cc4e7..c88f43b70 100644 --- a/java/res/values-zh-rTW/strings-talkback-descriptions.xml +++ b/java/res/values-zh-rTW/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"地點"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"符號"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"表情"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values-zu/strings-talkback-descriptions.xml b/java/res/values-zu/strings-talkback-descriptions.xml index 3f7ae7e50..8f1ad2bbe 100644 --- a/java/res/values-zu/strings-talkback-descriptions.xml +++ b/java/res/values-zu/strings-talkback-descriptions.xml @@ -71,4 +71,10 @@ <string name="spoken_descrption_emoji_category_places" msgid="1163315840948545317">"Izindawo"</string> <string name="spoken_descrption_emoji_category_symbols" msgid="474680659024880601">"Amasimbuli"</string> <string name="spoken_descrption_emoji_category_emoticons" msgid="456737544787823539">"Izithombe-mzwelo"</string> + <!-- no translation found for spoke_description_upper_case (397360656350553385) --> + <skip /> + <!-- no translation found for spoken_letter_0049 (4743162182646977944) --> + <skip /> + <!-- no translation found for spoken_letter_0130 (4766619646231612274) --> + <skip /> </resources> diff --git a/java/res/values/strings-talkback-descriptions.xml b/java/res/values/strings-talkback-descriptions.xml index 14455d088..d7978b0c8 100644 --- a/java/res/values/strings-talkback-descriptions.xml +++ b/java/res/values/strings-talkback-descriptions.xml @@ -128,11 +128,13 @@ <string name="spoken_descrption_emoji_category_emoticons">Emoticons</string> <!-- Description of an upper case letter of LOWER_LETTER. --> - <string name="spoke_description_upper_case">Capital <xliff:g id="LOWER_LETTER" example="A, E, ligature">%s</xliff:g></string> + <string name="spoken_description_upper_case">Capital <xliff:g id="LOWER_LETTER" example="A, E, ligature">%s</xliff:g></string> <!-- Spoken description for Unicode code point U+0049: "I" LATIN CAPITAL LETTER I Note that depending on locale, the lower-case of this letter is U+0069 or U+0131. --> <string name="spoken_letter_0049">Capital I</string> <!-- Spoken description for Unicode code point U+0130: "İ" LATIN CAPITAL LETTER I WITH DOT ABOVE Note that depending on locale, the lower-case of this letter is U+0069 or U+0131. --> <string name="spoken_letter_0130">Capital I, dot above</string> + <!-- Spoken description for unknown emoji code point. --> + <string name="spoken_emoji_unknown">Unknown emoji</string> </resources> diff --git a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java index d50dd3ee6..27896fd11 100644 --- a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java +++ b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java @@ -114,7 +114,7 @@ public final class AccessibilityUtils { * @param event The event to check. * @return {@true} is the event is a touch exploration event */ - public boolean isTouchExplorationEvent(final MotionEvent event) { + public static boolean isTouchExplorationEvent(final MotionEvent event) { final int action = event.getAction(); return action == MotionEvent.ACTION_HOVER_ENTER || action == MotionEvent.ACTION_HOVER_EXIT diff --git a/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java b/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java index 2c87fc1e9..58672ace7 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java +++ b/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java @@ -285,15 +285,14 @@ public final class KeyCodeDescriptionMapper { if (index >= 0) { return context.getString(mKeyCodeMap.valueAt(index)); } - final String accentedLetter = getSpokenAccentedLetterDescriptionId(context, code); + final String accentedLetter = getSpokenAccentedLetterDescription(context, code); if (accentedLetter != null) { return accentedLetter; } - // Here, <code>code</code> may be a base letter. - final int spokenEmojiId = getSpokenDescriptionId( - context, code, SPOKEN_EMOJI_RESOURCE_NAME_FORMAT); - if (spokenEmojiId != 0) { - return context.getString(spokenEmojiId); + // Here, <code>code</code> may be a base (non-accented) letter. + final String emojiDescription = getSpokenEmojiDescription(context, code); + if (emojiDescription != null) { + return emojiDescription; } if (isDefinedNonCtrl) { return Character.toString((char) code); @@ -304,7 +303,7 @@ public final class KeyCodeDescriptionMapper { return context.getString(R.string.spoken_description_unknown, code); } - private String getSpokenAccentedLetterDescriptionId(final Context context, final int code) { + private String getSpokenAccentedLetterDescription(final Context context, final int code) { final boolean isUpperCase = Character.isUpperCase(code); final int baseCode = isUpperCase ? Character.toLowerCase(code) : code; final int baseIndex = mKeyCodeMap.indexOfKey(baseCode); @@ -314,7 +313,17 @@ public final class KeyCodeDescriptionMapper { return null; } final String spokenText = context.getString(resId); - return isUpperCase ? context.getString(R.string.spoke_description_upper_case, spokenText) + return isUpperCase ? context.getString(R.string.spoken_description_upper_case, spokenText) + : spokenText; + } + + private String getSpokenEmojiDescription(final Context context, final int code) { + final int resId = getSpokenDescriptionId(context, code, SPOKEN_EMOJI_RESOURCE_NAME_FORMAT); + if (resId == 0) { + return null; + } + final String spokenText = context.getString(resId); + return TextUtils.isEmpty(spokenText) ? context.getString(R.string.spoken_emoji_unknown) : spokenText; } diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java index eed40f4a9..0ebad9774 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java +++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java @@ -16,6 +16,7 @@ package com.android.inputmethod.accessibility; +import android.content.Context; import android.os.SystemClock; import android.support.v4.view.AccessibilityDelegateCompat; import android.support.v4.view.ViewCompat; @@ -37,7 +38,7 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView> protected final KeyDetector mKeyDetector; private Keyboard mKeyboard; private KeyboardAccessibilityNodeProvider mAccessibilityNodeProvider; - private Key mLastHoverKey; + private Key mCurrentHoverKey; public KeyboardAccessibilityDelegate(final KV keyboardView, final KeyDetector keyDetector) { super(); @@ -70,6 +71,19 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView> } /** + * Sends a window state change event with the specified string resource id. + * + * @param resId The string resource id of the text to send with the event. + */ + protected void sendWindowStateChanged(final int resId) { + if (resId == 0) { + return; + } + final Context context = mKeyboardView.getContext(); + sendWindowStateChanged(context.getString(resId)); + } + + /** * Sends a window state change event with the specified text. * * @param text The text to send with the event. @@ -117,14 +131,14 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView> * Receives hover events when touch exploration is turned on in SDK versions ICS and higher. * * @param event The hover event. - * @return {@code true} if the event is handled + * @return {@code true} if the event is handled. */ - public boolean dispatchHoverEvent(final MotionEvent event) { + public boolean onHoverEvent(final MotionEvent event) { final int x = (int) event.getX(); final int y = (int) event.getY(); - final Key previousKey = mLastHoverKey; + final Key previousKey = mCurrentHoverKey; final Key key = mKeyDetector.detectHitKey(x, y); - mLastHoverKey = key; + mCurrentHoverKey = key; switch (event.getAction()) { case MotionEvent.ACTION_HOVER_EXIT: @@ -133,17 +147,30 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView> if (key != null) { final long downTime = simulateKeyPress(key); simulateKeyRelease(key, downTime); + onHoverExitKey(key); } - //$FALL-THROUGH$ + mCurrentHoverKey = null; + break; case MotionEvent.ACTION_HOVER_ENTER: - return onHoverKey(key, event); + if (key != null) { + onHoverEnterKey(key); + } + break; case MotionEvent.ACTION_HOVER_MOVE: if (key != previousKey) { - return onTransitionKey(key, previousKey, event); + if (previousKey != null) { + onHoverExitKey(previousKey); + } + if (key != null) { + onHoverEnterKey(key); + } + } + if (key != null) { + onHoverMoveKey(key); } - return onHoverKey(key, event); + break; } - return false; + return true; } /** @@ -151,6 +178,7 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView> * This avoids the complexity of trackers and listeners within the keyboard. * * @param key The key to press. + * @return the event time of the simulated key press. */ private long simulateKeyPress(final Key key) { final int x = key.getHitBox().centerX(); @@ -168,6 +196,7 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView> * This avoids the complexity of trackers and listeners within the keyboard. * * @param key The key to release. + * @param downTime the event time of the key press. */ private void simulateKeyRelease(final Key key, final long downTime) { final int x = key.getHitBox().centerX(); @@ -179,54 +208,30 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView> } /** - * Simulates a transition between two {@link Key}s by sending a HOVER_EXIT on the previous key, - * a HOVER_ENTER on the current key, and a HOVER_MOVE on the current key. + * Handles a hover enter event on a key. * - * @param currentKey The currently hovered key. - * @param previousKey The previously hovered key. - * @param event The event that triggered the transition. - * @return {@code true} if the event was handled. + * @param key The currently hovered key. */ - private boolean onTransitionKey(final Key currentKey, final Key previousKey, - final MotionEvent event) { - final int savedAction = event.getAction(); - event.setAction(MotionEvent.ACTION_HOVER_EXIT); - onHoverKey(previousKey, event); - event.setAction(MotionEvent.ACTION_HOVER_ENTER); - onHoverKey(currentKey, event); - event.setAction(MotionEvent.ACTION_HOVER_MOVE); - final boolean handled = onHoverKey(currentKey, event); - event.setAction(savedAction); - return handled; + protected void onHoverEnterKey(final Key key) { + final KeyboardAccessibilityNodeProvider provider = getAccessibilityNodeProvider(); + provider.sendAccessibilityEventForKey(key, AccessibilityEventCompat.TYPE_VIEW_HOVER_ENTER); + provider.performActionForKey(key, AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS); } /** - * Handles a hover event on a key. If {@link Key} extended View, this would be analogous to - * calling View.onHoverEvent(MotionEvent). + * Handles a hover move event on a key. * * @param key The currently hovered key. - * @param event The hover event. - * @return {@code true} if the event was handled. */ - private boolean onHoverKey(final Key key, final MotionEvent event) { - // Null keys can't receive events. - if (key == null) { - return false; - } - final KeyboardAccessibilityNodeProvider provider = getAccessibilityNodeProvider(); + protected void onHoverMoveKey(final Key key) { } - switch (event.getAction()) { - case MotionEvent.ACTION_HOVER_ENTER: - provider.sendAccessibilityEventForKey( - key, AccessibilityEventCompat.TYPE_VIEW_HOVER_ENTER); - provider.performActionForKey( - key, AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS, null); - break; - case MotionEvent.ACTION_HOVER_EXIT: - provider.sendAccessibilityEventForKey( - key, AccessibilityEventCompat.TYPE_VIEW_HOVER_EXIT); - break; - } - return true; + /** + * Handles a hover exit event on a key. + * + * @param key The currently hovered key. + */ + protected void onHoverExitKey(final Key key) { + final KeyboardAccessibilityNodeProvider provider = getAccessibilityNodeProvider(); + provider.sendAccessibilityEventForKey(key, AccessibilityEventCompat.TYPE_VIEW_HOVER_EXIT); } } diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java index cddd1c7ed..a6997e2f9 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java +++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java @@ -134,7 +134,7 @@ public final class KeyboardAccessibilityNodeProvider extends AccessibilityNodePr event.setClassName(key.getClass().getName()); event.setContentDescription(keyDescription); event.setEnabled(true); - final AccessibilityRecordCompat record = new AccessibilityRecordCompat(event); + final AccessibilityRecordCompat record = AccessibilityEventCompat.asRecord(event); record.setSource(mKeyboardView, virtualViewId); return event; } @@ -229,7 +229,7 @@ public final class KeyboardAccessibilityNodeProvider extends AccessibilityNodePr if (key == null) { return false; } - return performActionForKey(key, action, arguments); + return performActionForKey(key, action); } /** @@ -237,25 +237,16 @@ public final class KeyboardAccessibilityNodeProvider extends AccessibilityNodePr * * @param key The on which to perform the action. * @param action The action to perform. - * @param arguments The action's arguments. * @return The result of performing the action, or false if the action is not supported. */ - boolean performActionForKey(final Key key, final int action, final Bundle arguments) { - final int virtualViewId = getVirtualViewIdOf(key); - + boolean performActionForKey(final Key key, final int action) { switch (action) { case AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS: - if (mAccessibilityFocusedView == virtualViewId) { - return false; - } - mAccessibilityFocusedView = virtualViewId; + mAccessibilityFocusedView = getVirtualViewIdOf(key); sendAccessibilityEventForKey( key, AccessibilityEventCompat.TYPE_VIEW_ACCESSIBILITY_FOCUSED); return true; case AccessibilityNodeInfoCompat.ACTION_CLEAR_ACCESSIBILITY_FOCUS: - if (mAccessibilityFocusedView != virtualViewId) { - return false; - } mAccessibilityFocusedView = UNDEFINED; sendAccessibilityEventForKey( key, AccessibilityEventCompat.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED); diff --git a/java/src/com/android/inputmethod/accessibility/MainKeyboardAccessibilityDelegate.java b/java/src/com/android/inputmethod/accessibility/MainKeyboardAccessibilityDelegate.java index 443f793a1..ec6bb0156 100644 --- a/java/src/com/android/inputmethod/accessibility/MainKeyboardAccessibilityDelegate.java +++ b/java/src/com/android/inputmethod/accessibility/MainKeyboardAccessibilityDelegate.java @@ -163,17 +163,13 @@ public final class MainKeyboardAccessibilityDelegate default: return; } - final String text = mKeyboardView.getContext().getString(resId); - sendWindowStateChanged(text); + sendWindowStateChanged(resId); } /** * Announces that the keyboard has been hidden. */ private void announceKeyboardHidden() { - final Context context = mKeyboardView.getContext(); - final String text = context.getString(R.string.announce_keyboard_hidden); - - sendWindowStateChanged(text); + sendWindowStateChanged(R.string.announce_keyboard_hidden); } } diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 22c6b6e0a..f291a7ed0 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -763,19 +763,14 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack } /** - * Receives hover events from the input framework. - * - * @param event The motion event to be dispatched. - * @return {@code true} if the event was handled by the view, {@code false} - * otherwise + * {@inheritDoc} */ @Override - public boolean dispatchHoverEvent(final MotionEvent event) { - if (!AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { - // Reflection doesn't support calling superclass methods. - return false; + public boolean onHoverEvent(final MotionEvent event) { + if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { + return mAccessibilityDelegate.onHoverEvent(event); } - return mAccessibilityDelegate.dispatchHoverEvent(event); + return super.onHoverEvent(event); } public void updateShortcutKey(final boolean available) { diff --git a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPageKeyboardView.java b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPageKeyboardView.java index 4d74ea989..0166802a4 100644 --- a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPageKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPageKeyboardView.java @@ -83,13 +83,15 @@ final class EmojiPageKeyboardView extends KeyboardView implements mKeyDetector.setKeyboard(keyboard, 0 /* correctionX */, 0 /* correctionY */); } + /** + * {@inheritDoc} + */ @Override - public boolean dispatchHoverEvent(final MotionEvent event) { - if (!AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { - // Reflection doesn't support calling superclass methods. - return false; + public boolean onHoverEvent(final MotionEvent event) { + if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { + return mAccessibilityDelegate.onHoverEvent(event); } - return mAccessibilityDelegate.dispatchHoverEvent(event); + return super.onHoverEvent(event); } /** diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index 97f262989..fd34b98f4 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -183,9 +183,9 @@ public final class BinaryDictionary extends Dictionary { private static native void getHeaderInfoNative(long dict, int[] outHeaderSize, int[] outFormatVersion, ArrayList<int[]> outAttributeKeys, ArrayList<int[]> outAttributeValues); - private static native void flushNative(long dict, String filePath); + private static native boolean flushNative(long dict, String filePath); private static native boolean needsToRunGCNative(long dict, boolean mindsBlockByGC); - private static native void flushWithGCNative(long dict, String filePath); + private static native boolean flushWithGCNative(long dict, String filePath); private static native void closeNative(long dict); private static native int getFormatVersionNative(long dict); private static native int getProbabilityNative(long dict, int[] word); @@ -203,12 +203,12 @@ public final class BinaryDictionary extends Dictionary { int[] outputSuggestionCount, int[] outputCodePoints, int[] outputScores, int[] outputIndices, int[] outputTypes, int[] outputAutoCommitFirstWordConfidence, float[] inOutLanguageWeight); - private static native void addUnigramWordNative(long dict, int[] word, int probability, + private static native boolean addUnigramWordNative(long dict, int[] word, int probability, int[] shortcutTarget, int shortcutProbability, boolean isBeginningOfSentence, boolean isNotAWord, boolean isBlacklisted, int timestamp); - private static native void addBigramWordsNative(long dict, int[] word0, + private static native boolean addBigramWordsNative(long dict, int[] word0, boolean isBeginningOfSentence, int[] word1, int probability, int timestamp); - private static native void removeBigramWordsNative(long dict, int[] word0, + private static native boolean removeBigramWordsNative(long dict, int[] word0, boolean isBeginningOfSentence, int[] word1); private static native int addMultipleDictionaryEntriesNative(long dict, LanguageModelParam[] languageModelParams, int startIndex); @@ -417,45 +417,53 @@ public final class BinaryDictionary extends Dictionary { } // Add a unigram entry to binary dictionary with unigram attributes in native code. - public void addUnigramEntry(final String word, final int probability, + public boolean addUnigramEntry(final String word, final int probability, final String shortcutTarget, final int shortcutProbability, final boolean isBeginningOfSentence, final boolean isNotAWord, final boolean isBlacklisted, final int timestamp) { if (word == null || (word.isEmpty() && !isBeginningOfSentence)) { - return; + return false; } final int[] codePoints = StringUtils.toCodePointArray(word); final int[] shortcutTargetCodePoints = (shortcutTarget != null) ? StringUtils.toCodePointArray(shortcutTarget) : null; - addUnigramWordNative(mNativeDict, codePoints, probability, shortcutTargetCodePoints, - shortcutProbability, isBeginningOfSentence, isNotAWord, isBlacklisted, timestamp); + if (!addUnigramWordNative(mNativeDict, codePoints, probability, shortcutTargetCodePoints, + shortcutProbability, isBeginningOfSentence, isNotAWord, isBlacklisted, timestamp)) { + return false; + } mHasUpdated = true; + return true; } // Add an n-gram entry to the binary dictionary with timestamp in native code. - public void addNgramEntry(final PrevWordsInfo prevWordsInfo, final String word, - final int probability, - final int timestamp) { + public boolean addNgramEntry(final PrevWordsInfo prevWordsInfo, final String word, + final int probability, final int timestamp) { if (!prevWordsInfo.isValid() || TextUtils.isEmpty(word)) { - return; + return false; } final int[] codePoints0 = StringUtils.toCodePointArray(prevWordsInfo.mPrevWord); final int[] codePoints1 = StringUtils.toCodePointArray(word); - addBigramWordsNative(mNativeDict, codePoints0, prevWordsInfo.mIsBeginningOfSentence, - codePoints1, probability, timestamp); + if (!addBigramWordsNative(mNativeDict, codePoints0, prevWordsInfo.mIsBeginningOfSentence, + codePoints1, probability, timestamp)) { + return false; + } mHasUpdated = true; + return true; } // Remove an n-gram entry from the binary dictionary in native code. - public void removeNgramEntry(final PrevWordsInfo prevWordsInfo, final String word) { + public boolean removeNgramEntry(final PrevWordsInfo prevWordsInfo, final String word) { if (!prevWordsInfo.isValid() || TextUtils.isEmpty(word)) { - return; + return false; } final int[] codePoints0 = StringUtils.toCodePointArray(prevWordsInfo.mPrevWord); final int[] codePoints1 = StringUtils.toCodePointArray(word); - removeBigramWordsNative(mNativeDict, codePoints0, prevWordsInfo.mIsBeginningOfSentence, - codePoints1); + if (!removeBigramWordsNative(mNativeDict, codePoints0, prevWordsInfo.mIsBeginningOfSentence, + codePoints1)) { + return false; + } mHasUpdated = true; + return true; } public void addMultipleDictionaryEntries(final LanguageModelParam[] languageModelParams) { @@ -485,26 +493,33 @@ public final class BinaryDictionary extends Dictionary { } // Flush to dict file if the dictionary has been updated. - public void flush() { - if (!isValidDictionary()) return; + public boolean flush() { + if (!isValidDictionary()) return false; if (mHasUpdated) { - flushNative(mNativeDict, mDictFilePath); + if (!flushNative(mNativeDict, mDictFilePath)) { + return false; + } reopen(); } + return true; } // Run GC and flush to dict file if the dictionary has been updated. - public void flushWithGCIfHasUpdated() { + public boolean flushWithGCIfHasUpdated() { if (mHasUpdated) { - flushWithGC(); + return flushWithGC(); } + return true; } // Run GC and flush to dict file. - public void flushWithGC() { - if (!isValidDictionary()) return; - flushWithGCNative(mNativeDict, mDictFilePath); + public boolean flushWithGC() { + if (!isValidDictionary()) return false; + if (!flushWithGCNative(mNativeDict, mDictFilePath)) { + return false; + } reopen(); + return true; } /** diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java index 4cb920f37..7fa3d0479 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java @@ -408,7 +408,7 @@ public class DictionaryFacilitator { if (userHistoryDictionary == null) { return; } - final int maxFreq = getMaxFrequency(word); + final int maxFreq = getFrequency(word); if (maxFreq == 0 && blockPotentiallyOffensive) { return; } @@ -516,7 +516,7 @@ public class DictionaryFacilitator { return false; } - private int getMaxFrequency(final String word) { + public int getFrequency(final String word) { if (TextUtils.isEmpty(word)) { return Dictionary.NOT_A_PROBABILITY; } diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index 95ff8c6e3..b10bae01a 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -298,8 +298,10 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { protected void addUnigramLocked(final String word, final int frequency, final String shortcutTarget, final int shortcutFreq, final boolean isNotAWord, final boolean isBlacklisted, final int timestamp) { - mBinaryDictionary.addUnigramEntry(word, frequency, shortcutTarget, shortcutFreq, - false /* isBeginningOfSentence */, isNotAWord, isBlacklisted, timestamp); + if (!mBinaryDictionary.addUnigramEntry(word, frequency, shortcutTarget, shortcutFreq, + false /* isBeginningOfSentence */, isNotAWord, isBlacklisted, timestamp)) { + Log.e(TAG, "Cannot add unigram entry. word: " + word); + } } /** @@ -322,7 +324,11 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { protected void addNgramEntryLocked(final PrevWordsInfo prevWordsInfo, final String word, final int frequency, final int timestamp) { - mBinaryDictionary.addNgramEntry(prevWordsInfo, word, frequency, timestamp); + if (!mBinaryDictionary.addNgramEntry(prevWordsInfo, word, frequency, timestamp)) { + Log.e(TAG, "Cannot add n-gram entry."); + Log.e(TAG, " PrevWordsInfo: " + prevWordsInfo); + Log.e(TAG, " word: " + word); + } } /** diff --git a/java/src/com/android/inputmethod/latin/PrevWordsInfo.java b/java/src/com/android/inputmethod/latin/PrevWordsInfo.java index e44239f1d..42b311c69 100644 --- a/java/src/com/android/inputmethod/latin/PrevWordsInfo.java +++ b/java/src/com/android/inputmethod/latin/PrevWordsInfo.java @@ -53,4 +53,10 @@ public class PrevWordsInfo { public boolean isValid() { return mPrevWord != null; } + + @Override + public String toString() { + return "PrevWord: " + mPrevWord + ", isBeginningOfSentence: " + + mIsBeginningOfSentence + "."; + } } diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java index e90b15ca5..346aea34a 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java +++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java @@ -23,23 +23,17 @@ import android.graphics.drawable.Drawable; import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.keyboard.Keyboard; -import com.android.inputmethod.keyboard.KeyboardActionListener; import com.android.inputmethod.keyboard.internal.KeyboardBuilder; import com.android.inputmethod.keyboard.internal.KeyboardIconsSet; import com.android.inputmethod.keyboard.internal.KeyboardParams; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SuggestedWords; -import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.utils.TypefaceUtils; public final class MoreSuggestions extends Keyboard { public final SuggestedWords mSuggestedWords; - public static abstract class MoreSuggestionsListener extends KeyboardActionListener.Adapter { - public abstract void onSuggestionSelected(final int index, final SuggestedWordInfo info); - } - MoreSuggestions(final MoreSuggestionsParam params, final SuggestedWords suggestedWords) { super(params); mSuggestedWords = suggestedWords; diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java index 7fd64c4bf..aa59db678 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java @@ -22,11 +22,12 @@ import android.util.Log; import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.keyboard.Keyboard; +import com.android.inputmethod.keyboard.KeyboardActionListener; import com.android.inputmethod.keyboard.MoreKeysKeyboardView; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SuggestedWords; +import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestionKey; -import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestionsListener; /** * A view that renders a virtual {@link MoreSuggestions}. It handles rendering of keys and detecting @@ -35,6 +36,10 @@ import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestions public final class MoreSuggestionsView extends MoreKeysKeyboardView { private static final String TAG = MoreSuggestionsView.class.getSimpleName(); + public static abstract class MoreSuggestionsListener extends KeyboardActionListener.Adapter { + public abstract void onSuggestionSelected(final int index, final SuggestedWordInfo info); + } + public MoreSuggestionsView(final Context context, final AttributeSet attrs) { this(context, attrs, R.attr.moreKeysKeyboardViewStyle); } diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 5af724fa6..c400f66c8 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -49,7 +49,7 @@ import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethod.latin.settings.Settings; -import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestionsListener; +import com.android.inputmethod.latin.suggestions.MoreSuggestionsView.MoreSuggestionsListener; import com.android.inputmethod.latin.utils.ImportantNoticeUtils; import com.android.inputmethod.research.ResearchLogger; diff --git a/java/src/com/android/inputmethod/latin/utils/DistracterFilterUsingSuggestion.java b/java/src/com/android/inputmethod/latin/utils/DistracterFilterUsingSuggestion.java index 1c93a9105..ac0ab28bf 100644 --- a/java/src/com/android/inputmethod/latin/utils/DistracterFilterUsingSuggestion.java +++ b/java/src/com/android/inputmethod/latin/utils/DistracterFilterUsingSuggestion.java @@ -33,6 +33,7 @@ import com.android.inputmethod.keyboard.Keyboard; import com.android.inputmethod.keyboard.KeyboardId; import com.android.inputmethod.keyboard.KeyboardLayoutSet; import com.android.inputmethod.latin.Constants; +import com.android.inputmethod.latin.Dictionary; import com.android.inputmethod.latin.DictionaryFacilitator; import com.android.inputmethod.latin.PrevWordsInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; @@ -98,10 +99,12 @@ public class DistracterFilterUsingSuggestion implements DistracterFilter { } } - private static boolean isDistracter( + private boolean isDistracter( final SuggestionResults suggestionResults, final String consideredWord) { + int perfectMatchProbability = Dictionary.NOT_A_PROBABILITY; for (final SuggestedWordInfo suggestedWordInfo : suggestionResults) { if (suggestedWordInfo.mWord.equals(consideredWord)) { + perfectMatchProbability = mDictionaryFacilitator.getFrequency(consideredWord); continue; } // Exact match can include case errors, accent errors, digraph conversions. @@ -121,6 +124,17 @@ public class DistracterFilterUsingSuggestion implements DistracterFilter { Log.d(TAG, "isExactMatchWithIntentionalOmission: " + isExactMatchWithIntentionalOmission); } + if (perfectMatchProbability != Dictionary.NOT_A_PROBABILITY) { + final int topNonPerfectProbability = mDictionaryFacilitator.getFrequency( + suggestedWordInfo.mWord); + if (DEBUG) { + Log.d(TAG, "perfectMatchProbability: " + perfectMatchProbability); + Log.d(TAG, "topNonPerfectProbability: " + topNonPerfectProbability); + } + if (perfectMatchProbability > topNonPerfectProbability) { + return false; + } + } return isExactMatch || isExactMatchWithIntentionalOmission; } return false; diff --git a/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java b/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java index 7b678e175..c08697c4b 100644 --- a/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/ExecutorUtils.java @@ -28,14 +28,14 @@ public class ExecutorUtils { new ConcurrentHashMap<>(); /** - * Gets the executor for the given dictionary name. + * Gets the executor for the given id. */ - public static PrioritizedSerialExecutor getExecutor(final String dictName) { - PrioritizedSerialExecutor executor = sExecutorMap.get(dictName); + public static PrioritizedSerialExecutor getExecutor(final String id) { + PrioritizedSerialExecutor executor = sExecutorMap.get(id); if (executor == null) { synchronized(sExecutorMap) { - executor = new PrioritizedSerialExecutor(); - sExecutorMap.put(dictName, executor); + executor = new PrioritizedSerialExecutor(id); + sExecutorMap.put(id, executor); } } return executor; diff --git a/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java b/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java index 148f3bce6..21949ffbd 100644 --- a/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java +++ b/java/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutor.java @@ -21,6 +21,7 @@ import com.android.inputmethod.annotations.UsedForTesting; import java.util.Queue; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; @@ -40,12 +41,26 @@ public class PrioritizedSerialExecutor { // The task which is running now. private Runnable mActive; - public PrioritizedSerialExecutor() { + private static class ThreadFactoryWithId implements ThreadFactory { + private final String mId; + + public ThreadFactoryWithId(final String id) { + mId = id; + } + + @Override + public Thread newThread(final Runnable r) { + return new Thread(r, TAG + " - " + mId); + } + } + + public PrioritizedSerialExecutor(final String id) { mTasks = new ConcurrentLinkedQueue<>(); mPrioritizedTasks = new ConcurrentLinkedQueue<>(); mIsShutdown = false; mThreadPoolExecutor = new ThreadPoolExecutor(1 /* corePoolSize */, 1 /* maximumPoolSize */, - 0 /* keepAliveTime */, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1)); + 0 /* keepAliveTime */, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(1), + new ThreadFactoryWithId(id)); } /** diff --git a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp index e41fe1d43..d6a6196d2 100644 --- a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp +++ b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp @@ -95,15 +95,15 @@ static jlong latinime_BinaryDictionary_createOnMemory(JNIEnv *env, jclass clazz, return reinterpret_cast<jlong>(dictionary); } -static void latinime_BinaryDictionary_flush(JNIEnv *env, jclass clazz, jlong dict, +static bool latinime_BinaryDictionary_flush(JNIEnv *env, jclass clazz, jlong dict, jstring filePath) { Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); - if (!dictionary) return; + if (!dictionary) return false; const jsize filePathUtf8Length = env->GetStringUTFLength(filePath); char filePathChars[filePathUtf8Length + 1]; env->GetStringUTFRegion(filePath, 0, env->GetStringLength(filePath), filePathChars); filePathChars[filePathUtf8Length] = '\0'; - dictionary->flush(filePathChars); + return dictionary->flush(filePathChars); } static bool latinime_BinaryDictionary_needsToRunGC(JNIEnv *env, jclass clazz, @@ -113,15 +113,15 @@ static bool latinime_BinaryDictionary_needsToRunGC(JNIEnv *env, jclass clazz, return dictionary->needsToRunGC(mindsBlockByGC == JNI_TRUE); } -static void latinime_BinaryDictionary_flushWithGC(JNIEnv *env, jclass clazz, jlong dict, +static bool latinime_BinaryDictionary_flushWithGC(JNIEnv *env, jclass clazz, jlong dict, jstring filePath) { Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); - if (!dictionary) return; + if (!dictionary) return false; const jsize filePathUtf8Length = env->GetStringUTFLength(filePath); char filePathChars[filePathUtf8Length + 1]; env->GetStringUTFRegion(filePath, 0, env->GetStringLength(filePath), filePathChars); filePathChars[filePathUtf8Length] = '\0'; - dictionary->flushWithGC(filePathChars); + return dictionary->flushWithGC(filePathChars); } static void latinime_BinaryDictionary_close(JNIEnv *env, jclass clazz, jlong dict) { @@ -324,13 +324,13 @@ static void latinime_BinaryDictionary_getWordProperty(JNIEnv *env, jclass clazz, outShortcutProbabilities); } -static void latinime_BinaryDictionary_addUnigramWord(JNIEnv *env, jclass clazz, jlong dict, +static bool latinime_BinaryDictionary_addUnigramWord(JNIEnv *env, jclass clazz, jlong dict, jintArray word, jint probability, jintArray shortcutTarget, jint shortcutProbability, jboolean isBeginningOfSentence, jboolean isNotAWord, jboolean isBlacklisted, jint timestamp) { Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); if (!dictionary) { - return; + return false; } jsize codePointCount = env->GetArrayLength(word); int codePoints[codePointCount]; @@ -344,15 +344,15 @@ static void latinime_BinaryDictionary_addUnigramWord(JNIEnv *env, jclass clazz, // Use 1 for count to indicate the word has inputted. const UnigramProperty unigramProperty(isBeginningOfSentence, isNotAWord, isBlacklisted, probability, timestamp, 0 /* level */, 1 /* count */, &shortcuts); - dictionary->addUnigramEntry(codePoints, codePointCount, &unigramProperty); + return dictionary->addUnigramEntry(codePoints, codePointCount, &unigramProperty); } -static void latinime_BinaryDictionary_addBigramWords(JNIEnv *env, jclass clazz, jlong dict, +static bool latinime_BinaryDictionary_addBigramWords(JNIEnv *env, jclass clazz, jlong dict, jintArray word0, jboolean isBeginningOfSentence, jintArray word1, jint probability, jint timestamp) { Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); if (!dictionary) { - return; + return false; } jsize word0Length = env->GetArrayLength(word0); int word0CodePoints[word0Length]; @@ -366,14 +366,14 @@ static void latinime_BinaryDictionary_addBigramWords(JNIEnv *env, jclass clazz, const BigramProperty bigramProperty(&bigramTargetCodePoints, probability, timestamp, 0 /* level */, 1 /* count */); const PrevWordsInfo prevWordsInfo(word0CodePoints, word0Length, isBeginningOfSentence); - dictionary->addNgramEntry(&prevWordsInfo, &bigramProperty); + return dictionary->addNgramEntry(&prevWordsInfo, &bigramProperty); } -static void latinime_BinaryDictionary_removeBigramWords(JNIEnv *env, jclass clazz, jlong dict, +static bool latinime_BinaryDictionary_removeBigramWords(JNIEnv *env, jclass clazz, jlong dict, jintArray word0, jboolean isBeginningOfSentence, jintArray word1) { Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); if (!dictionary) { - return; + return false; } jsize word0Length = env->GetArrayLength(word0); int word0CodePoints[word0Length]; @@ -382,7 +382,7 @@ static void latinime_BinaryDictionary_removeBigramWords(JNIEnv *env, jclass claz int word1CodePoints[word1Length]; env->GetIntArrayRegion(word1, 0, word1Length, word1CodePoints); const PrevWordsInfo prevWordsInfo(word0CodePoints, word0Length, isBeginningOfSentence); - dictionary->removeNgramEntry(&prevWordsInfo, word1CodePoints, word1Length); + return dictionary->removeNgramEntry(&prevWordsInfo, word1CodePoints, word1Length); } // Returns how many language model params are processed. @@ -610,7 +610,7 @@ static const JNINativeMethod sMethods[] = { }, { const_cast<char *>("flushNative"), - const_cast<char *>("(JLjava/lang/String;)V"), + const_cast<char *>("(JLjava/lang/String;)Z"), reinterpret_cast<void *>(latinime_BinaryDictionary_flush) }, { @@ -620,7 +620,7 @@ static const JNINativeMethod sMethods[] = { }, { const_cast<char *>("flushWithGCNative"), - const_cast<char *>("(JLjava/lang/String;)V"), + const_cast<char *>("(JLjava/lang/String;)Z"), reinterpret_cast<void *>(latinime_BinaryDictionary_flushWithGC) }, { @@ -651,17 +651,17 @@ static const JNINativeMethod sMethods[] = { }, { const_cast<char *>("addUnigramWordNative"), - const_cast<char *>("(J[II[IIZZZI)V"), + const_cast<char *>("(J[II[IIZZZI)Z"), reinterpret_cast<void *>(latinime_BinaryDictionary_addUnigramWord) }, { const_cast<char *>("addBigramWordsNative"), - const_cast<char *>("(J[IZ[III)V"), + const_cast<char *>("(J[IZ[III)Z"), reinterpret_cast<void *>(latinime_BinaryDictionary_addBigramWords) }, { const_cast<char *>("removeBigramWordsNative"), - const_cast<char *>("(J[IZ[I)V"), + const_cast<char *>("(J[IZ[I)Z"), reinterpret_cast<void *>(latinime_BinaryDictionary_removeBigramWords) }, { diff --git a/native/jni/src/suggest/core/dictionary/dictionary.cpp b/native/jni/src/suggest/core/dictionary/dictionary.cpp index bcf7d5905..898b44f44 100644 --- a/native/jni/src/suggest/core/dictionary/dictionary.cpp +++ b/native/jni/src/suggest/core/dictionary/dictionary.cpp @@ -80,38 +80,38 @@ int Dictionary::getBigramProbability(const PrevWordsInfo *const prevWordsInfo, c return mBigramDictionary.getBigramProbability(prevWordsInfo, word, length); } -void Dictionary::addUnigramEntry(const int *const word, const int length, +bool Dictionary::addUnigramEntry(const int *const word, const int length, const UnigramProperty *const unigramProperty) { if (unigramProperty->representsBeginningOfSentence() && !mDictionaryStructureWithBufferPolicy->getHeaderStructurePolicy() ->supportsBeginningOfSentence()) { AKLOGE("The dictionary doesn't support Beginning-of-Sentence."); - return; + return false; } TimeKeeper::setCurrentTime(); - mDictionaryStructureWithBufferPolicy->addUnigramEntry(word, length, unigramProperty); + return mDictionaryStructureWithBufferPolicy->addUnigramEntry(word, length, unigramProperty); } -void Dictionary::addNgramEntry(const PrevWordsInfo *const prevWordsInfo, +bool Dictionary::addNgramEntry(const PrevWordsInfo *const prevWordsInfo, const BigramProperty *const bigramProperty) { TimeKeeper::setCurrentTime(); - mDictionaryStructureWithBufferPolicy->addNgramEntry(prevWordsInfo, bigramProperty); + return mDictionaryStructureWithBufferPolicy->addNgramEntry(prevWordsInfo, bigramProperty); } -void Dictionary::removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, +bool Dictionary::removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, const int *const word, const int length) { TimeKeeper::setCurrentTime(); - mDictionaryStructureWithBufferPolicy->removeNgramEntry(prevWordsInfo, word, length); + return mDictionaryStructureWithBufferPolicy->removeNgramEntry(prevWordsInfo, word, length); } -void Dictionary::flush(const char *const filePath) { +bool Dictionary::flush(const char *const filePath) { TimeKeeper::setCurrentTime(); - mDictionaryStructureWithBufferPolicy->flush(filePath); + return mDictionaryStructureWithBufferPolicy->flush(filePath); } -void Dictionary::flushWithGC(const char *const filePath) { +bool Dictionary::flushWithGC(const char *const filePath) { TimeKeeper::setCurrentTime(); - mDictionaryStructureWithBufferPolicy->flushWithGC(filePath); + return mDictionaryStructureWithBufferPolicy->flushWithGC(filePath); } bool Dictionary::needsToRunGC(const bool mindsBlockByGC) { diff --git a/native/jni/src/suggest/core/dictionary/dictionary.h b/native/jni/src/suggest/core/dictionary/dictionary.h index e665f7bea..f6d406fbd 100644 --- a/native/jni/src/suggest/core/dictionary/dictionary.h +++ b/native/jni/src/suggest/core/dictionary/dictionary.h @@ -76,18 +76,18 @@ class Dictionary { int getBigramProbability(const PrevWordsInfo *const prevWordsInfo, const int *word, int length) const; - void addUnigramEntry(const int *const codePoints, const int codePointCount, + bool addUnigramEntry(const int *const codePoints, const int codePointCount, const UnigramProperty *const unigramProperty); - void addNgramEntry(const PrevWordsInfo *const prevWordsInfo, + bool addNgramEntry(const PrevWordsInfo *const prevWordsInfo, const BigramProperty *const bigramProperty); - void removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, const int *const word, + bool removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, const int *const word, const int length); - void flush(const char *const filePath); + bool flush(const char *const filePath); - void flushWithGC(const char *const filePath); + bool flushWithGC(const char *const filePath); bool needsToRunGC(const bool mindsBlockByGC); diff --git a/native/jni/src/suggest/core/policy/dictionary_structure_with_buffer_policy.h b/native/jni/src/suggest/core/policy/dictionary_structure_with_buffer_policy.h index 3fd815f98..cda89406c 100644 --- a/native/jni/src/suggest/core/policy/dictionary_structure_with_buffer_policy.h +++ b/native/jni/src/suggest/core/policy/dictionary_structure_with_buffer_policy.h @@ -81,9 +81,11 @@ class DictionaryStructureWithBufferPolicy { virtual bool removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, const int *const word, const int length) = 0; - virtual void flush(const char *const filePath) = 0; + // Returns whether the flush was success or not. + virtual bool flush(const char *const filePath) = 0; - virtual void flushWithGC(const char *const filePath) = 0; + // Returns whether the GC and flush were success or not. + virtual bool flushWithGC(const char *const filePath) = 0; virtual bool needsToRunGC(const bool mindsBlockByGC) const = 0; diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.cpp b/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.cpp index 557a0b4c8..0f60a898d 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.cpp @@ -296,26 +296,30 @@ bool Ver4PatriciaTriePolicy::removeNgramEntry(const PrevWordsInfo *const prevWor } } -void Ver4PatriciaTriePolicy::flush(const char *const filePath) { +bool Ver4PatriciaTriePolicy::flush(const char *const filePath) { if (!mBuffers->isUpdatable()) { AKLOGI("Warning: flush() is called for non-updatable dictionary. filePath: %s", filePath); - return; + return false; } if (!mWritingHelper.writeToDictFile(filePath, mUnigramCount, mBigramCount)) { AKLOGE("Cannot flush the dictionary to file."); mIsCorrupted = true; + return false; } + return true; } -void Ver4PatriciaTriePolicy::flushWithGC(const char *const filePath) { +bool Ver4PatriciaTriePolicy::flushWithGC(const char *const filePath) { if (!mBuffers->isUpdatable()) { AKLOGI("Warning: flushWithGC() is called for non-updatable dictionary."); - return; + return false; } if (!mWritingHelper.writeToDictFileWithGC(getRootPosition(), filePath)) { AKLOGE("Cannot flush the dictionary to file with GC."); mIsCorrupted = true; + return false; } + return true; } bool Ver4PatriciaTriePolicy::needsToRunGC(const bool mindsBlockByGC) const { diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.h b/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.h index 95813881d..b064aaf33 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.h +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v401/ver4_patricia_trie_policy.h @@ -117,9 +117,9 @@ class Ver4PatriciaTriePolicy : public DictionaryStructureWithBufferPolicy { bool removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, const int *const word, const int length); - void flush(const char *const filePath); + bool flush(const char *const filePath); - void flushWithGC(const char *const filePath); + bool flushWithGC(const char *const filePath); bool needsToRunGC(const bool mindsBlockByGC) const; diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.h b/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.h index 6240d46aa..88bbfd966 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.h +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.h @@ -102,14 +102,16 @@ class PatriciaTriePolicy : public DictionaryStructureWithBufferPolicy { return false; } - void flush(const char *const filePath) { + bool flush(const char *const filePath) { // This method should not be called for non-updatable dictionary. AKLOGI("Warning: flush() is called for non-updatable dictionary."); + return false; } - void flushWithGC(const char *const filePath) { + bool flushWithGC(const char *const filePath) { // This method should not be called for non-updatable dictionary. AKLOGI("Warning: flushWithGC() is called for non-updatable dictionary."); + return false; } bool needsToRunGC(const bool mindsBlockByGC) const { diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.cpp b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.cpp index d53922763..e1ceaee49 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.cpp @@ -23,9 +23,11 @@ namespace latinime { const BigramEntry BigramDictContent::getBigramEntryAndAdvancePosition( int *const bigramEntryPos) const { const BufferWithExtendableBuffer *const bigramListBuffer = getContentBuffer(); - if (*bigramEntryPos < 0 || *bigramEntryPos >= bigramListBuffer->getTailPosition()) { - AKLOGE("Invalid bigram entry position. bigramEntryPos: %d, bufSize: %d", - *bigramEntryPos, bigramListBuffer->getTailPosition()); + const int bigramEntryTailPos = (*bigramEntryPos) + getBigramEntrySize(); + if (*bigramEntryPos < 0 || bigramEntryTailPos > bigramListBuffer->getTailPosition()) { + AKLOGE("Invalid bigram entry position. bigramEntryPos: %d, bigramEntryTailPos: %d, " + "bufSize: %d", *bigramEntryPos, bigramEntryTailPos, + bigramListBuffer->getTailPosition()); ASSERT(false); return BigramEntry(false /* hasNext */, NOT_A_PROBABILITY, Ver4DictConstants::NOT_A_TERMINAL_ID); diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.h b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.h index b8bdb63a8..52447a336 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.h +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/content/bigram_dict_content.h @@ -99,6 +99,20 @@ class BigramDictContent : public SparseTableDictContent { return hasNext ? Ver4DictConstants::BIGRAM_HAS_NEXT_MASK : 0; } + int getBigramEntrySize() const { + if (mHasHistoricalInfo) { + return Ver4DictConstants::BIGRAM_FLAGS_FIELD_SIZE + + Ver4DictConstants::TIME_STAMP_FIELD_SIZE + + Ver4DictConstants::WORD_LEVEL_FIELD_SIZE + + Ver4DictConstants::WORD_COUNT_FIELD_SIZE + + Ver4DictConstants::BIGRAM_TARGET_TERMINAL_ID_FIELD_SIZE; + } else { + return Ver4DictConstants::BIGRAM_FLAGS_FIELD_SIZE + + Ver4DictConstants::PROBABILITY_SIZE + + Ver4DictConstants::BIGRAM_TARGET_TERMINAL_ID_FIELD_SIZE; + } + } + bool runGCBigramList(const int bigramListPos, const BigramDictContent *const sourceBigramDictContent, const int toPos, const TerminalPositionLookupTable::TerminalIdMap *const terminalIdMap, diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp index 02478700a..09c7b7d85 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp @@ -304,26 +304,30 @@ bool Ver4PatriciaTriePolicy::removeNgramEntry(const PrevWordsInfo *const prevWor } } -void Ver4PatriciaTriePolicy::flush(const char *const filePath) { +bool Ver4PatriciaTriePolicy::flush(const char *const filePath) { if (!mBuffers->isUpdatable()) { AKLOGI("Warning: flush() is called for non-updatable dictionary. filePath: %s", filePath); - return; + return false; } if (!mWritingHelper.writeToDictFile(filePath, mUnigramCount, mBigramCount)) { AKLOGE("Cannot flush the dictionary to file."); mIsCorrupted = true; + return false; } + return true; } -void Ver4PatriciaTriePolicy::flushWithGC(const char *const filePath) { +bool Ver4PatriciaTriePolicy::flushWithGC(const char *const filePath) { if (!mBuffers->isUpdatable()) { AKLOGI("Warning: flushWithGC() is called for non-updatable dictionary."); - return; + return false; } if (!mWritingHelper.writeToDictFileWithGC(getRootPosition(), filePath)) { AKLOGE("Cannot flush the dictionary to file with GC."); mIsCorrupted = true; + return false; } + return true; } bool Ver4PatriciaTriePolicy::needsToRunGC(const bool mindsBlockByGC) const { diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.h b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.h index 008f2e423..d198c97fd 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.h +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.h @@ -99,9 +99,9 @@ class Ver4PatriciaTriePolicy : public DictionaryStructureWithBufferPolicy { bool removeNgramEntry(const PrevWordsInfo *const prevWordsInfo, const int *const word1, const int length1); - void flush(const char *const filePath); + bool flush(const char *const filePath); - void flushWithGC(const char *const filePath); + bool flushWithGC(const char *const filePath); bool needsToRunGC(const bool mindsBlockByGC) const; diff --git a/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java b/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java index a4dbfaa6b..406e9a9b8 100644 --- a/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java +++ b/tests/src/com/android/inputmethod/latin/DistracterFilterTest.java @@ -57,11 +57,36 @@ public class DistracterFilterTest extends InputTestsBase { assertTrue(mDistracterFilter.isDistracterToWordsInDictionaries( EMPTY_PREV_WORDS_INFO, typedWord, localeEnUs)); - typedWord = "were"; - // For this test case, we consider "were" is a distracter to "we're". + typedWord = "youre"; + // For this test case, we consider "youre" is a distracter to "you're". assertTrue(mDistracterFilter.isDistracterToWordsInDictionaries( EMPTY_PREV_WORDS_INFO, typedWord, localeEnUs)); + typedWord = "Banana"; + // For this test case, we consider "Banana" is a distracter to "banana". + assertTrue(mDistracterFilter.isDistracterToWordsInDictionaries( + EMPTY_PREV_WORDS_INFO, typedWord, localeEnUs)); + + typedWord = "orange"; + // For this test case, we consider "orange" is not a distracter to any word in dictionaries. + assertFalse(mDistracterFilter.isDistracterToWordsInDictionaries( + EMPTY_PREV_WORDS_INFO, typedWord, localeEnUs)); + + typedWord = "Orange"; + // For this test case, we consider "Orange" is a distracter to "orange". + assertTrue(mDistracterFilter.isDistracterToWordsInDictionaries( + EMPTY_PREV_WORDS_INFO, typedWord, localeEnUs)); + + typedWord = "café"; + // For this test case, we consider "café" is a distracter to "cafe". + assertTrue(mDistracterFilter.isDistracterToWordsInDictionaries( + EMPTY_PREV_WORDS_INFO, typedWord, localeEnUs)); + + typedWord = "cafe"; + // For this test case, we consider "café" is not a distracter to any word in dictionaries. + assertFalse(mDistracterFilter.isDistracterToWordsInDictionaries( + EMPTY_PREV_WORDS_INFO, typedWord, localeEnUs)); + typedWord = "ill"; // For this test case, we consider "ill" is not a distracter to any word in dictionaries. assertFalse(mDistracterFilter.isDistracterToWordsInDictionaries( diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java index 0528e341e..8f32e5336 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java +++ b/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java @@ -75,33 +75,54 @@ public class Ver4DictEncoder implements DictEncoder { for (final WordProperty wordProperty : dict) { // TODO: switch to addMultipleDictionaryEntries when they support shortcuts if (null == wordProperty.mShortcutTargets || wordProperty.mShortcutTargets.isEmpty()) { - binaryDict.addUnigramEntry(wordProperty.mWord, wordProperty.getProbability(), + if (!binaryDict.addUnigramEntry(wordProperty.mWord, wordProperty.getProbability(), null /* shortcutTarget */, 0 /* shortcutProbability */, wordProperty.mIsBeginningOfSentence, wordProperty.mIsNotAWord, - wordProperty.mIsBlacklistEntry, 0 /* timestamp */); + wordProperty.mIsBlacklistEntry, 0 /* timestamp */)) { + MakedictLog.e("Cannot add unigram entry for " + wordProperty.mWord); + } } else { for (final WeightedString shortcutTarget : wordProperty.mShortcutTargets) { - binaryDict.addUnigramEntry(wordProperty.mWord, wordProperty.getProbability(), + if (!binaryDict.addUnigramEntry(wordProperty.mWord, + wordProperty.getProbability(), shortcutTarget.mWord, shortcutTarget.getProbability(), wordProperty.mIsBeginningOfSentence, wordProperty.mIsNotAWord, - wordProperty.mIsBlacklistEntry, 0 /* timestamp */); + wordProperty.mIsBlacklistEntry, 0 /* timestamp */)) { + MakedictLog.e("Cannot add unigram entry for " + wordProperty.mWord + + ", shortcutTarget: " + shortcutTarget.mWord); + return; + } } } if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) { - binaryDict.flushWithGC(); + if (!binaryDict.flushWithGC()) { + MakedictLog.e("Cannot flush dict with GC."); + return; + } } } for (final WordProperty word0Property : dict) { if (null == word0Property.mBigrams) continue; for (final WeightedString word1 : word0Property.mBigrams) { - binaryDict.addNgramEntry(new PrevWordsInfo(word0Property.mWord), word1.mWord, - word1.getProbability(), 0 /* timestamp */); + final PrevWordsInfo prevWordsInfo = new PrevWordsInfo(word0Property.mWord); + if (!binaryDict.addNgramEntry(prevWordsInfo, word1.mWord, + word1.getProbability(), 0 /* timestamp */)) { + MakedictLog.e("Cannot add n-gram entry for " + + prevWordsInfo + " -> " + word1.mWord); + return; + } if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) { - binaryDict.flushWithGC(); + if (!binaryDict.flushWithGC()) { + MakedictLog.e("Cannot flush dict with GC."); + return; + } } } } - binaryDict.flushWithGC(); + if (!binaryDict.flushWithGC()) { + MakedictLog.e("Cannot flush dict with GC."); + return; + } binaryDict.close(); } diff --git a/tests/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutorTests.java b/tests/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutorTests.java index e0755483c..8b78816ce 100644 --- a/tests/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutorTests.java +++ b/tests/src/com/android/inputmethod/latin/utils/PrioritizedSerialExecutorTests.java @@ -30,11 +30,12 @@ import java.util.concurrent.atomic.AtomicInteger; public class PrioritizedSerialExecutorTests extends AndroidTestCase { private static final String TAG = PrioritizedSerialExecutorTests.class.getSimpleName(); + private static final String TEST_EXECUTOR_ID = "test"; private static final int NUM_OF_TASKS = 10; private static final int DELAY_FOR_WAITING_TASKS_MILLISECONDS = 500; public void testExecute() { - final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(); + final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(TEST_EXECUTOR_ID); final AtomicInteger v = new AtomicInteger(0); for (int i = 0; i < NUM_OF_TASKS; ++i) { executor.execute(new Runnable() { @@ -54,7 +55,7 @@ public class PrioritizedSerialExecutorTests extends AndroidTestCase { } public void testExecutePrioritized() { - final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(); + final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(TEST_EXECUTOR_ID); final AtomicInteger v = new AtomicInteger(0); for (int i = 0; i < NUM_OF_TASKS; ++i) { executor.executePrioritized(new Runnable() { @@ -74,7 +75,7 @@ public class PrioritizedSerialExecutorTests extends AndroidTestCase { } public void testExecuteCombined() { - final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(); + final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(TEST_EXECUTOR_ID); final AtomicInteger v = new AtomicInteger(0); for (int i = 0; i < NUM_OF_TASKS; ++i) { executor.execute(new Runnable() { |