Fix NPE on non-distict multitouch device

Change-Id: I6d8a05bf62e510d0556fa4831b3d510041cca63a
This commit is contained in:
Tadashi G. Takaoka 2011-04-22 17:33:24 +09:00
parent c5c57b506e
commit d00d963b9d

View file

@ -459,7 +459,8 @@ public class PointerTracker {
keyboard.updateSpacebarPreviewIcon(diff); keyboard.updateSpacebarPreviewIcon(diff);
// Display spacebar slide language switcher. // Display spacebar slide language switcher.
showKeyPreview(keyIndex); showKeyPreview(keyIndex);
queue.releaseAllPointersExcept(this, eventTime, true); if (queue != null)
queue.releaseAllPointersExcept(this, eventTime, true);
} }
} }
} }
@ -551,7 +552,8 @@ public class PointerTracker {
public void onLongPressed(PointerTrackerQueue queue) { public void onLongPressed(PointerTrackerQueue queue) {
mKeyAlreadyProcessed = true; mKeyAlreadyProcessed = true;
queue.remove(this); if (queue != null)
queue.remove(this);
} }
public void onCancelEvent(int x, int y, long eventTime, PointerTrackerQueue queue) { public void onCancelEvent(int x, int y, long eventTime, PointerTrackerQueue queue) {