Merge "Fix NPE in KeyDetector"

This commit is contained in:
Tadashi G. Takaoka 2014-02-27 05:35:37 +00:00 committed by Android (Google) Code Review
commit 0d69557f14

View file

@ -86,6 +86,9 @@ public class KeyDetector {
* @return the key that the touch point hits.
*/
public Key detectHitKey(final int x, final int y) {
if (mKeyboard == null) {
return null;
}
final int touchX = getTouchX(x);
final int touchY = getTouchY(y);