summaryrefslogtreecommitdiff
path: root/tools/aapt2/DominatorTree_test.cpp
AgeCommit message (Collapse)Author
2020-11-11Fix DominatorTree for locale and mcc/mnc configRyan Mitchell
De-duping of configurations with locales was disabled previously since there is not a good way to dedupe locales in a forwards compatible way (change SHA: e38567480be67ac83a8f8f090704bb0d49e2eed2). In b/171892595, since every locale is a root in the dominator tree, configs that do not specify locale qualifiers are dominated by the default config and their values are checked for compatiblity with the locale config values. b/171892595 took a while to detect because, this is only an issue at runtime when a resource has one config containing mnc/mcc without a locale, one config containing a locale, and the values for the configs differ. This is because mcc/mnc is the only qualifier with a greater precedence than locale. Make configurations with mcc/mnc and mcc unable to be dominated until locale deduping is fixed. Bug: 171892595 Bug: 62409213 Test: aapt2-tests Change-Id: Ia0a5e5d7a1650d070f5f2fcaf9a8469a8c7dabe6
2020-09-17Make configs differing only in density siblingsRyan Mitchell
Configurations differing only in density value will match the same device configuration at runtime; therefore, they should be considered sibling configurations in the dominator tree. So, given configurations A and B: 1) If A has a density defined and B does not, A must never dominate B. 2) If A and B both have densities defined, neither must dominate the other. Previous behavior: <default> sw600dp-v13 sw600dp-hdpi-v13 sw800dp-hdpi-v13 sw800dp-xxhdpi-v13 New behavior: <default> sw600dp-v13 sw600dp-hdpi-v13 sw800dp-hdpi-v13 sw800dp-xxhdpi-v13 Bug: 167944889 Test: aapt2_tests Merged-In: Ie9fba4c4b74af2b3bbf8fc6432539a99f8647634 Change-Id: Ie9fba4c4b74af2b3bbf8fc6432539a99f8647634
2018-10-08libandroidfw: move ConfigDescription from aapt2 to libandroidfwMÃ¥rten Kongstad
This is to allow idmap2 to access ConfigDescription. Test: libandroidfw_tests Test: aapt2_tests Change-Id: I54210bbbd8dad5903cb7100807df977efa394ad5 Merged-In: I54210bbbd8dad5903cb7100807df977efa394ad5
2017-08-04AAPT2: Disable locale domination for dedupingAdam Lesinski
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
2016-10-26AAPT2: Rename to match new styleAdam Lesinski
Use Google3 naming style to match new projects' and open source google projects' style. Preferred to do this in a massive CL so as to avoid style inconsistencies that plague legacy code bases. This is a relatively NEW code base, may as well keep it up to date. Test: name/style refactor - existing tests pass Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
2016-10-19Use Google3 style guide with .clang-formatAdam Lesinski
Test: style change only, builds ok Change-Id: I885180e24cb2e7b58cfb4967c3bcb40058ce4078
2016-09-30AAPT2: Add dominator tree analysis and resource removalAlexandria Cornwall
Added dominator tree analysis of resource configurations for each resource entry to allow deduping of resource entries if: 1. The configuration for the resource entry's value is dominated by a configuration with an equivalent entry value. 2. All compatible configurations for the entry (those not in conflict and unrelated by domination with the configuration for the entry's value) have an equivalent entry value. Bug: 30051199 Test: make libaapt2_tests && libaapt2_tests Change-Id: I66468d3014a2d6097a94b039ac1028f9f461c7d3