Merge "Revert "[HW10] Pull the processed event in its eventual place"" into lmp-dev
commit
e8ca3f4091
|
@ -405,7 +405,6 @@ public final class InputLogic {
|
||||||
final int keyboardShiftMode,
|
final int keyboardShiftMode,
|
||||||
// TODO: remove these arguments
|
// TODO: remove these arguments
|
||||||
final int currentKeyboardScriptId, final LatinIME.UIHandler handler) {
|
final int currentKeyboardScriptId, final LatinIME.UIHandler handler) {
|
||||||
final Event processedEvent = mWordComposer.processEvent(event);
|
|
||||||
final InputTransaction inputTransaction = new InputTransaction(settingsValues, event,
|
final InputTransaction inputTransaction = new InputTransaction(settingsValues, event,
|
||||||
SystemClock.uptimeMillis(), mSpaceState,
|
SystemClock.uptimeMillis(), mSpaceState,
|
||||||
getActualCapsMode(settingsValues, keyboardShiftMode));
|
getActualCapsMode(settingsValues, keyboardShiftMode));
|
||||||
|
@ -429,6 +428,7 @@ public final class InputLogic {
|
||||||
// A special key, like delete, shift, emoji, or the settings key.
|
// A special key, like delete, shift, emoji, or the settings key.
|
||||||
switch (event.mKeyCode) {
|
switch (event.mKeyCode) {
|
||||||
case Constants.CODE_DELETE:
|
case Constants.CODE_DELETE:
|
||||||
|
final Event processedEvent = mWordComposer.processEvent(inputTransaction.mEvent);
|
||||||
handleBackspace(inputTransaction, currentKeyboardScriptId, processedEvent);
|
handleBackspace(inputTransaction, currentKeyboardScriptId, processedEvent);
|
||||||
// Backspace is a functional key, but it affects the contents of the editor.
|
// Backspace is a functional key, but it affects the contents of the editor.
|
||||||
inputTransaction.setDidAffectContents();
|
inputTransaction.setDidAffectContents();
|
||||||
|
@ -484,7 +484,7 @@ public final class InputLogic {
|
||||||
inputTransaction.mSettingsValues, tmpEvent,
|
inputTransaction.mSettingsValues, tmpEvent,
|
||||||
inputTransaction.mTimestamp, inputTransaction.mSpaceState,
|
inputTransaction.mTimestamp, inputTransaction.mSpaceState,
|
||||||
inputTransaction.mShiftState);
|
inputTransaction.mShiftState);
|
||||||
didAutoCorrect = handleNonSpecialCharacter(tmpTransaction, handler, processedEvent);
|
didAutoCorrect = handleNonSpecialCharacter(tmpTransaction, handler);
|
||||||
// Shift + Enter is treated as a functional key but it results in adding a new
|
// Shift + Enter is treated as a functional key but it results in adding a new
|
||||||
// line, so that does affect the contents of the editor.
|
// line, so that does affect the contents of the editor.
|
||||||
inputTransaction.setDidAffectContents();
|
inputTransaction.setDidAffectContents();
|
||||||
|
@ -515,13 +515,11 @@ public final class InputLogic {
|
||||||
} else {
|
} else {
|
||||||
// No action label, and the action from imeOptions is NONE: this is a regular
|
// No action label, and the action from imeOptions is NONE: this is a regular
|
||||||
// enter key that should input a carriage return.
|
// enter key that should input a carriage return.
|
||||||
didAutoCorrect = handleNonSpecialCharacter(inputTransaction, handler,
|
didAutoCorrect = handleNonSpecialCharacter(inputTransaction, handler);
|
||||||
processedEvent);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
didAutoCorrect = handleNonSpecialCharacter(inputTransaction, handler,
|
didAutoCorrect = handleNonSpecialCharacter(inputTransaction, handler);
|
||||||
processedEvent);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -683,9 +681,8 @@ public final class InputLogic {
|
||||||
*/
|
*/
|
||||||
private boolean handleNonSpecialCharacter(final InputTransaction inputTransaction,
|
private boolean handleNonSpecialCharacter(final InputTransaction inputTransaction,
|
||||||
// TODO: remove this argument
|
// TODO: remove this argument
|
||||||
final LatinIME.UIHandler handler,
|
final LatinIME.UIHandler handler) {
|
||||||
// TODO: remove this argument, put it inside the transaction
|
final Event processedEvent = mWordComposer.processEvent(inputTransaction.mEvent);
|
||||||
final Event processedEvent) {
|
|
||||||
final int codePoint = processedEvent.mCodePoint;
|
final int codePoint = processedEvent.mCodePoint;
|
||||||
mSpaceState = SpaceState.NONE;
|
mSpaceState = SpaceState.NONE;
|
||||||
final boolean didAutoCorrect;
|
final boolean didAutoCorrect;
|
||||||
|
|
Loading…
Reference in New Issue