Fix an NPE
Bug: 6538761 Change-Id: Id85486ee93437cfec7db421d5c7f2d7980a7e32e
This commit is contained in:
parent
37f81cd6e9
commit
6c0349012e
1 changed files with 1 additions and 1 deletions
|
@ -2299,7 +2299,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
final InputConnection ic = getCurrentInputConnection();
|
||||
if (null != ic) {
|
||||
final CharSequence lastChar = ic.getTextBeforeCursor(1, 0);
|
||||
if (lastChar.length() > 0 && Character.isHighSurrogate(lastChar.charAt(0))) {
|
||||
if (!TextUtils.isEmpty(lastChar) && Character.isHighSurrogate(lastChar.charAt(0))) {
|
||||
ic.deleteSurroundingText(1, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue