diff options
-rw-r--r-- | java/res/values-af/strings.xml | 6 | ||||
-rw-r--r-- | java/res/values-ar/strings.xml | 6 | ||||
-rw-r--r-- | java/res/values-el/strings.xml | 2 | ||||
-rw-r--r-- | java/res/values-es-rUS/strings.xml | 4 | ||||
-rw-r--r-- | java/res/values-es/strings.xml | 2 | ||||
-rw-r--r-- | java/res/values-fa/strings.xml | 6 | ||||
-rw-r--r-- | java/res/values-hi/strings.xml | 2 | ||||
-rw-r--r-- | java/res/values-in/strings.xml | 2 | ||||
-rw-r--r-- | java/res/values-nb/strings.xml | 4 | ||||
-rw-r--r-- | java/res/values-sk/strings.xml | 2 | ||||
-rw-r--r-- | java/res/values-zh-rCN/strings.xml | 2 | ||||
-rw-r--r-- | native/jni/src/defines.h | 1 | ||||
-rw-r--r-- | native/jni/src/proximity_info_state.cpp | 32 | ||||
-rw-r--r-- | native/jni/src/proximity_info_state.h | 2 |
14 files changed, 39 insertions, 34 deletions
diff --git a/java/res/values-af/strings.xml b/java/res/values-af/strings.xml index 5bfd9d9a4..24b202a11 100644 --- a/java/res/values-af/strings.xml +++ b/java/res/values-af/strings.xml @@ -44,10 +44,8 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Verstek"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"Stel kontakname voor"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Gebruik name van kontakte vir voorstelle en korreksies"</string> - <!-- no translation found for use_double_space_period (8781529969425082860) --> - <skip /> - <!-- no translation found for use_double_space_period_summary (6532892187247952799) --> - <skip /> + <string name="use_double_space_period" msgid="8781529969425082860">"Dubbelspasie-punt"</string> + <string name="use_double_space_period_summary" msgid="6532892187247952799">"Dubbeltik op spasiebalk voeg \'n punt in, gevolg deur \'n spasie"</string> <string name="auto_cap" msgid="1719746674854628252">"Outohoofletters"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"Die eerste woord van elke sin moet met \'n hoofletter begin"</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"Voeg woordeboeke by"</string> diff --git a/java/res/values-ar/strings.xml b/java/res/values-ar/strings.xml index f4897a881..121c859f0 100644 --- a/java/res/values-ar/strings.xml +++ b/java/res/values-ar/strings.xml @@ -44,10 +44,8 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"افتراضي"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"اقتراح أسماء جهات الاتصال"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"استخدام الأسماء من جهات الاتصال للاقتراحات والتصحيحات"</string> - <!-- no translation found for use_double_space_period (8781529969425082860) --> - <skip /> - <!-- no translation found for use_double_space_period_summary (6532892187247952799) --> - <skip /> + <string name="use_double_space_period" msgid="8781529969425082860">"نقطة المسافة المزدوجة"</string> + <string name="use_double_space_period_summary" msgid="6532892187247952799">"يؤدي النقر نقرًا مزدوجًا على مفتاح المسافة إلى إدخال نقطة متبوعة بمسافة"</string> <string name="auto_cap" msgid="1719746674854628252">"أحرف كبيرة تلقائيًا"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"كتابة الحرف الأول من كل جملة بحرف كبير."</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"القواميس الإضافية"</string> diff --git a/java/res/values-el/strings.xml b/java/res/values-el/strings.xml index 1ab64f9da..83abdfde6 100644 --- a/java/res/values-el/strings.xml +++ b/java/res/values-el/strings.xml @@ -44,7 +44,7 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Προεπιλογή"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"Πρόταση ονομάτων επαφών"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Χρησιμοποιήστε ονόματα από τις Επαφές για προτάσεις και διορθ."</string> - <string name="use_double_space_period" msgid="8781529969425082860">"Τελεία με διπλό πάτημα πλήκρου διαστ."</string> + <string name="use_double_space_period" msgid="8781529969425082860">"Τελεία με διπλό πάτημα πλήκτρ.διαστ."</string> <string name="use_double_space_period_summary" msgid="6532892187247952799">"Το διπλό πάτημα του πλήκτρ.διαστ. εισάγει μια τελεία και ένα κενό"</string> <string name="auto_cap" msgid="1719746674854628252">"Αυτόματη χρήση κεφαλαίων"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"Χρήση κεφαλαίου στην πρώτη λέξη κάθε πρότασης"</string> diff --git a/java/res/values-es-rUS/strings.xml b/java/res/values-es-rUS/strings.xml index b4302226b..faac76680 100644 --- a/java/res/values-es-rUS/strings.xml +++ b/java/res/values-es-rUS/strings.xml @@ -44,8 +44,8 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Predeterminada"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"Sugerir nombres de contacto"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Usar nombres de los contactos para sugerencias y correcciones"</string> - <string name="use_double_space_period" msgid="8781529969425082860">"Doble espacio después de punto"</string> - <string name="use_double_space_period_summary" msgid="6532892187247952799">"Si tocas dos veces la barra espaciadora, se inserta un punto seguido de un espacio."</string> + <string name="use_double_space_period" msgid="8781529969425082860">"Punto y doble espacio"</string> + <string name="use_double_space_period_summary" msgid="6532892187247952799">"Tocar dos veces la barra espaciadora inserta un punto y espacio."</string> <string name="auto_cap" msgid="1719746674854628252">"Mayúsculas automáticas"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"Escribe con mayúscula la primera palabra de cada frase"</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"Diccionarios complementarios"</string> diff --git a/java/res/values-es/strings.xml b/java/res/values-es/strings.xml index 37aa2c85e..ddfca5814 100644 --- a/java/res/values-es/strings.xml +++ b/java/res/values-es/strings.xml @@ -44,7 +44,7 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Predeterminado"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"Sugerir contactos"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Utilizar nombres de contactos para sugerencias y correcciones"</string> - <string name="use_double_space_period" msgid="8781529969425082860">"Punto y doble espacio"</string> + <string name="use_double_space_period" msgid="8781529969425082860">"Punto y espacio"</string> <string name="use_double_space_period_summary" msgid="6532892187247952799">"Si tocas dos veces el espacio, se inserta un punto seguido de un espacio."</string> <string name="auto_cap" msgid="1719746674854628252">"Mayúsculas automáticas"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"Poner la primera letra de cada palabra en mayúscula"</string> diff --git a/java/res/values-fa/strings.xml b/java/res/values-fa/strings.xml index dbc32c53c..e3a528e82 100644 --- a/java/res/values-fa/strings.xml +++ b/java/res/values-fa/strings.xml @@ -44,10 +44,8 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"پیشفرض"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"پیشنهاد نامهای مخاطب"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"برای پیشنهاد و تصحیح از نام مخاطبین استفاده شود"</string> - <!-- no translation found for use_double_space_period (8781529969425082860) --> - <skip /> - <!-- no translation found for use_double_space_period_summary (6532892187247952799) --> - <skip /> + <string name="use_double_space_period" msgid="8781529969425082860">"نقطه با دو فاصله"</string> + <string name="use_double_space_period_summary" msgid="6532892187247952799">"با دوبار ضربه روی دکمه فاصله نقطه با یک فاصله بعد آن درج میشود"</string> <string name="auto_cap" msgid="1719746674854628252">"بزرگکردن خودکار حروف"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"بزرگنویسی کلمه اول هر جمله"</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"فرهنگهای لغت افزودنی"</string> diff --git a/java/res/values-hi/strings.xml b/java/res/values-hi/strings.xml index dbb94eb3d..775f4f96a 100644 --- a/java/res/values-hi/strings.xml +++ b/java/res/values-hi/strings.xml @@ -44,7 +44,7 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"डिफ़ॉल्ट"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"संपर्क नाम सुझाएं"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"सुझाव और सुधार के लिए संपर्क से नामों का उपयोग करें"</string> - <string name="use_double_space_period" msgid="8781529969425082860">"दोहरी रिक्ति वाला पीरियड"</string> + <string name="use_double_space_period" msgid="8781529969425082860">"दोहरे स्पेस वाला पीरियड"</string> <string name="use_double_space_period_summary" msgid="6532892187247952799">"स्पेसबार पर डबल टैप करने से पीरियड शामिल हो जाता है जिसके बाद एक रिक्ति होती है"</string> <string name="auto_cap" msgid="1719746674854628252">"स्वत: अक्षर बड़े करना"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"प्रत्येक वाक्य के पहले शब्द को बड़ा लिखें"</string> diff --git a/java/res/values-in/strings.xml b/java/res/values-in/strings.xml index d761ffc50..c07ef5d72 100644 --- a/java/res/values-in/strings.xml +++ b/java/res/values-in/strings.xml @@ -45,7 +45,7 @@ <string name="use_contacts_dict" msgid="4435317977804180815">"Sarankan nama Kontak"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Menggunakan nama dari Kontak untuk saran dan koreksi"</string> <string name="use_double_space_period" msgid="8781529969425082860">"Titik spasi ganda"</string> - <string name="use_double_space_period_summary" msgid="6532892187247952799">"Mengetuk dua kali bilah spasi akan memasukkan titik diikuti satu spasi"</string> + <string name="use_double_space_period_summary" msgid="6532892187247952799">"Mengetuk tombol spasi dua kali akan memasukkan titik diikuti satu spasi"</string> <string name="auto_cap" msgid="1719746674854628252">"Kapitalisasi otomatis"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"Kapitalisasi kata pertama di setiap kalimat"</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"Kamus pengaya"</string> diff --git a/java/res/values-nb/strings.xml b/java/res/values-nb/strings.xml index d21c4e916..5d3f9d2e8 100644 --- a/java/res/values-nb/strings.xml +++ b/java/res/values-nb/strings.xml @@ -44,8 +44,8 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Standard"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"Foreslå kontaktnavn"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Bruk navn fra Kontakter til forslag og korrigeringer"</string> - <string name="use_double_space_period" msgid="8781529969425082860">"To mellomrom for punktum"</string> - <string name="use_double_space_period_summary" msgid="6532892187247952799">"Trykk to ganger på mellomromstasten for å sette inn et punktum etterfulgt av et mellomrom"</string> + <string name="use_double_space_period" msgid="8781529969425082860">"Punktum ved doble mellomrom"</string> + <string name="use_double_space_period_summary" msgid="6532892187247952799">"Dobbeltrykk på mellomromstasten for punktum etterfulgt av mellomrom"</string> <string name="auto_cap" msgid="1719746674854628252">"Stor forbokstav"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"Sett stor bokstav i det første ordet i hver setning"</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"Tilleggsordbøker"</string> diff --git a/java/res/values-sk/strings.xml b/java/res/values-sk/strings.xml index cfb51ed08..7fcbf87a4 100644 --- a/java/res/values-sk/strings.xml +++ b/java/res/values-sk/strings.xml @@ -44,7 +44,7 @@ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Predvolená"</string> <string name="use_contacts_dict" msgid="4435317977804180815">"Navrhnúť mená kontaktov"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Používať mená z Kontaktov na návrhy a opravy"</string> - <string name="use_double_space_period" msgid="8781529969425082860">"Bodka dvojitou medzerou"</string> + <string name="use_double_space_period" msgid="8781529969425082860">"Bodka s medzerou"</string> <string name="use_double_space_period_summary" msgid="6532892187247952799">"Dvojitým klepnutím na medzerník vložíte bodku a medzeru."</string> <string name="auto_cap" msgid="1719746674854628252">"Veľké písmená automaticky"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"Písanie prvého slova v každej vete veľkým písmenom"</string> diff --git a/java/res/values-zh-rCN/strings.xml b/java/res/values-zh-rCN/strings.xml index c4cb39aa0..607e141fb 100644 --- a/java/res/values-zh-rCN/strings.xml +++ b/java/res/values-zh-rCN/strings.xml @@ -45,7 +45,7 @@ <string name="use_contacts_dict" msgid="4435317977804180815">"联系人姓名建议"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"使用联系人中的姓名提供建议和更正"</string> <string name="use_double_space_period" msgid="8781529969425082860">"双击空格插入句号"</string> - <string name="use_double_space_period_summary" msgid="6532892187247952799">"双击空格键可在空格后插入句号"</string> + <string name="use_double_space_period_summary" msgid="6532892187247952799">"双击空格键可插入句号并后跟空格"</string> <string name="auto_cap" msgid="1719746674854628252">"自动大写"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"句首字词大写"</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"附加词典"</string> diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h index a6dd2fd84..3d7ba4f36 100644 --- a/native/jni/src/defines.h +++ b/native/jni/src/defines.h @@ -376,6 +376,7 @@ static inline void prof_out(void) { #define MIN_USER_TYPED_LENGTH_FOR_EXCESSIVE_CHARACTER_SUGGESTION 3 // TODO: Remove +#define MAX_POINTER_COUNT 1 #define MAX_POINTER_COUNT_FOR_G 2 // Size, in bytes, of the bloom filter index for bigrams diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp index 39d53fb52..31938a20c 100644 --- a/native/jni/src/proximity_info_state.cpp +++ b/native/jni/src/proximity_info_state.cpp @@ -39,12 +39,8 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi const ProximityInfo *proximityInfo, const int *const inputCodes, const int inputSize, const int *const xCoordinates, const int *const yCoordinates, const int *const times, const int *const pointerIds, const bool isGeometric) { - if (isGeometric) { - mIsContinuationPossible = checkAndReturnIsContinuationPossible( - inputSize, xCoordinates, yCoordinates, times); - } else { - mIsContinuationPossible = false; - } + mIsContinuationPossible = checkAndReturnIsContinuationPossible( + inputSize, xCoordinates, yCoordinates, times, isGeometric); mProximityInfo = proximityInfo; mHasTouchPositionCorrectionData = proximityInfo->hasTouchPositionCorrectionData(); @@ -466,13 +462,27 @@ float ProximityInfoState::calculateBeelineSpeedRate( } bool ProximityInfoState::checkAndReturnIsContinuationPossible(const int inputSize, - const int *const xCoordinates, const int *const yCoordinates, const int *const times) { - for (int i = 0; i < mSampledInputSize; ++i) { - const int index = mInputIndice[i]; - if (index > inputSize || xCoordinates[index] != mSampledInputXs[i] || - yCoordinates[index] != mSampledInputYs[i] || times[index] != mTimes[i]) { + const int *const xCoordinates, const int *const yCoordinates, const int *const times, + const bool isGeometric) const { + if (isGeometric) { + for (int i = 0; i < mSampledInputSize; ++i) { + const int index = mInputIndice[i]; + if (index > inputSize || xCoordinates[index] != mSampledInputXs[i] || + yCoordinates[index] != mSampledInputYs[i] || times[index] != mTimes[i]) { + return false; + } + } + } else { + if (inputSize < mSampledInputSize) { + // Assuming the cache is invalid if the previous input size is larger than the new one. return false; } + for (int i = 0; i < mSampledInputSize && i < MAX_WORD_LENGTH_INTERNAL; ++i) { + if (xCoordinates[i] != mSampledInputXs[i] + || yCoordinates[i] != mSampledInputYs[i]) { + return false; + } + } } return true; } diff --git a/native/jni/src/proximity_info_state.h b/native/jni/src/proximity_info_state.h index d3b4062c8..dd979653f 100644 --- a/native/jni/src/proximity_info_state.h +++ b/native/jni/src/proximity_info_state.h @@ -242,7 +242,7 @@ class ProximityInfoState { const NearKeysDistanceMap *const prevNearKeysDistances, const NearKeysDistanceMap *const prevPrevNearKeysDistances) const; bool checkAndReturnIsContinuationPossible(const int inputSize, const int *const xCoordinates, - const int *const yCoordinates, const int *const times); + const int *const yCoordinates, const int *const times, const bool isGeometric) const; void popInputData(); void updateAlignPointProbabilities(const int start); bool suppressCharProbabilities(const int index1, const int index2); |