diff options
author | 2011-07-22 06:14:22 +0900 | |
---|---|---|
committer | 2011-07-22 06:14:22 +0900 | |
commit | 035f0f5c94136fa1c209d5d209ab8f27d4ca016e (patch) | |
tree | fcf76ee134be41793a40f8c286c00286dc6a4672 /java/src | |
parent | 8721398ec07be649fdceea536cb1c262a32d1754 (diff) | |
download | latinime-035f0f5c94136fa1c209d5d209ab8f27d4ca016e.tar.gz latinime-035f0f5c94136fa1c209d5d209ab8f27d4ca016e.tar.xz latinime-035f0f5c94136fa1c209d5d209ab8f27d4ca016e.zip |
Fix NPE
bug: 5054162
Change-Id: I69d308f0eeb32968515100dde98ad51a7c35020e
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardView.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index d23b8ff0e..1641dc4a5 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -136,6 +136,7 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy { @Override public void handleMessage(Message msg) { final KeyboardView keyboardView = getOuterInstance(); + if (keyboardView == null) return; final PointerTracker tracker = (PointerTracker) msg.obj; switch (msg.what) { case MSG_SHOW_KEY_PREVIEW: @@ -150,8 +151,9 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy { } public void showKeyPreview(long delay, int keyIndex, PointerTracker tracker) { - final KeyboardView keyboardView = getOuterInstance(); removeMessages(MSG_SHOW_KEY_PREVIEW); + final KeyboardView keyboardView = getOuterInstance(); + if (keyboardView == null) return; if (keyboardView.mPreviewText.getVisibility() == VISIBLE || delay == 0) { // Show right away, if it's already visible and finger is moving around keyboardView.showKey(keyIndex, tracker); |