Loading tools/aapt2/link/ManifestFixer.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,9 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, manifest_action["meta-data"] = meta_data_action; manifest_action["uses-split"].Action(RequiredNameIsJavaPackage); manifest_action["key-sets"]["key-set"]["public-key"]; manifest_action["key-sets"]["upgrade-key-set"]; // Application actions. xml::XmlNodeAction& application_action = manifest_action["application"]; application_action.Action(OptionalNameIsJavaClassName); Loading tools/aapt2/link/ManifestFixer_test.cpp +20 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ #include "test/Test.h" using android::StringPiece; using ::android::StringPiece; using ::testing::NotNull; namespace aapt { Loading Loading @@ -420,4 +421,22 @@ TEST_F(ManifestFixerTest, DoNotIgnoreNonNamespacedElements) { EXPECT_EQ(nullptr, Verify(input)); } TEST_F(ManifestFixerTest, SupportKeySets) { std::string input = R"( <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android"> <key-sets> <key-set android:name="old-set"> <public-key android:name="old-key" android:value="some+old+key" /> </key-set> <key-set android:name="new-set"> <public-key android:name="new-key" android:value="some+new+key" /> </key-set> <upgrade-key-set android:name="old-set" /> <upgrade-key-set android:name="new-set" /> </key-sets> </manifest>)"; EXPECT_THAT(Verify(input), NotNull()); } } // namespace aapt tools/aapt2/readme.md +2 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ - Fixed issue where enum values were interpreted as integers and range checked. (bug 62358540) - Fixed issue where ints and floats with trailing whitespace would not be parsed. (bug 62902869) - Fixed issue where `--custom-package` was not honored when writing Manifest.java. (bug 62826426) - Add `<key-sets>` and its nested tags to the allowed set of XML tags in AndroidManifest.xml. (bug 62839863) ## Version 2.17 ### `aapt2 ...` Loading Loading
tools/aapt2/link/ManifestFixer.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,9 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, manifest_action["meta-data"] = meta_data_action; manifest_action["uses-split"].Action(RequiredNameIsJavaPackage); manifest_action["key-sets"]["key-set"]["public-key"]; manifest_action["key-sets"]["upgrade-key-set"]; // Application actions. xml::XmlNodeAction& application_action = manifest_action["application"]; application_action.Action(OptionalNameIsJavaClassName); Loading
tools/aapt2/link/ManifestFixer_test.cpp +20 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ #include "test/Test.h" using android::StringPiece; using ::android::StringPiece; using ::testing::NotNull; namespace aapt { Loading Loading @@ -420,4 +421,22 @@ TEST_F(ManifestFixerTest, DoNotIgnoreNonNamespacedElements) { EXPECT_EQ(nullptr, Verify(input)); } TEST_F(ManifestFixerTest, SupportKeySets) { std::string input = R"( <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android"> <key-sets> <key-set android:name="old-set"> <public-key android:name="old-key" android:value="some+old+key" /> </key-set> <key-set android:name="new-set"> <public-key android:name="new-key" android:value="some+new+key" /> </key-set> <upgrade-key-set android:name="old-set" /> <upgrade-key-set android:name="new-set" /> </key-sets> </manifest>)"; EXPECT_THAT(Verify(input), NotNull()); } } // namespace aapt
tools/aapt2/readme.md +2 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ - Fixed issue where enum values were interpreted as integers and range checked. (bug 62358540) - Fixed issue where ints and floats with trailing whitespace would not be parsed. (bug 62902869) - Fixed issue where `--custom-package` was not honored when writing Manifest.java. (bug 62826426) - Add `<key-sets>` and its nested tags to the allowed set of XML tags in AndroidManifest.xml. (bug 62839863) ## Version 2.17 ### `aapt2 ...` Loading