From e7a4e636ac0923d72505efd6df8cd130c83fe97c Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Thu, 25 Apr 2013 17:32:45 -0700 Subject: [PATCH] Revert change f449c0c381239dc0f78b0f01ecfb3889e056a597. Previously, onHoverEvent() would return true if a view was hoverable and consume the event. After the change, it would return the result of dispatchGenericMotionEventInternal(). As a result, touch exploration caused multiple hover events to be sent from every view under a given touch point. This change reverts to the original behavior and fixes touch exploration. BUG: 8723842 Change-Id: I0c7362f19c51bf21ed842711a03b7f02613958d2 --- core/java/android/view/View.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 5589244660472..81db473d7014d 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -8228,7 +8228,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // in onHoverEvent. // Note that onGenericMotionEvent will be called by default when // onHoverEvent returns false (refer to dispatchGenericMotionEvent). - return dispatchGenericMotionEventInternal(event); + dispatchGenericMotionEventInternal(event); + // The event was already handled by calling setHovered(), so always + // return true. + return true; } return false;