title: Is android's motion event handling accurate?
body: <p><b>Bug</b></p>
  
  <p>I have a weird bug in my piano app. Sometimes keys (and thus notes) hang. I did a lot of debugging and narrowed it down to what looks like androids inaccuracy of motion event handling:</p>
  
  <pre><code> DEBUG/(2091): ACTION_DOWN A4
   DEBUG/(2091): KeyDown: A4
   DEBUG/(2091): ACTION_MOVE A4 =&gt; A4
   DEBUG/(2091): ACTION_MOVE ignoring
   DEBUG/(2091): ACTION_MOVE A4 =&gt; A4
   DEBUG/(2091): ACTION_MOVE ignoring
   DEBUG/(2091): ACTION_MOVE A4 =&gt; A4
   DEBUG/(2091): ACTION_MOVE ignoring
   DEBUG/(2091): ACTION_UP B4 //HOW CAN THIS BE????
   DEBUG/(2091): KeyUp: B4
   DEBUG/(2091): Stream is null, can't stop
   DEBUG/(2091): Hanging Note: A4 X=240-287 EventX=292 Y=117-200 EventY=164
   DEBUG/(2091): KeyUp Note:   B4 X=288-335 EventX=292 Y=117-200 EventY=164
  </code></pre>
  
  <p>Clearly it can be seen here that out of nowhere I suddenly have an <code>ACTION_UP</code> for another note. Shouldn't I definitely get a <code>ACTION_MOVE</code> first?</p>
  
  <p>As shown in the end of the log, it's definitely not an error in region detection, since the <code>ACTION_UP</code> event is clearly in the B4 region.</p>
  
  <p><b>Logging Implementation details</b></p>
  
  <p>Every <code>onTouchEvent()</code> call is logged, so the log is accurate.</p>
  
  <p>The relevant pseudo-code for the ACTION_MOVE logging is:</p>
  
  <pre><code> Key oldKey = Key.get(event.getHistoricalX(), event.getHistoricalY());
   Key newKey = Key.get(event.getX(), event.getY());
  </code></pre>
  
  <p><b>Question</b></p>
  
  <p>Is this normal behaviour for Android (the jumping in coordinates)? </p>
  
  <p>Can a <code>ACTION_UP</code> just occur without any previous <code>ACTION_MOVE</code> towards it's coordinates?</p>