diff options
author | 2017-06-12 14:55:58 -0700 | |
---|---|---|
committer | 2017-06-13 11:00:04 -0700 | |
commit | e38567480be67ac83a8f8f090704bb0d49e2eed2 (patch) | |
tree | 1ee9f1c8840e44c0f1c1a88a3b4986bbc8aba8c6 /tools/aapt2/ConfigDescription.cpp | |
parent | 52feccbf41fe58921e66686077cb5ab20b2b0b13 (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) && |