am 0d69557f: Merge "Fix NPE in KeyDetector"

* commit '0d69557f140c5d86c109161308f33fa95f70e963':
  Fix NPE in KeyDetector
main
Tadashi G. Takaoka 2014-02-26 21:37:14 -08:00 committed by Android Git Automerger
commit 2c4f635eee
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. * @return the key that the touch point hits.
*/ */
public Key detectHitKey(final int x, final int y) { public Key detectHitKey(final int x, final int y) {
if (mKeyboard == null) {
return null;
}
final int touchX = getTouchX(x); final int touchX = getTouchX(x);
final int touchY = getTouchY(y); final int touchY = getTouchY(y);