Skip to content

Commit 26edf20

Browse files
Tony WuTony Wu
authored andcommitted
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
1 parent 15f0a79 commit 26edf20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/java/android/view/View.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3808,6 +3808,7 @@ public void onWindowFocusChanged(boolean hasWindowFocus) {
38083808
imm.focusOut(this);
38093809
}
38103810
removeLongPressCallback();
3811+
removeTapCallback();
38113812
onFocusLost();
38123813
} else if (imm != null && (mPrivateFlags & FOCUSED) != 0) {
38133814
imm.focusIn(this);

0 commit comments

Comments
 (0)