/frameworks/base/tools/aapt2/format/binary/ |
D | XmlFlattener_test.cpp | 93 ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG)); in TEST_F() 94 EXPECT_THAT(tree.getElementNamespace(&len), IsNull()); in TEST_F() 95 EXPECT_THAT(tree.getElementName(&len), StrEq(u"View")); in TEST_F() 97 ASSERT_THAT(tree.getAttributeCount(), Eq(1u)); in TEST_F() 98 EXPECT_THAT(tree.getAttributeNamespace(0, &len), IsNull()); in TEST_F() 99 EXPECT_THAT(tree.getAttributeName(0, &len), StrEq(u"attr")); in TEST_F() 102 EXPECT_THAT(tree.indexOfAttribute(nullptr, 0, kAttr.data(), kAttr.size()), Eq(0)); in TEST_F() 104 ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG)); in TEST_F() 105 EXPECT_THAT(tree.getElementNamespace(&len), IsNull()); in TEST_F() 106 EXPECT_THAT(tree.getElementName(&len), StrEq(u"Layout")); in TEST_F() [all …]
|
/frameworks/base/tools/aapt/ |
D | AaptXml.cpp | 26 static String8 getStringAttributeAtIndex(const ResXMLTree& tree, ssize_t attrIndex, in getStringAttributeAtIndex() argument 29 if (tree.getAttributeValue(attrIndex, &value) < 0) { in getStringAttributeAtIndex() 44 const char16_t* str = tree.getAttributeStringValue(attrIndex, &len); in getStringAttributeAtIndex() 48 static int32_t getIntegerAttributeAtIndex(const ResXMLTree& tree, ssize_t attrIndex, in getIntegerAttributeAtIndex() argument 51 if (tree.getAttributeValue(attrIndex, &value) < 0) { in getIntegerAttributeAtIndex() 69 ssize_t indexOfAttribute(const ResXMLTree& tree, uint32_t attrRes) { in indexOfAttribute() argument 70 size_t attrCount = tree.getAttributeCount(); in indexOfAttribute() 72 if (tree.getAttributeNameResID(i) == attrRes) { in indexOfAttribute() 79 String8 getAttribute(const ResXMLTree& tree, const char* ns, in getAttribute() argument 81 ssize_t idx = tree.indexOfAttribute(ns, attr); in getAttribute() [all …]
|
D | AaptXml.h | 31 ssize_t indexOfAttribute(const android::ResXMLTree& tree, uint32_t attrRes); 37 android::String8 getAttribute(const android::ResXMLTree& tree, const char* ns, 45 android::String8 getAttribute(const android::ResXMLTree& tree, uint32_t attrRes, 53 int32_t getIntegerAttribute(const android::ResXMLTree& tree, const char* ns, 61 inline int32_t getIntegerAttribute(const android::ResXMLTree& tree, const char* ns, in getIntegerAttribute() argument 63 return getIntegerAttribute(tree, ns, attr, -1, outError); in getIntegerAttribute() 71 int32_t getIntegerAttribute(const android::ResXMLTree& tree, uint32_t attrRes, 79 inline int32_t getIntegerAttribute(const android::ResXMLTree& tree, uint32_t attrRes, in getIntegerAttribute() argument 81 return getIntegerAttribute(tree, attrRes, -1, outError); in getIntegerAttribute() 90 const android::ResXMLTree& tree, uint32_t attrRes, int32_t defValue = -1, [all …]
|
D | Command.cpp | 218 ResXMLTree tree; in doList() local 219 tree.setTo(manifestAsset->getBuffer(true), in doList() 221 printXMLBlock(&tree); in doList() 233 static void printResolvedResourceAttribute(const ResTable& resTable, const ResXMLTree& tree, in printResolvedResourceAttribute() argument 237 AaptXml::getResolvedResourceAttribute(resTable, tree, attrRes, &value, outError); in printResolvedResourceAttribute() 243 String8 result = AaptXml::getResolvedAttribute(resTable, tree, attrRes, outError); in printResolvedResourceAttribute() 315 static void printCompatibleScreens(ResXMLTree& tree, String8* outError) { in printCompatibleScreens() argument 321 while ((code=tree.next()) != ResXMLTree::END_DOCUMENT && code != ResXMLTree::BAD_DOCUMENT) { in printCompatibleScreens() 333 const char16_t* ctag16 = tree.getElementName(&len); in printCompatibleScreens() 340 int32_t screenSize = AaptXml::getIntegerAttribute(tree, in printCompatibleScreens() [all …]
|
/frameworks/base/errorprone/java/com/google/errorprone/bugpatterns/android/ |
D | UnattributedNoteOpCallChecker.java | 30 import com.sun.source.tree.ExpressionTree; 31 import com.sun.source.tree.MethodInvocationTree; 100 public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { in matchMethodInvocation() argument 101 if (UNATTRIBUTED_NOTEOP_CALL_1.matches(tree, state) in matchMethodInvocation() 102 || UNATTRIBUTED_NOTEOP_CALL_2.matches(tree, state) in matchMethodInvocation() 103 || UNATTRIBUTED_NOTEOP_CALL_3.matches(tree, state)) { in matchMethodInvocation() 104 return buildDescription(tree) in matchMethodInvocation() 108 if (UNATTRIBUTED_NOTEOPNOTHROW_CALL_1.matches(tree, state) in matchMethodInvocation() 109 || UNATTRIBUTED_NOTEOPNOTHROW_CALL_2.matches(tree, state)) { in matchMethodInvocation() 110 return buildDescription(tree) in matchMethodInvocation() [all …]
|
D | RequiresPermissionChecker.java | 44 import com.sun.source.tree.AssignmentTree; 45 import com.sun.source.tree.ClassTree; 46 import com.sun.source.tree.ExpressionTree; 47 import com.sun.source.tree.IdentifierTree; 48 import com.sun.source.tree.MemberSelectTree; 49 import com.sun.source.tree.MethodInvocationTree; 50 import com.sun.source.tree.MethodTree; 51 import com.sun.source.tree.NewClassTree; 52 import com.sun.source.tree.Tree; 53 import com.sun.source.tree.VariableTree; [all …]
|
D | UidChecker.java | 30 import com.sun.source.tree.ExpressionTree; 31 import com.sun.source.tree.IdentifierTree; 32 import com.sun.source.tree.MemberSelectTree; 33 import com.sun.source.tree.MethodInvocationTree; 34 import com.sun.source.tree.NewClassTree; 35 import com.sun.source.tree.Tree; 55 public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { in matchMethodInvocation() argument 56 return matchArguments(ASTHelpers.getSymbol(tree).params(), tree.getArguments(), tree); in matchMethodInvocation() 60 public Description matchNewClass(NewClassTree tree, VisitorState state) { in matchNewClass() argument 61 return matchArguments(ASTHelpers.getSymbol(tree).params(), tree.getArguments(), tree); in matchNewClass() [all …]
|
D | EfficientParcelableChecker.java | 36 import com.sun.source.tree.ExpressionTree; 37 import com.sun.source.tree.MethodInvocationTree; 38 import com.sun.source.tree.Tree; 75 public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { in matchMethodInvocation() argument 76 if (INSIDE_WRITE_TO_PARCEL.matches(tree, state)) { in matchMethodInvocation() 77 if (WRITE_STRING.matches(tree, state)) { in matchMethodInvocation() 78 return buildDescription(tree) in matchMethodInvocation() 83 if (WRITE_STRING_ARRAY.matches(tree, state)) { in matchMethodInvocation() 84 return buildDescription(tree) in matchMethodInvocation() 90 if (WRITE_VALUE.matches(tree, state)) { in matchMethodInvocation() [all …]
|
D | EfficientStringsChecker.java | 43 import com.sun.source.tree.BinaryTree; 44 import com.sun.source.tree.CompoundAssignmentTree; 45 import com.sun.source.tree.ExpressionTree; 46 import com.sun.source.tree.LiteralTree; 47 import com.sun.source.tree.MethodInvocationTree; 48 import com.sun.source.tree.NewClassTree; 49 import com.sun.source.tree.Tree; 50 import com.sun.source.tree.Tree.Kind; 111 public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { in matchMethodInvocation() argument 112 if (FORMAT_CALL.matches(tree, state)) { in matchMethodInvocation() [all …]
|
D | BinderIdentityChecker.java | 32 import com.sun.source.tree.BlockTree; 33 import com.sun.source.tree.ExpressionTree; 34 import com.sun.source.tree.MethodInvocationTree; 35 import com.sun.source.tree.StatementTree; 36 import com.sun.source.tree.Tree; 37 import com.sun.source.tree.Tree.Kind; 38 import com.sun.source.tree.TryTree; 39 import com.sun.source.tree.VariableTree; 65 public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { in matchMethodInvocation() argument 66 if (CLEAR_CALL.matches(tree, state)) { in matchMethodInvocation() [all …]
|
D | EfficientCollectionsChecker.java | 31 import com.sun.source.tree.NewClassTree; 32 import com.sun.source.tree.Tree; 58 public Description matchNewClass(NewClassTree tree, VisitorState state) { in matchNewClass() argument 59 final List<Type> types = ASTHelpers.getType(tree).getTypeArguments(); in matchNewClass() 60 if (IS_LIST.matches(tree, state) && types != null && types.size() == 1) { in matchNewClass() 63 return buildDescription(tree) in matchNewClass() 67 return buildDescription(tree) in matchNewClass() 71 } else if (IS_MAP.matches(tree, state) && types != null && types.size() == 2) { in matchNewClass() 76 return buildDescription(tree) in matchNewClass() 80 return buildDescription(tree) in matchNewClass() [all …]
|
D | EfficientXmlChecker.java | 38 import com.sun.source.tree.AssignmentTree; 39 import com.sun.source.tree.ExpressionTree; 40 import com.sun.source.tree.IdentifierTree; 41 import com.sun.source.tree.MethodInvocationTree; 42 import com.sun.source.tree.MethodTree; 43 import com.sun.source.tree.NewClassTree; 44 import com.sun.source.tree.Tree; 45 import com.sun.source.tree.VariableTree; 173 public boolean matches(ExpressionTree tree, VisitorState state) { 174 if (PRIMITIVE_TO_STRING.matches(tree, state)) { [all …]
|
D | ContextUserIdChecker.java | 37 import com.sun.source.tree.ExpressionTree; 38 import com.sun.source.tree.IdentifierTree; 39 import com.sun.source.tree.MethodInvocationTree; 40 import com.sun.source.tree.Tree; 78 public boolean matches(ExpressionTree tree, VisitorState state) { 79 if (tree instanceof IdentifierTree) { 80 return "mUserId".equals((((IdentifierTree) tree).getName().toString())); 87 public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { in matchMethodInvocation() argument 88 if (INSIDE_MANAGER.matches(tree, state) in matchMethodInvocation() 89 && BINDER_CALL.matches(tree, state)) { in matchMethodInvocation() [all …]
|
D | BluetoothPermissionChecker.java | 46 import com.sun.source.tree.ClassTree; 47 import com.sun.source.tree.MethodTree; 48 import com.sun.source.tree.Tree; 108 public Description matchMethod(MethodTree tree, VisitorState state) { in matchMethod() argument 110 if (!BLUETOOTH_API.matches(tree, state)) return Description.NO_MATCH; in matchMethod() 113 if (BINDER_INTERNALS.matches(tree, state)) return Description.NO_MATCH; in matchMethod() 114 if (GENERIC_INTERNALS.matches(tree, state)) return Description.NO_MATCH; in matchMethod() 117 if (tree.getBody() == null && !BINDER_METHOD.matches(tree, state)) { in matchMethod() 122 final MethodSymbol symbol = ASTHelpers.getSymbol(tree); in matchMethod() 128 final RequiresPermission requiresPerm = ASTHelpers.getAnnotation(tree, in matchMethod() [all …]
|
D | TargetSdkChecker.java | 34 import com.sun.source.tree.BinaryTree; 35 import com.sun.source.tree.ExpressionTree; 36 import com.sun.source.tree.Tree.Kind; 78 public Description matchBinary(BinaryTree tree, VisitorState state) { in matchBinary() argument 79 if (INVALID_OLD_BEHAVIOR.matches(tree, state)) { in matchBinary() 80 return buildDescription(tree) in matchBinary() 85 if (INVALID_NEW_BEHAVIOR.matches(tree, state)) { in matchBinary() 86 return buildDescription(tree) in matchBinary() 98 public boolean matches(BinaryTree tree, VisitorState state) { in binaryTreeExact() 99 return left.matches(tree.getLeftOperand(), state) in binaryTreeExact() [all …]
|
D | RethrowFromSystemChecker.java | 40 import com.sun.source.tree.CatchTree; 41 import com.sun.source.tree.ExpressionTree; 42 import com.sun.source.tree.StatementTree; 43 import com.sun.source.tree.Tree; 44 import com.sun.source.tree.TryTree; 45 import com.sun.source.tree.VariableTree; 84 public Description matchTry(TryTree tree, VisitorState state) { in matchTry() argument 85 if (INSIDE_MANAGER.matches(tree, state) in matchTry() 87 .matches(tree.getBlock(), state)) { in matchTry() 88 for (CatchTree catchTree : tree.getCatches()) { in matchTry()
|
D | ClientSidePermissionCheckChecker.java | 34 import com.sun.source.tree.ExpressionTree; 35 import com.sun.source.tree.MethodInvocationTree; 36 import com.sun.source.tree.Tree; 75 public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { in matchMethodInvocation() argument 76 if (INSIDE_MANAGER.matches(tree, state) in matchMethodInvocation() 77 && PERMISSION_CHECK_METHOD.matches(tree, state)) { in matchMethodInvocation() 78 return buildDescription(tree) in matchMethodInvocation()
|
D | HideInCommentsChecker.java | 34 import com.sun.source.tree.ClassTree; 35 import com.sun.source.tree.CompilationUnitTree; 36 import com.sun.source.tree.MethodTree; 37 import com.sun.source.tree.NewClassTree; 38 import com.sun.source.tree.Tree; 39 import com.sun.source.tree.VariableTree; 65 public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) { in matchCompilationUnit() argument 66 final Map<Integer, Tree> javadocableTrees = findJavadocableTrees(tree, state); in matchCompilationUnit() 115 private Map<Integer, Tree> findJavadocableTrees(CompilationUnitTree tree, VisitorState state) { in findJavadocableTrees() argument 154 }.scan(tree, null); in findJavadocableTrees()
|
/frameworks/base/libs/androidfw/fuzz/resxmlparser_fuzzer/ |
D | resxmlparser_fuzzer.cpp | 59 auto tree = android::ResXMLTree(std::move(dynamic_ref_table)); in LLVMFuzzerTestOneInput() local 60 if (tree.setTo(xmlData.data(), xmlData.size()) != android::NO_ERROR) { in LLVMFuzzerTestOneInput() 64 tree.restart(); in LLVMFuzzerTestOneInput() 67 auto code = tree.next(); in LLVMFuzzerTestOneInput() 70 auto name = tree.getElementName(&len); in LLVMFuzzerTestOneInput() 73 for (size_t i = 0; i < tree.getAttributeCount(); i++) { in LLVMFuzzerTestOneInput() 75 auto attrName = tree.getAttributeName(i, &len); in LLVMFuzzerTestOneInput() 78 const auto text = tree.getText(&len); in LLVMFuzzerTestOneInput()
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | XmlParser.h | 50 explicit Node(const ResXMLTree& tree); 51 Node(const ResXMLTree& tree, const ResXMLParser::ResXMLPosition& pos); 115 explicit iterator(const ResXMLTree& tree) : tree_(tree), iter_(Node(tree)) { in iterator() 117 iterator(const ResXMLTree& tree, const Node& node) in iterator() 118 : tree_(tree), iter_(Node(tree, node.get_position())) { in iterator() 138 explicit XmlParser(std::unique_ptr<ResXMLTree> tree);
|
/frameworks/base/cmds/idmap2/libidmap2/ |
D | XmlParser.cpp | 26 ResXMLParser::ResXMLPosition get_tree_position(const T& tree) { in get_tree_position() argument 28 tree.getPosition(&pos); in get_tree_position() 32 XmlParser::Node::Node(const ResXMLTree& tree) : Node(tree, get_tree_position(tree)) { in Node() argument 34 XmlParser::Node::Node(const ResXMLTree& tree, const ResXMLParser::ResXMLPosition& pos) in Node() argument 35 : parser_(tree) { in Node() 155 XmlParser::XmlParser(std::unique_ptr<ResXMLTree> tree) : tree_(std::move(tree)) { in XmlParser() argument 159 auto tree = std::make_unique<ResXMLTree>(); in Create() local 160 if (tree->setTo(data, size, copy_data) != NO_ERROR) { in Create() 166 while ((event = tree->next()) != XmlParser::Event::BAD_DOCUMENT && in Create() 178 return XmlParser{std::move(tree)}; in Create()
|
/frameworks/base/tools/aapt2/ |
D | DominatorTree_test.cpp | 43 std::string ToString(DominatorTree* tree) { in ToString() argument 46 tree->Accept(this); in ToString() 80 DominatorTree tree(configs); in TEST() local 87 EXPECT_EQ(expected, printer.ToString(&tree)); in TEST() 101 DominatorTree tree(configs); in TEST() local 109 EXPECT_EQ(expected, printer.ToString(&tree)); in TEST() 136 DominatorTree tree(configs); in TEST() local 150 EXPECT_EQ(expected, printer.ToString(&tree)); in TEST() 164 DominatorTree tree(configs); in TEST() local 172 EXPECT_EQ(expected, printer.ToString(&tree)); in TEST() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/ |
D | NodeController.kt | 110 fun treeSpecToStr(tree: NodeSpec): String { in treeSpecToStr() 111 return StringBuilder().also { treeSpecToStrHelper(tree, it, "") }.toString() in treeSpecToStr() 114 private fun treeSpecToStrHelper(tree: NodeSpec, sb: StringBuilder, indent: String) { in treeSpecToStrHelper() 116 if (tree.children.isNotEmpty()) { in treeSpecToStrHelper() 118 for (child in tree.children) { in treeSpecToStrHelper()
|
/frameworks/libs/binary_translation/backend/x86_64/ |
D | machine_ir_analysis_test.cc | 210 x86_64::LoopTree tree(&machine_ir); in TEST() local 211 tree.InsertLoop(&loop1); in TEST() 213 EXPECT_EQ(tree.root()->loop(), nullptr); in TEST() 214 EXPECT_EQ(tree.root()->NumInnerloops(), 1UL); in TEST() 216 auto* node = tree.root()->GetInnerloopNode(0); in TEST() 234 x86_64::LoopTree tree(&machine_ir); in TEST() local 235 tree.InsertLoop(&loop1); in TEST() 236 tree.InsertLoop(&loop2); in TEST() 238 EXPECT_EQ(tree.root()->loop(), nullptr); in TEST() 239 EXPECT_EQ(tree.root()->NumInnerloops(), 2UL); in TEST() [all …]
|
/frameworks/base/core/java/com/android/internal/pm/pkg/component/ |
D | ParsedPermissionImpl.java | 54 private boolean tree; field in ParsedPermissionImpl 110 dest.writeBoolean(this.tree); in writeToParcel() 121 this.tree = in.readBoolean(); in ParsedPermissionImpl() 162 boolean tree, in ParsedPermissionImpl() argument 169 this.tree = tree; in ParsedPermissionImpl() 198 return tree; in isTree() 221 tree = value; in setTree()
|