Merge "Fix NPE in KeyDetector"

main
Tadashi G. Takaoka 2014-02-27 05:35:37 +00:00 committed by Android (Google) Code Review
commit 0d69557f14
1 changed files with 3 additions and 0 deletions

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);