From e004b868f3e10d133798cfc719a69e3a1db0fa18 Mon Sep 17 00:00:00 2001 From: Dmitry Tsyganyuk Date: Wed, 29 Aug 2012 11:04:03 -0500 Subject: Fix NullException in QwertyKeyListener.KeyDown Extending null protection for view to "c == i" case in addition to "c == Character.toUpperCase(i)" case that helped to fix some force closures. Seems as typo in original implementation. Change-Id: Ibaa5aea95c5c8cdc8ac981fe0d1dad313e3e692f Signed-off-by: Dmitry Tsyganyuk --- core/java/android/text/method/QwertyKeyListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/java/android/text/method/QwertyKeyListener.java b/core/java/android/text/method/QwertyKeyListener.java index c5261f3..162731f 100644 --- a/core/java/android/text/method/QwertyKeyListener.java +++ b/core/java/android/text/method/QwertyKeyListener.java @@ -115,7 +115,7 @@ public class QwertyKeyListener extends BaseKeyListener { if (count > 0 && selStart == selEnd && selStart > 0) { char c = content.charAt(selStart - 1); - if (c == i || c == Character.toUpperCase(i) && view != null) { + if ((c == i || c == Character.toUpperCase(i)) && view != null) { if (showCharacterPicker(view, content, c, false, count)) { resetMetaState(content); return true; -- cgit v1.1