Merge "Fix crash in KeyboardView with null Handler"

This commit is contained in:
Clara Bayarri
2015-10-23 15:20:56 +00:00
committed by Android (Google) Code Review

View File

@@ -1410,9 +1410,11 @@ public class KeyboardView extends View implements View.OnClickListener {
}
private void removeMessages() {
mHandler.removeMessages(MSG_REPEAT);
mHandler.removeMessages(MSG_LONGPRESS);
mHandler.removeMessages(MSG_SHOW_PREVIEW);
if (mHandler != null) {
mHandler.removeMessages(MSG_REPEAT);
mHandler.removeMessages(MSG_LONGPRESS);
mHandler.removeMessages(MSG_SHOW_PREVIEW);
}
}
@Override