libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.
Test: modules using aapt2_jni find headers
Bug: 63762847
Change-Id: Id51354d533bfef66ecd71f5d89599b8adc688c1f
The StringPool class is a binary blob and makes it difficult to
modify the proto files from external tools (like bundle-tool).
Size increase of full build is negligible.
Test: make aapt2_tests
Change-Id: I984755170c315730ab751b51133f8fb2f614f6af
The 'any' syntax of a configuration is rarely used so this has not been
an issue in the field.
Test: none
Change-Id: Icb9cb2d5ad061e3ea1c43dc1cd7ca2f222965cdc
Splits may include more/different configurations than they
were originally specified to include. This happens, for instance,
when a particular requested density doesn't exist. A fallback density
resource is chosen for the split.
This makes programmatic configuration targetting difficult, as the APK
may report that it has resources for multiple densities, while it was
meant to target only a specific density.
This change encodes a comma separated list of the intended configurations
for the split in an attribute called 'targetConfig' on the <manifest> tag of
AndroidManifest.xml.
Test: manual
Change-Id: I3167e9341a434abc34ed2ddb8f740762b40b1ab7
Move the styled strings to a separate section of the StringPool so
that sorting can never mess up the order of Styles.
Bug: 63570514
Test: make aapt2_tests
Change-Id: Id2ce1355b92be1bb31ce0daa7e54ae9b5b6c2ffe
Locale deduping isn't straightforward, as parenting rules
change between platform versions and the selection
preference of a specific locale variant over the default
configuration lead to incorrect results at runtime.
Bug: 62409213
Test: make aapt2_tests
Change-Id: Iec8f1cfba7ae43c847d163529891fdc15f3db826
Methods inserted at the end of a synchronized {} block also need to
be outside of the implicit try{} block. Make sure the next
instruction is the virtual end label for the try block, and put
the inserted method after the label.
Bug: 64301866
Test: locked_region_code_injection test
Test: m -j checkbuild
Change-Id: I6626aa45580b4df692e02fc6127a2947a6075e2e
Mingw64 was being difficult, so instead of defining a wmain entrypoint,
the command line parameters are parsed manually using built-in Windows
methods that support Unicode. The results are converted to UTF8 and
handled just like the rest of the linux/mac version of the code.
This also removes dependencies on std::istream in favour of a
FileInputStream which calls the appropriate unicode version of
open to read a file.
No speed regressions found on Linux or MacOS.
Bug: 62336414
Bug: 63830502
Test: manual
Change-Id: I597da51e33729ed1b98bf246e7e773337fd3fee8
* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.
Bug: 30407689
Bug: 30411878
Test: build with WITH_TIDY=1
Change-Id: Iaa0a6f18f64cf573bee49dd1466281ea4d37b410
Bit used to only see success results and failures (== assertion failures?),
and didn't see "errors" (other exceptions) and test process crashes.
Fixed it.
Now it also returns an error status code if there was a test failure.
Bug 64292779
Test: manual
Change-Id: Iaba93910d32abfc615ae595746a0e9be1108583a
Move the styled strings to a separate section of the StringPool so
that sorting can never mess up the order of Styles.
Bug: 63570514
Test: make aapt2_tests
Change-Id: Id2ce1355b92be1bb31ce0daa7e54ae9b5b6c2ffe
The old algorithm for detecting the first sentence of a JavaDoc comment
looked for the first occurence of '.'. This does not work when code or a
{@link android.R.styleable} link is encountered in the first sentence.
Switch to checking for whitespace characters after the '.' character.
Bug: 62900335
Test: make aapt2_tests , make ds-docs
Original change-Id: I8238f6a6304c9c2f92e2e576ca8962a59c2b20ea
Change-Id: Ie272d0d793d157f2a30f3ead20b2b53976661d33
When processing attributes in XML, quotes can't be used to mark a
section as whitespace preserving, so the assumption should be that the
entire string is whitespace preserving, which makes quote characters
literals.
Bug: 62840718
Bug: 62840406
Test: make aapt2_tests
Change-Id: I4afff02148b5b8e78833abf1f323c2f5325d6155
This fixes a memory leak
warning: Potential leak of memory pointed to by 'buffer' [clang-analyzer-unix.Malloc]
Bug:None
Test: The warning is gone.
Change-Id: I50bfd9f7d70964da0f1808b73fc6554831020214
The old algorithm for detecting the first sentence of a JavaDoc comment
looked for the first occurence of '.'. This does not work when code or a
{@link android.R.styleable} link is encountered in the first sentence.
Switch to checking for whitespace characters after the '.' character.
Bug: 62900335
Test: make aapt2_tests
Change-Id: I8238f6a6304c9c2f92e2e576ca8962a59c2b20ea
Splits may include more/different configurations than they
were originally specified to include. This happens, for instance,
when a particular requested density doesn't exist. A fallback density
resource is chosen for the split.
This makes programmatic configuration targetting difficult, as the APK
may report that it has resources for multiple densities, while it was
meant to target only a specific density.
This change encodes a comma separated list of the intended configurations
for the split in an attribute called 'targetConfig' on the <manifest> tag of
AndroidManifest.xml.
Test: manual
Change-Id: I3167e9341a434abc34ed2ddb8f740762b40b1ab7
Update the artifact name parser to ensure that duplicate placeholders
are treated as an error.
Also applied suggested changes from ag/2447777.
Test: ran unit tests
Change-Id: Iab8fd9d9b81aa3008177141256ecd16ef04b0c34
Add a helper method to convert a templated artifact name to file name
based on the values present in an Artifact struct. The Artifact
validates that all required template paramters are present.
Test: Unit tests
Change-Id: Id97ff606bb41c72a31c2d769104966be9cbca1a0