am 0dd23544: Merge "Very simple refactoring"
* commit '0dd23544ffec1ae50c4b56fced22b47e7772f5ed': Very simple refactoringmain
commit
25446d31f2
|
@ -139,13 +139,17 @@ public final class RichInputConnection {
|
|||
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
|
||||
}
|
||||
|
||||
public void resetCachesUponCursorMove(final int newCursorPosition,
|
||||
final boolean shouldFinishComposition) {
|
||||
mCurrentCursorPosition = newCursorPosition;
|
||||
private void refreshCache() {
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue