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,8 +16617,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
invalidate(true); invalidate(true);
refreshDrawableState(); refreshDrawableState();
dispatchSetSelected(selected); dispatchSetSelected(selected);
notifyViewAccessibilityStateChangedIfNeeded( if (selected) {
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
} else {
notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
} }
} }