Loading java/src/com/android/inputmethod/dictionarypack/DictionaryProvider.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; Loading java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +12 −0 Original line number Diff line number Diff line Loading @@ -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(); } } Loading Loading
java/src/com/android/inputmethod/dictionarypack/DictionaryProvider.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +12 −0 Original line number Diff line number Diff line Loading @@ -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(); } } Loading