mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 38e98026: Merge "Revert "Very simple refactoring""
* commit '38e9802690bbb96a00762ce5d172c5a37716fe1d': Revert "Very simple refactoring"
This commit is contained in:
commit
87677d7532
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user