Merge "Send VIEW_SELECTED event when View selection state changes" into lmp-mr1-dev

This commit is contained in:
Alan Viverette
2014-10-14 23:52:21 +00:00
committed by Android (Google) Code Review

View File

@@ -16617,10 +16617,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
invalidate(true); invalidate(true);
refreshDrawableState(); refreshDrawableState();
dispatchSetSelected(selected); dispatchSetSelected(selected);
if (selected) {
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
} else {
notifyViewAccessibilityStateChangedIfNeeded( notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED); AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
} }
} }
}
/** /**
* Dispatch setSelected to all of this View's children. * Dispatch setSelected to all of this View's children.