Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d57af0e authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge remote-tracking branch 'origin/lineage-20.0' into v1-t

parents feda8e6a b7aee515
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,6 +16,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="subtype_no_language_bepo">Alfabetu (Bépo)</string>
    <string name="subtype_hu_ZZ">Húngaru (QWERTY)</string>
    <string name="keyboard_theme_material_follow_system">Material - siguir los axustes del sistema</string>
    <string name="keyboard_theme_material_follow_system">Material - siguir la configuración del sistema</string>
    <string name="prefs_keyboard_height_scale">Escala del altor del tecláu</string>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -16,5 +16,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="subtype_no_language_bepo">Gwyddor Lladin (Bépo)</string>
    <string name="subtype_hu_ZZ">Hwngareg (QWERTY)</string>
    <string name="keyboard_theme_material_follow_system">Defnydd - defnyddio gosodiadau system</string>
    <string name="prefs_keyboard_height_scale">Cyfradd uchder y bysellfwrdd</string>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -16,5 +16,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="subtype_no_language_bepo">Alphabet (Bépo)</string>
    <string name="subtype_hu_ZZ">Hongrois (QWERTY)</string>
    <string name="keyboard_theme_material_follow_system">Matériel - suivre les paramètres du système</string>
    <string name="prefs_keyboard_height_scale">Hauteur du clavier</string>
</resources>
+10 −3
Original line number Diff line number Diff line
@@ -237,16 +237,23 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
            // Handle special patterns like email, URI, telephone number.
            final int checkability = getCheckabilityInScript(text, mScript);
            if (CHECKABILITY_CHECKABLE != checkability) {
                // CHECKABILITY_CONTAINS_PERIOD typo should not be reported when text
                // is a valid word followed by a single period (end of sentence).
                boolean periodOnlyAtLastIndex = text.indexOf(
                        Constants.CODE_PERIOD) == (text.length() - 1);
                if (CHECKABILITY_CONTAINS_PERIOD == checkability) {
                    final String[] splitText = text.split(Constants.REGEXP_PERIOD);
                    boolean allWordsAreValid = true;
                    // Validate all words on both sides of periods,
                    // skip empty tokens due to periods at first/last index
                    for (final String word : splitText) {
                        if (!mService.isValidWord(mLocale, word)) {
                        if (!word.isEmpty() && !mService.isValidWord(mLocale, word) &&
                                !mService.isValidWord(mLocale, word.toLowerCase(mLocale))) {
                            allWordsAreValid = false;
                            break;
                        }
                    }
                    if (allWordsAreValid) {
                    if (allWordsAreValid && !periodOnlyAtLastIndex) {
                        return new SuggestionsInfo(SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO
                                | SuggestionsInfo.RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS,
                                new String[] {
@@ -256,7 +263,7 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
                return mService.isValidWord(mLocale, text) ?
                        AndroidSpellCheckerService.getInDictEmptySuggestions() :
                        AndroidSpellCheckerService.getNotInDictEmptySuggestions(
                                CHECKABILITY_CONTAINS_PERIOD == checkability /* reportAsTypo */);
                                !periodOnlyAtLastIndex);
            }

            // Handle normal words.