在微信的新版本上,我想用uiautomator获取内容,但是用uiautomatorview,发现naf属性为True,然后内容就背隐藏了。
有没有办法,修改手机上的uiautomator.odex,让它变为显示内容呢?
在uiautomator的源码,AccessibilityNodeInfoDumper.java,上有个判断
    private static boolean nafCheck(AccessibilityNodeInfo node) {
        boolean isNaf = node.isClickable() && node.isEnabled()
                && safeCharSeqToString(node.getContentDescription()).isEmpty()
                && safeCharSeqToString(node.getText()).isEmpty();        if (!isNaf)
            return true;        // check children since sometimes the containing element is clickable
        // and NAF but a child's text or description is available. Will assume
        // such layout as fine.
        return childNafCheck(node);
    }
把这部分修改了。是不是可以显示textview的naf属性为True时的内容?
我不会JAVA,我只是看得懂点代码。
请高手帮我解决。
谢谢