From 3f46955bd5fc79bbf67c90203c269858d9218655 Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Mon, 13 Sep 2010 19:54:00 +0800 Subject: [PATCH] Fix if ACTION_DOWN and lost focus time too close, it will become long press. 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 1766345f2c80..232dd6a8f63f 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -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); -- 2.11.0