summaryrefslogtreecommitdiff
path: root/tools/aapt2/optimize/ResourceDeduper_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
2019-08-19Only check sibling config values to dedupeRyan Mitchell
Currently more config values are being kept than necessesary. For example, given config values for a string resource: Config: default Value: "keep" Config: ldrtl Value: "dedupe" Config: ldrtl-night Value: "dedupe" Config: land Value: "keep2" The ldrtl-night config value will fail to be removed despite being equivalent to the ldrtl value. This is because the value for the land configuration is not equivalent to the ldrtl-night value. Instead of checking that every compatible config value not related by dominance should have quivalent values, only check sibling config values within the dominator tree. Bug: 137230022 Test: aapt2_tests Change-Id: I965365d1a9433ae595eab48d82837ac102148334
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
2017-06-13AAPT2: 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
2017-02-22AAPT2: Rename strip phase to optimizeAdam Lesinski
- Allow resource deduping, version collapsing, and sparse resource encoding. Test: manual Change-Id: Ia4aa892ab5b06ba1d5ea4a6efb51b00bc3a980c4