Small rename

Left/Right is wrong terminology here

Change-Id: I58c55849e45d9984dd3fb7b75a64e07667c9eba4
This commit is contained in:
Jean Chalard 2012-03-08 18:49:38 +09:00
parent f8b39f39cd
commit 8667bbeab3

View file

@ -2132,14 +2132,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public boolean isCursorTouchingWord() {
final InputConnection ic = getCurrentInputConnection();
if (ic == null) return false;
CharSequence toLeft = ic.getTextBeforeCursor(1, 0);
CharSequence toRight = ic.getTextAfterCursor(1, 0);
if (!TextUtils.isEmpty(toLeft)
&& !mSettingsValues.isWordSeparator(toLeft.charAt(0))) {
CharSequence before = ic.getTextBeforeCursor(1, 0);
CharSequence after = ic.getTextAfterCursor(1, 0);
if (!TextUtils.isEmpty(before) && !mSettingsValues.isWordSeparator(before.charAt(0))) {
return true;
}
if (!TextUtils.isEmpty(toRight)
&& !mSettingsValues.isWordSeparator(toRight.charAt(0))) {
if (!TextUtils.isEmpty(after) && !mSettingsValues.isWordSeparator(after.charAt(0))) {
return true;
}
return false;