private AccessibilityEvent createEventForChild(int i, int j) { AccessibilityEvent accessibilityevent = AccessibilityEvent.obtain(j); accessibilityevent.setEnabled(true); accessibilityevent.setClassName(DEFAULT_CLASS_NAME); onPopulateEventForVirtualView(i, accessibilityevent); if (accessibilityevent.getText().isEmpty() && accessibilityevent.getContentDescription() == null) { throw new RuntimeException( "Callbacks must add text or a content description in populateEventForVirtualViewId()"); } else { accessibilityevent.setPackageName(mView.getContext().getPackageName()); AccessibilityEventCompat.asRecord(accessibilityevent).setSource(mView, i); return accessibilityevent; } }
public void onInitializeAccessibilityEvent(View var1, AccessibilityEvent var2) { super.onInitializeAccessibilityEvent(var1, var2); NestedScrollView var4 = (NestedScrollView) var1; var2.setClassName(ScrollView.class.getName()); AccessibilityRecordCompat var5 = AccessibilityEventCompat.asRecord(var2); boolean var3; if (var4.getScrollRange() > 0) { var3 = true; } else { var3 = false; } var5.setScrollable(var3); var5.setScrollX(var4.getScrollX()); var5.setScrollY(var4.getScrollY()); var5.setMaxScrollX(var4.getScrollX()); var5.setMaxScrollY(var4.getScrollRange()); }