If @empty is encountered in XML, do not fallback
to searching through the theme.
Bug: 36891052
Test: make aapt2_tests
Test: bit CtsContentTestCases:android.content.res.cts.TypedArrayTest
Change-Id: Ie3bf7b70af9c7913513a1092afd95d26bec5e635
The out parameter `out_indices` is expected to be non-null
and so the extra null check adds a cost to performance
and opens the door to misusing the API by not supplying
`out_indices`.
Test: make libandroidfw_tests
Change-Id: Ie66fd837c5e24ec2838156e7b67f54c15cd27933
Tests would expect parts of the APK to be unzipped and
maintained. Instead, we now decompress the required files
from the test APKs on test setup. This simplifies
test maintenance substantially.
Test: make libandroidfw_tests && libandroidfw_tests --testdata=frameworks/base/libs/androidfw/tests/data
Change-Id: I3d2100af22df913e02401dedcf9842cdb32b2a3b
Bug: 32573798
Mark input uint32_t[] as const. Use Read-only JNI
array access for input as it's faster than critical access.
Use non-movable arrays for TypedArray so that the address can
be resolved and stored, avoiding the need to do JNI array
access for the output.
Indicies is always non-null, so remove the optional checks.
Eliminate unused return value.
Benchmark results:
twelveKeyInflate 4963us -> 4713us
simpleViewInflate 73us -> 60us
Test: Device boots, benchmarks show faster
Change-Id: Ic3bde5aee31407d8903913f97f2218daf074499a
- Adds unit tests for attribute resolution. These include
some test data resource tables and compiled XML files.
- Convert touched files to Google style guide.
Test: make libandroidfw_tests
Change-Id: Ib3a36061dc874de5f6a266b4e82c0a12ef435f23
Without the entire JNI environment, testing the attribute
resolution code will be much easier and enable safer
refactoring.
Change-Id: I2815cc1e10a694a3b01bc37e191a0d5e9d0e6735
Test: Existing CTS tests pass