[ExploreByTouchHelper] Make a11y calls on views
Make a11y calls on the views in ExploreByTouchHelper instead of on the delegate itself. This makes it consistent with the support library implementation and allows to use this helper on views that implement custom accessibility methods. (Like TextView) Change-Id: I6b0d94cecb752289394272dfcf9bd6f55f9700d9
This commit is contained in:
@@ -271,7 +271,7 @@ public abstract class ExploreByTouchHelper extends View.AccessibilityDelegate {
|
||||
*/
|
||||
private AccessibilityEvent createEventForHost(int eventType) {
|
||||
final AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
|
||||
onInitializeAccessibilityEvent(mView, event);
|
||||
mView.onInitializeAccessibilityEvent(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ public abstract class ExploreByTouchHelper extends View.AccessibilityDelegate {
|
||||
*/
|
||||
private AccessibilityNodeInfo createNodeForHost() {
|
||||
final AccessibilityNodeInfo node = AccessibilityNodeInfo.obtain(mView);
|
||||
onInitializeAccessibilityNodeInfo(mView, node);
|
||||
mView.onInitializeAccessibilityNodeInfo(node);
|
||||
|
||||
// Add the virtual descendants.
|
||||
if (mTempArray == null) {
|
||||
@@ -465,7 +465,7 @@ public abstract class ExploreByTouchHelper extends View.AccessibilityDelegate {
|
||||
}
|
||||
|
||||
private boolean performActionForHost(int action, Bundle arguments) {
|
||||
return performAccessibilityAction(mView, action, arguments);
|
||||
return mView.performAccessibilityAction(action, arguments);
|
||||
}
|
||||
|
||||
private boolean performActionForChild(int virtualViewId, int action, Bundle arguments) {
|
||||
|
||||
Reference in New Issue
Block a user