diff options
| author | 2017-06-12 14:55:58 -0700 | |
|---|---|---|
| committer | 2017-08-04 17:23:14 -0700 | |
| commit | 907399187e5664855b4ab8446dfa179fbd232b4b (patch) | |
| tree | d564f1cb459d68ee5ff8885a970ea57d6757e765 /tools/aapt2/ConfigDescription.cpp | |
| parent | 82e815616e1fcab7bcdab737dfc1a28946b0f486 (diff) | |
AAPT2: Disable locale domination for deduping
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
Diffstat (limited to 'tools/aapt2/ConfigDescription.cpp')
| -rw-r--r-- | tools/aapt2/ConfigDescription.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/aapt2/ConfigDescription.cpp b/tools/aapt2/ConfigDescription.cpp index 46098cbc3aa4..7ff0c7227c9c 100644 --- a/tools/aapt2/ConfigDescription.cpp +++ b/tools/aapt2/ConfigDescription.cpp @@ -877,7 +877,16 @@ ConfigDescription ConfigDescription::CopyWithoutSdkVersion() const { } bool ConfigDescription::Dominates(const ConfigDescription& o) const { - if (*this == DefaultConfig() || *this == o) { + if (*this == o) { + return true; + } + + // Locale de-duping is not-trivial, disable for now (b/62409213). + if (diff(o) & CONFIG_LOCALE) { + return false; + } + + if (*this == DefaultConfig()) { return true; } return MatchWithDensity(o) && !o.MatchWithDensity(*this) && |