Skip to content
Snippets Groups Projects
Commit 49426a1e authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix potential NPE

Bug: 5462524
Change-Id: I76012d1bbcd83d58f034c2f588802e4d1b7edc4d
parent 9f058749
No related branches found
No related tags found
No related merge requests found
......@@ -1814,8 +1814,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final int rawPrimaryCode = suggestion.charAt(0);
// Maybe apply the "bidi mirrored" conversions for parentheses
final LatinKeyboard keyboard = mKeyboardSwitcher.getLatinKeyboard();
final int primaryCode = Key.getRtlParenthesisCode(
rawPrimaryCode, keyboard.mIsRtlKeyboard);
final boolean isRtl = keyboard != null && keyboard.mIsRtlKeyboard;
final int primaryCode = Key.getRtlParenthesisCode(rawPrimaryCode, isRtl);
final CharSequence beforeText = ic != null ? ic.getTextBeforeCursor(1, 0) : "";
final int toLeft = (ic == null || TextUtils.isEmpty(beforeText))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment