Skip to content
Commit 6e49735a authored by Donald Chai's avatar Donald Chai
Browse files

[aapt2] Ensure that attributes have declared namespaces when fixing manifest

aapt::ManifestFixer might add attributes from
http://schemas.android.com/apk/res/android when none existed previously.
When that happens, something needs to ensure that the schema has a
declared xmlns prefix, otherwise this:

https://github.com/bazelbuild/bazel/blob/bdb3e97c47188ed4e5b472a3b7393e9588c93011/src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java#L560

will crash.  It's a bit odd that Bazel converts back and forth between
protobuf and XML, but as long as the fields exist in Resources.proto,
they should be set.

Bug: 133004752
Change-Id: I73fb3f713be34c9f81753fde2fd24c4524656b7d
Tested: aapt2_tests
parent e7ac92cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment