title: OnDragListener not receiving callbacks after dragged fastly
body: <p>Firstly, this question may looks like duplicate of <a href="https://stackoverflow.com/questions/19410949/ondraglistener-not-receiving-drag-started-or-drag-ended-but-does-get-action-dro">this question</a>, and looks like recorded as issue <a href="https://code.google.com/p/android/issues/detail?id=25073" rel="nofollow noreferrer">here</a>, but after looking into the details, you will realize that it is completely different.</p>
  
  <h3>The setup</h3>
  
  <p>I am trying to implement a simple drag and drop function: When I drag ImageView A to ImageView B, they will swap their background color.  </p>
  
  <p><a href="https://i.stack.imgur.com/JxX27.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JxX27.png" alt="Effect Illustration"></a></p>
  
  <p>You can download this little test project <a href="https://github.com/siralam/DragSwapImageTest" rel="nofollow noreferrer">here</a>. The problem described below can be reproduced by cloning it and build it on your phone.</p>
  
  <p>Look at <a href="https://github.com/siralam/DragSwapImageTest/blob/master/app/src/main/java/com/asksira/dragswapimagedemo/MainActivity.java" rel="nofollow noreferrer">MainActivity</a> if you just want to look at the code.</p>
  
  <h3>The problem</h3>
  
  <p>If you perform the drag and drop slowly (e.g. 0.5 seconds for each drag and drop), it works perfectly.</p>
  
  <p>However, if you try to drag and drop at your fasted speed (e.g. 4 to 5 times in a second, anyway your fastest speed), soon you will find that the drag and drop action cannot be performed anymore. By looking at the log, I find that <strong>none of the drag callbacks are fired</strong>.</p>
  
  <pre><code>03-12 10:41:53.782 (...) I/dragEvent: view.startDragAndDrop has been called
  03-12 10:41:53.787 (...) I/dragEvent: ACTION_DRAG_STARTED received
  03-12 10:41:53.787 (...) I/dragEvent: ACTION_DRAG_STARTED received
  03-12 10:41:53.789 (...) I/dragEvent: ACTION_DRAG_ENTERED received
  03-12 10:41:53.789 (...) I/dragEvent: ACTION_DRAG_LOCATION received
  03-12 10:41:53.796 (...) I/dragEvent: ACTION_DRAG_LOCATION received
  03-12 10:41:53.802 (...) I/dragEvent: ACTION_DROP received
  03-12 10:41:53.815 (...) I/dragEvent: ACTION_DRAG_ENDED received
  03-12 10:41:53.815 (...) I/dragEvent: ACTION_DRAG_ENDED received
  03-12 10:41:54.014 (...) I/dragEvent: view.startDragAndDrop has been called //Since this call, no callbacks were received
  </code></pre>
  
  <p>At this point, the app does not freeze. OnTouchListener is still receiving callbacks.<br>
  The drag and drop freezes because I have a flag to indicate whether the drag and drop is in progress, and since ACTION_DRAG_ENDED is not fired, this flag is stuck at <code>true</code> and therefore no more drag and drop action can be performed.</p>
  
  <p>I have really no idea why, since I have logged everything, every lines of code are running correctly and I expected to receive callbacks from Android framework, but it is not...</p>
  
  <h3>Why I think it should be solvable</h3>
  
  <p>Actually, this little test project is me trying to clone the drag and drop image swap implemented in <a href="https://play.google.com/store/apps/details?id=com.mt.mtxx.mtxx" rel="nofollow noreferrer">this</a> app. And I cannot reproduce this problem in their app... So I think there must be something wrong in my code; or some alternative to tackle it.</p>