am a828f613: Merge "Some more simplification"

* commit 'a828f613a8dfbeff6290f261bbbd5ff988fb99b6':
  Some more simplification
main
Jean Chalard 2012-02-08 19:06:52 -08:00 committed by Android Git Automerger
commit 360a66cf75
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 toRight = ic.getTextAfterCursor(1, 0);
if (!TextUtils.isEmpty(toLeft)
&& !mSettingsValues.isWordSeparator(toLeft.charAt(0))
&& !mSettingsValues.isSuggestedPunctuation(toLeft.charAt(0))) {
&& !mSettingsValues.isWordSeparator(toLeft.charAt(0))) {
return true;
}
if (!TextUtils.isEmpty(toRight)
&& !mSettingsValues.isWordSeparator(toRight.charAt(0))
&& !mSettingsValues.isSuggestedPunctuation(toRight.charAt(0))) {
&& !mSettingsValues.isWordSeparator(toRight.charAt(0))) {
return true;
}
return false;

View File

@ -222,10 +222,6 @@ public class SettingsValues {
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) {
return mWordSeparators.contains(String.valueOf((char)code));
}