Fix potential NPE in MainKeyboardView.KeyTimerHandler

Bug: 8469652
Change-Id: Ib7a548e6a24d2e02de85ab444c0ec99d8f6b82c3
main
Tadashi G. Takaoka 2013-03-28 17:54:36 +09:00
parent 2188cbae63
commit 48d8d8d0ae
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
@Override @Override
public void handleMessage(final Message msg) { public void handleMessage(final Message msg) {
final MainKeyboardView keyboardView = getOuterInstance(); final MainKeyboardView keyboardView = getOuterInstance();
if (keyboardView == null) {
return;
}
final PointerTracker tracker = (PointerTracker) msg.obj; final PointerTracker tracker = (PointerTracker) msg.obj;
switch (msg.what) { switch (msg.what) {
case MSG_TYPING_STATE_EXPIRED: case MSG_TYPING_STATE_EXPIRED: