AAPT2: Fix R.java for styleable in different package
When generating the R.java file, attributes of styleables do not always
have package names on them. This caused a problem where when an apk
that was previously linked and that also contained a declare-styleable
is linked again to an AndroidManifest.xml with a different package name,
styleable attributes' resource symbols could not be looked up correctly.
This change does not rename the resources but makes sure that the java
generator finds the attribute symbols correctly.
Bug: 110877419
Test: Created a test in aapt2_tests and verified correct behavior of
repro example from bug
Change-Id: Ib99d84cbe44dadca86603bc610ad3f4e09e3fb11
2 files changed