From d4f7a26f9257c3b0e41a43a0338ed4bcd3d6bd91 Mon Sep 17 00:00:00 2001 From: alanv Date: Thu, 17 May 2012 19:53:51 -0700 Subject: [PATCH] Fix NPE on HOVER_EXIT event when not touching a key. Bug: 6513368 Change-Id: Ia6d4d01f51a620230b4d19f813fb3aff6881ec03 --- .../inputmethod/accessibility/AccessibleKeyboardViewProxy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java index 1b0e488bc..2623dcc03 100644 --- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java +++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java @@ -113,7 +113,7 @@ public class AccessibleKeyboardViewProxy extends AccessibilityDelegateCompat { case MotionEvent.ACTION_HOVER_EXIT: // Make sure we're not getting an EXIT event because the user slid // off the keyboard area, then force a key press. - if (pointInView(x, y)) { + if (pointInView(x, y) && (key != null)) { getAccessibilityNodeProvider().simulateKeyPress(key); } //$FALL-THROUGH$