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

Commit 13192140 authored by /e/ robot's avatar /e/ robot
Browse files

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

parents a1eef1b7 dbdcbeaa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -403,7 +403,8 @@ public final class DictionaryProvider extends ContentProvider {
                        if (!f.isFile()) {
                            continue;
                        }
                    } else if (MetadataDbHelper.STATUS_AVAILABLE == wordListStatus) {
                    } else if (MetadataDbHelper.STATUS_AVAILABLE == wordListStatus
                            || MetadataDbHelper.STATUS_DELETING == wordListStatus) {
                        // The locale is the id for the main dictionary.
                        UpdateHandler.installIfNeverRequested(context, clientId, wordListId);
                        continue;
+12 −0
Original line number Diff line number Diff line
@@ -189,10 +189,22 @@ public final class InputLogic {
        // the useless IPC of {begin,end}BatchEdit.
        if (mWordComposer.isComposingWord()) {
            mConnection.beginBatchEdit();

            final CharSequence textBeforeCursor =
                    mConnection.getTextBeforeCursor(Constants.EDITOR_CONTENTS_CACHE_SIZE, 0);
            final CharSequence textAfterCursor =
                    mConnection.getTextAfterCursor(Constants.EDITOR_CONTENTS_CACHE_SIZE, 0);
            final String text = String.valueOf(textBeforeCursor) + String.valueOf(textAfterCursor);
            final String typedWord = mWordComposer.getTypedWord();
            if (textBeforeCursor != null && !text.contains(typedWord)) {
                mWordComposer.reset();
            }

            // If we had a composition in progress, we need to commit the word so that the
            // suggestionsSpan will be added. This will allow resuming on the same suggestions
            // after rotation is finished.
            commitTyped(settingsValues, LastComposedWord.NOT_A_SEPARATOR);
            mConnection.finishComposingText();
            mConnection.endBatchEdit();
        }
    }