Fix NPE on HOVER_EXIT event when not touching a key.

Bug: 6513368
Change-Id: Ia6d4d01f51a620230b4d19f813fb3aff6881ec03
This commit is contained in:
alanv 2012-05-17 19:53:51 -07:00
parent 817a66e7e6
commit d4f7a26f92

View file

@ -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$