Merge "Make sure setting switch bar state is announced." into nyc-mr1-dev

This commit is contained in:
Phil Weaver
2016-08-31 21:32:07 +00:00
committed by Android (Google) Code Review

View File

@@ -341,6 +341,14 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
return Switch.class.getName(); return Switch.class.getName();
} }
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
// Since the children are marked as not important for accessibility, re-dispatch all
// of their events as if they came from this view
event.setSource(this);
return true;
}
/** @hide */ /** @hide */
@Override @Override
public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {