Some more simplification

Remove useless method calls, and ultimately remove useless
method.

Change-Id: I3f353b1b37460d5e9ceae5cb5dde3fff0da81c21
main
Jean Chalard 2012-02-08 11:50:34 +09:00
parent 7ef97ea1f9
commit 6a800b253f
2 changed files with 2 additions and 8 deletions

View File

@ -2107,13 +2107,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
CharSequence toLeft = ic.getTextBeforeCursor(1, 0); CharSequence toLeft = ic.getTextBeforeCursor(1, 0);
CharSequence toRight = ic.getTextAfterCursor(1, 0); CharSequence toRight = ic.getTextAfterCursor(1, 0);
if (!TextUtils.isEmpty(toLeft) if (!TextUtils.isEmpty(toLeft)
&& !mSettingsValues.isWordSeparator(toLeft.charAt(0)) && !mSettingsValues.isWordSeparator(toLeft.charAt(0))) {
&& !mSettingsValues.isSuggestedPunctuation(toLeft.charAt(0))) {
return true; return true;
} }
if (!TextUtils.isEmpty(toRight) if (!TextUtils.isEmpty(toRight)
&& !mSettingsValues.isWordSeparator(toRight.charAt(0)) && !mSettingsValues.isWordSeparator(toRight.charAt(0))) {
&& !mSettingsValues.isSuggestedPunctuation(toRight.charAt(0))) {
return true; return true;
} }
return false; return false;

View File

@ -222,10 +222,6 @@ public class SettingsValues {
res.getBoolean(R.bool.config_default_vibration_enabled)); res.getBoolean(R.bool.config_default_vibration_enabled));
} }
public boolean isSuggestedPunctuation(int code) {
return mSuggestPuncs.contains(String.valueOf((char)code));
}
public boolean isWordSeparator(int code) { public boolean isWordSeparator(int code) {
return mWordSeparators.contains(String.valueOf((char)code)); return mWordSeparators.contains(String.valueOf((char)code));
} }