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

Commit 87677d75 authored by Jean Chalard's avatar Jean Chalard Committed by Android Git Automerger
Browse files

am 38e98026: Merge "Revert "Very simple refactoring""

* commit '38e98026':
  Revert "Very simple refactoring"
parents 25446d31 38e98026
Loading
Loading
Loading
Loading
+3 −7
Original line number Original line Diff line number Diff line
@@ -139,17 +139,13 @@ public final class RichInputConnection {
        if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
        if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
    }
    }


    private void refreshCache() {
    public void resetCachesUponCursorMove(final int newCursorPosition,
            final boolean shouldFinishComposition) {
        mCurrentCursorPosition = newCursorPosition;
        mComposingText.setLength(0);
        mComposingText.setLength(0);
        mCommittedTextBeforeComposingText.setLength(0);
        mCommittedTextBeforeComposingText.setLength(0);
        final CharSequence textBeforeCursor = getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0);
        final CharSequence textBeforeCursor = getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0);
        if (null != textBeforeCursor) mCommittedTextBeforeComposingText.append(textBeforeCursor);
        if (null != textBeforeCursor) mCommittedTextBeforeComposingText.append(textBeforeCursor);
    }

    public void resetCachesUponCursorMove(final int newCursorPosition,
            final boolean shouldFinishComposition) {
        mCurrentCursorPosition = newCursorPosition;
        refreshCache();
        if (null != mIC && shouldFinishComposition) {
        if (null != mIC && shouldFinishComposition) {
            mIC.finishComposingText();
            mIC.finishComposingText();
            if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {