Some more simplification
Remove useless method calls, and ultimately remove useless method. Change-Id: I3f353b1b37460d5e9ceae5cb5dde3fff0da81c21main
parent
7ef97ea1f9
commit
6a800b253f
|
@ -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;
|
||||||
|
|
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue