diff options
Diffstat (limited to 'core/java/android/view/ViewGroup.java')
| -rw-r--r-- | core/java/android/view/ViewGroup.java | 54 |
1 files changed, 5 insertions, 49 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 7b404b45f729..08daa280b10a 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -586,35 +586,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * {@inheritDoc} */ - public boolean requestSendAccessibilityEvent(View child, AccessibilityEvent event) { - ViewParent parent = getParent(); - if (parent == null) { - return false; - } - final boolean propagate = onRequestSendAccessibilityEvent(child, event); - if (!propagate) { - return false; - } - return parent.requestSendAccessibilityEvent(this, event); - } - - /** - * Called when a child has requested sending an {@link AccessibilityEvent} and - * gives an opportunity to its parent to augment the event. - * - * @param child The child which requests sending the event. - * @param event The event to be sent. - * @return True if the event should be sent. - * - * @see #requestSendAccessibilityEvent(View, AccessibilityEvent) - */ - public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) { - return true; - } - - /** - * {@inheritDoc} - */ @Override public boolean dispatchUnhandledMove(View focused, int direction) { return mFocused != null && @@ -1245,8 +1216,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager eventNoHistory.setAction(MotionEvent.ACTION_HOVER_EXIT); handled |= dispatchTransformedGenericPointerEvent(eventNoHistory, mHoveredChild); eventNoHistory.setAction(action); + mHoveredChild = null; - } else { + } else if (action == MotionEvent.ACTION_HOVER_MOVE) { // Pointer is still within the child. handled |= dispatchTransformedGenericPointerEvent(event, mHoveredChild); } @@ -1306,17 +1278,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return handled; } - @Override - public boolean onHoverEvent(MotionEvent event) { - // Handle the event only if leaf. This guarantees that - // the leafs (or any custom class that returns true from - // this method) will get a change to process the hover. - if (getChildCount() == 0) { - return super.onHoverEvent(event); - } - return false; - } - private static MotionEvent obtainMotionEventNoHistoryOrSelf(MotionEvent event) { if (event.getHistorySize() == 0) { return event; @@ -2130,16 +2091,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { - // We first get a chance to populate the event. - onPopulateAccessibilityEvent(event); - // Let our children have a shot in populating the event. + boolean populated = false; for (int i = 0, count = getChildCount(); i < count; i++) { - boolean handled = getChildAt(i).dispatchPopulateAccessibilityEvent(event); - if (handled) { - return handled; - } + populated |= getChildAt(i).dispatchPopulateAccessibilityEvent(event); } - return false; + return populated; } /** |
