OSDN Git Service

Fix if ACTION_DOWN and lost focus time too close, it will become long press.
authorTony Wu <Tony_Wu@acer.com.tw>
Mon, 13 Sep 2010 11:54:00 +0000 (19:54 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 5 Aug 2011 08:09:42 +0000 (16:09 +0800)
It will become long press because CheckForTap is still posted in background.
So remove the callback when lose focus, or it will become long press event.

Change-Id: I4f98a6fc077d256edbe555464095b2b81e75dd41

core/java/android/view/View.java

index 1766345..232dd6a 100644 (file)
@@ -3944,6 +3944,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
                 imm.focusOut(this);
             }
             removeLongPressCallback();
+            removeTapCallback();
             onFocusLost();
         } else if (imm != null && (mPrivateFlags & FOCUSED) != 0) {
             imm.focusIn(this);