From 2e2c3b6220d14d1047b3b6ee3d0513b2575ef706 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Fri, 26 Apr 2019 01:16:52 -0700 Subject: Fix unknown resource type error message Instead of printing the tag name, print the type name when the type was unable to be recognized. The type name is initialized to the tag name and changes when a type attribute is defined.. Bug: 37891551 Test: manual Change-Id: I9b0e6a6f2d96a8c5af71fbca8e83c947a8e308bf --- tools/aapt2/ResourceParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/aapt2/ResourceParser.cpp') diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp index fe401e22c50e..5994073c5678 100644 --- a/tools/aapt2/ResourceParser.cpp +++ b/tools/aapt2/ResourceParser.cpp @@ -693,7 +693,7 @@ bool ResourceParser::ParseResource(xml::XmlPullParser* parser, // If the resource type was not recognized, write the error and return false. diag_->Error(DiagMessage(out_resource->source) - << "unknown resource type '" << parser->element_name() << "'"); + << "unknown resource type '" << resource_type << "'"); return false; } -- cgit v1.2.3-59-g8ed1b