summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2020-12-02 11:11:43 -0700
committerJeff Sharkey <jsharkey@android.com>2020-12-09 12:18:05 -0700
commit78e84716e63b0e5da8f0fd4e1ff762884cdc4104 (patch)
treef7f9fd3922d7d0c8aa055c54521ca786c4af86a4 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent83eeb33c2fb962a2a9e6b91d9390f2181445b77e (diff)
Mitigate performance TypedXml regression.
When an attribute value is missing, we can immediately return the default value instead of paying the cost of throwing an exception. To bring this benefit to both human-readable and binary XML, this is implemented by adding a new getAttributeIndex() lookup method which is then used by default methods. readExtraAttributes() also appears to be parsing a string list as a boolean value (which seems very broken), so we add hand-rolled parsing logic to avoid paying the cost of an exception. Someone should follow up in the future to investigate if there's an actual bug here. Bug: 174544002 Test: manual Change-Id: Id313d18000e345ca1acd3c66d2c0c0fc44769b71
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions