Source:
protected void onGetStyles(View element, StyleAccumulator styles) { List<ViewCSSProperty> properties = getViewProperties(); for (int i = 0, size = properties.size(); i < size; i++) { ViewCSSProperty property = properties.get(i); try { getStyleFromValue( "<this_view>", element, property.getCSSName(), property.getValue(element), property.getAnnotation(), styles); } catch (Exception e) { if (e instanceof IllegalAccessException || e instanceof InvocationTargetException) { LogUtil.e(e, "failed to get style property " + property.getCSSName() + " of element= " + element.toString()); } else { throw ExceptionUtil.propagate(e); } } } AccessibilityNodeInfoCompat nodeInfo = AccessibilityNodeInfoCompat.obtain(); ViewCompat.onInitializeAccessibilityNodeInfo(element, nodeInfo); boolean ignored = AccessibilityNodeInfoWrapper.getIgnored(nodeInfo, element); getStyleFromValue( "Accessibility Properties", element, "ignored", ignored, null, styles); if (ignored) { getStyleFromValue( "Accessibility Properties", element, "ignored-reasons", AccessibilityNodeInfoWrapper.getIgnoredReasons(nodeInfo, element), null, styles); } getStyleFromValue( "Accessibility Properties", element, "focusable", !ignored, null, styles); if (!ignored) { getStyleFromValue( "Accessibility Properties", element, "focusable-reasons", AccessibilityNodeInfoWrapper.getFocusableReasons(nodeInfo, element), null, styles); getStyleFromValue( "Accessibility Properties", element, "focused", nodeInfo.isAccessibilityFocused(), null, styles); getStyleFromValue( "Accessibility Properties", element, "description", AccessibilityNodeInfoWrapper.getDescription(nodeInfo, element), null, styles); getStyleFromValue( "Accessibility Properties", element, "actions", AccessibilityNodeInfoWrapper.getActions(nodeInfo), null, styles); } nodeInfo.recycle(); }

Target:
protected void onGetStyles(View element, StyleAccumulator styles) { List<ViewCSSProperty> properties = getViewProperties(); for (int i = 0, size = properties.size(); i < size; i++) { ViewCSSProperty property = properties.get(i); try { getStyleFromValue( VIEW_SELECTOR_NAME, element, property.getCSSName(), property.getValue(element), property.getAnnotation(), styles); } catch (Exception e) { if (e instanceof IllegalAccessException || e instanceof InvocationTargetException) { LogUtil.e(e, "failed to get style property " + property.getCSSName() + " of element= " + element.toString()); } else { throw ExceptionUtil.propagate(e); } } } AccessibilityNodeInfoCompat nodeInfo = AccessibilityNodeInfoCompat.obtain(); ViewCompat.onInitializeAccessibilityNodeInfo(element, nodeInfo); boolean ignored = AccessibilityNodeInfoWrapper.getIgnored(nodeInfo, element); getStyleFromValue( ACCESSIBILITY_SELECTOR_NAME, element, "ignored", ignored, null, styles); if (ignored) { getStyleFromValue( ACCESSIBILITY_SELECTOR_NAME, element, "ignored-reasons", AccessibilityNodeInfoWrapper.getIgnoredReasons(nodeInfo, element), null, styles); } getStyleFromValue( ACCESSIBILITY_SELECTOR_NAME, element, "focusable", !ignored, null, styles); if (!ignored) { getStyleFromValue( ACCESSIBILITY_SELECTOR_NAME, element, "focusable-reasons", AccessibilityNodeInfoWrapper.getFocusableReasons(nodeInfo, element), null, styles); getStyleFromValue( ACCESSIBILITY_SELECTOR_NAME, element, "focused", nodeInfo.isAccessibilityFocused(), null, styles); getStyleFromValue( ACCESSIBILITY_SELECTOR_NAME, element, "description", AccessibilityNodeInfoWrapper.getDescription(nodeInfo, element), null, styles); getStyleFromValue( ACCESSIBILITY_SELECTOR_NAME, element, "actions", AccessibilityNodeInfoWrapper.getActions(nodeInfo), null, styles); } nodeInfo.recycle(); }