wrap(node.getTransformation())); json.put("visibility", wrap(node.getVisibility())); json.put("webDomain", wrap(node.getWebDomain())); json.put("width", wrap(node.getWidth()));
private void parseWebDomain(AssistStructure.ViewNode viewNode, StringBuilder validWebDomain) { String webDomain = viewNode.getWebDomain(); if (webDomain != null) { logd("child web domain: %s", webDomain); if (validWebDomain.length() > 0) { if (!webDomain.equals(validWebDomain.toString())) { throw new SecurityException("Found multiple web domains: valid= " + validWebDomain + ", child=" + webDomain); } } else { validWebDomain.append(webDomain); } } }
.append("\tvisibility").append(node.getVisibility()) .append("\tchecked: ").append(node.isChecked()) .append("\twebDomain: ").append(node.getWebDomain()) .append("\thint: ").append(node.getHint()) .append('\n');
.append("\tvisibility").append(node.getVisibility()) .append("\tchecked: ").append(node.isChecked()) .append("\twebDomain: ").append(node.getWebDomain()) .append("\thint: ").append(node.getHint()) .append('\n');
Result parse() { result = new Result(); usernameCandidate = null; for (int i=0; i<structure.getWindowNodeCount(); ++i) { AssistStructure.WindowNode windowNode = structure.getWindowNodeAt(i); result.title.add(windowNode.getTitle()); result.webDomain.add(windowNode.getRootViewNode().getWebDomain()); parseViewNode(windowNode.getRootViewNode()); } // If not explicit username field found, add the field just before password field. if (result.username.isEmpty() && result.email.isEmpty() && !result.password.isEmpty() && usernameCandidate != null) result.username.add(usernameCandidate); return result; }