[IL5] Some renaming

Bug: 8636060
Change-Id: Id76889f8405458bcacb9c7c694cb193b27b842f3
This commit is contained in:
Jean Chalard 2013-12-19 16:54:42 +09:00
parent 37d3f1bd02
commit c8dfaab783
2 changed files with 16 additions and 16 deletions

View file

@ -1882,8 +1882,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
} }
} }
// TODO[IL]: Move this to InputLogic and rename to processRecapitalize. // TODO[IL]: Move this to InputLogic
public void handleRecapitalize() { public void performRecapitalization() {
if (mInputLogic.mLastSelectionStart == mInputLogic.mLastSelectionEnd) { if (mInputLogic.mLastSelectionStart == mInputLogic.mLastSelectionEnd) {
return; // No selection return; // No selection
} }

View file

@ -99,16 +99,16 @@ public final class InputLogic {
public void finishInput() { public void finishInput() {
} }
public void onCodeInput(final int primaryCode, final int x, final int y, public void onCodeInput(final int codePoint, final int x, final int y,
// TODO: remove these three arguments // TODO: remove these three arguments
final LatinIME.UIHandler handler, final KeyboardSwitcher keyboardSwitcher, final LatinIME.UIHandler handler, final KeyboardSwitcher keyboardSwitcher,
final SubtypeSwitcher subtypeSwitcher) { final SubtypeSwitcher subtypeSwitcher) {
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.latinIME_onCodeInput(primaryCode, x, y); ResearchLogger.latinIME_onCodeInput(codePoint, x, y);
} }
final SettingsValues settingsValues = Settings.getInstance().getCurrent(); final SettingsValues settingsValues = Settings.getInstance().getCurrent();
final long when = SystemClock.uptimeMillis(); final long when = SystemClock.uptimeMillis();
if (primaryCode != Constants.CODE_DELETE if (codePoint != Constants.CODE_DELETE
|| when > mLastKeyTime + Constants.LONG_PRESS_MILLISECONDS) { || when > mLastKeyTime + Constants.LONG_PRESS_MILLISECONDS) {
mDeleteCount = 0; mDeleteCount = 0;
} }
@ -126,12 +126,12 @@ public final class InputLogic {
} }
// TODO: Consolidate the double-space period timer, mLastKeyTime, and the space state. // TODO: Consolidate the double-space period timer, mLastKeyTime, and the space state.
if (primaryCode != Constants.CODE_SPACE) { if (codePoint != Constants.CODE_SPACE) {
handler.cancelDoubleSpacePeriodTimer(); handler.cancelDoubleSpacePeriodTimer();
} }
boolean didAutoCorrect = false; boolean didAutoCorrect = false;
switch (primaryCode) { switch (codePoint) {
case Constants.CODE_DELETE: case Constants.CODE_DELETE:
mSpaceState = SpaceState.NONE; mSpaceState = SpaceState.NONE;
handleBackspace(settingsValues, spaceState, handler, keyboardSwitcher); handleBackspace(settingsValues, spaceState, handler, keyboardSwitcher);
@ -144,7 +144,7 @@ public final class InputLogic {
if (null != currentKeyboard && currentKeyboard.mId.isAlphabetKeyboard()) { if (null != currentKeyboard && currentKeyboard.mId.isAlphabetKeyboard()) {
// TODO: Instead of checking for alphabetic keyboard here, separate keycodes for // TODO: Instead of checking for alphabetic keyboard here, separate keycodes for
// alphabetic shift and shift while in symbol layout. // alphabetic shift and shift while in symbol layout.
handleRecapitalize(); performRecapitalization();
} }
break; break;
case Constants.CODE_CAPSLOCK: case Constants.CODE_CAPSLOCK:
@ -204,16 +204,16 @@ public final class InputLogic {
break; break;
default: default:
didAutoCorrect = handleNonSpecialCharacter(settingsValues, didAutoCorrect = handleNonSpecialCharacter(settingsValues,
primaryCode, x, y, spaceState, keyboardSwitcher); codePoint, x, y, spaceState, keyboardSwitcher);
break; break;
} }
switcher.onCodeInput(primaryCode); switcher.onCodeInput(codePoint);
// Reset after any single keystroke, except shift, capslock, and symbol-shift // Reset after any single keystroke, except shift, capslock, and symbol-shift
if (!didAutoCorrect && primaryCode != Constants.CODE_SHIFT if (!didAutoCorrect && codePoint != Constants.CODE_SHIFT
&& primaryCode != Constants.CODE_CAPSLOCK && codePoint != Constants.CODE_CAPSLOCK
&& primaryCode != Constants.CODE_SWITCH_ALPHA_SYMBOL) && codePoint != Constants.CODE_SWITCH_ALPHA_SYMBOL)
mLastComposedWord.deactivate(); mLastComposedWord.deactivate();
if (Constants.CODE_DELETE != primaryCode) { if (Constants.CODE_DELETE != codePoint) {
mEnteredText = null; mEnteredText = null;
} }
mConnection.endBatchEdit(); mConnection.endBatchEdit();
@ -432,8 +432,8 @@ public final class InputLogic {
/** /**
* Processes a recapitalize event. * Processes a recapitalize event.
*/ */
private void handleRecapitalize() { private void performRecapitalization() {
mLatinIME.handleRecapitalize(); mLatinIME.performRecapitalization();
} }
/** /**