diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/aapt2/link/ManifestFixer.cpp | 1 | ||||
| -rw-r--r-- | tools/aapt2/xml/XmlDom.cpp | 3 | ||||
| -rw-r--r-- | tools/aapt2/xml/XmlDom_test.cpp | 13 | ||||
| -rw-r--r-- | tools/validatekeymaps/Android.bp | 4 | ||||
| -rw-r--r-- | tools/validatekeymaps/Main.cpp | 5 |
5 files changed, 11 insertions, 15 deletions
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp index d432341a8cde..948b11b6795e 100644 --- a/tools/aapt2/link/ManifestFixer.cpp +++ b/tools/aapt2/link/ManifestFixer.cpp @@ -477,6 +477,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, manifest_action["compatible-screens"]["screen"]; manifest_action["supports-gl-texture"]; manifest_action["restrict-update"]; + manifest_action["install-constraints"]["fingerprint-prefix"]; manifest_action["package-verifier"]; manifest_action["meta-data"] = meta_data_action; manifest_action["uses-split"].Action(RequiredNameIsJavaPackage); diff --git a/tools/aapt2/xml/XmlDom.cpp b/tools/aapt2/xml/XmlDom.cpp index dd60f1717de7..8b7eadf9fac9 100644 --- a/tools/aapt2/xml/XmlDom.cpp +++ b/tools/aapt2/xml/XmlDom.cpp @@ -349,8 +349,7 @@ std::unique_ptr<XmlResource> Inflate(const void* data, size_t len, std::string* size_t len; const char16_t* str16 = tree.getText(&len); if (str16) { - text->text = - ResTable::normalizeForOutput(util::Utf16ToUtf8(StringPiece16(str16, len)).c_str()); + text->text = util::Utf16ToUtf8(StringPiece16(str16, len)); } CHECK(!node_stack.empty()); node_stack.top()->AppendChild(std::move(text)); diff --git a/tools/aapt2/xml/XmlDom_test.cpp b/tools/aapt2/xml/XmlDom_test.cpp index 3a2d656240bb..6c717dcd84c8 100644 --- a/tools/aapt2/xml/XmlDom_test.cpp +++ b/tools/aapt2/xml/XmlDom_test.cpp @@ -139,19 +139,6 @@ TEST(XmlDomTest, XmlEscapeSequencesAreParsed) { EXPECT_THAT(attr->value, Eq("\"")); } -TEST(XmlDomTest, XmlEscapeSingleQuotes) { - std::unique_ptr<XmlResource> doc = test::BuildXmlDom(R"( - <foo><![CDATA[oh no' (line=1001) -E: this-is-not-an-element (line=88) - T: 'blah]]></foo>)"); - - Element* el = doc->root.get(); - Text* text = xml::NodeCast<xml::Text>(el->children[0].get()); - ASSERT_THAT(text, NotNull()); - EXPECT_THAT(text->text, - Eq("oh no' (line=1001)\nE: this-is-not-an-element (line=88)\n T: 'blah")); -} - class TestVisitor : public PackageAwareVisitor { public: using PackageAwareVisitor::Visit; diff --git a/tools/validatekeymaps/Android.bp b/tools/validatekeymaps/Android.bp index ff24d160b917..25373f9e9e2f 100644 --- a/tools/validatekeymaps/Android.bp +++ b/tools/validatekeymaps/Android.bp @@ -21,6 +21,7 @@ cc_binary_host { cflags: [ "-Wall", "-Werror", + "-Wextra", ], static_libs: [ @@ -31,6 +32,9 @@ cc_binary_host { "liblog", "libui-types", ], + shared_libs: [ + "libvintf", + ], target: { host_linux: { static_libs: [ diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp index 817effd24a2d..0d7d5f949a08 100644 --- a/tools/validatekeymaps/Main.cpp +++ b/tools/validatekeymaps/Main.cpp @@ -141,6 +141,11 @@ static bool validateFile(const char* filename) { } base::Result<std::shared_ptr<KeyLayoutMap>> ret = KeyLayoutMap::load(filename); if (!ret.ok()) { + if (ret.error().message() == "Missing kernel config") { + // It means the layout is valid, but won't be loaded on this device because + // this layout requires a certain kernel config. + return true; + } error("Error %s parsing key layout file.\n\n", ret.error().message().c_str()); return false; } |