From c6a07e16a5801189aabfe6a2efabb61914763204 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 26 Jul 2013 06:46:56 +0000 Subject: [PATCH] Revert "Very simple refactoring" This reverts commit f712dc9a4f17ee4a6916b0f477e89d1bc34a4d70. It turns out this refactoring is not useful after all. Change-Id: I0145c907b3cc5ac9a30a59abcd719cb546c9bd3a --- .../android/inputmethod/latin/RichInputConnection.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index c6193faaf..8264f6a6d 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -139,17 +139,13 @@ public final class RichInputConnection { if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); } - private void refreshCache() { + public void resetCachesUponCursorMove(final int newCursorPosition, + final boolean shouldFinishComposition) { + mCurrentCursorPosition = newCursorPosition; mComposingText.setLength(0); mCommittedTextBeforeComposingText.setLength(0); final CharSequence textBeforeCursor = getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0); if (null != textBeforeCursor) mCommittedTextBeforeComposingText.append(textBeforeCursor); - } - - public void resetCachesUponCursorMove(final int newCursorPosition, - final boolean shouldFinishComposition) { - mCurrentCursorPosition = newCursorPosition; - refreshCache(); if (null != mIC && shouldFinishComposition) { mIC.finishComposingText(); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {