diff options
author | Adam Lesinski <adamlesinski@google.com> | 2015-03-10 17:35:38 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2015-03-10 17:37:16 -0700 |
commit | 1c2dadddf78c3aa49129425d5f6ee480cfb54444 (patch) | |
tree | bb05ca90c766cee9cbb3ec698c6c60b16df00584 /tools | |
parent | 488caeb70293b7c70e9ce128fc002a0666340fb0 (diff) | |
download | frameworks_base-1c2dadddf78c3aa49129425d5f6ee480cfb54444.zip frameworks_base-1c2dadddf78c3aa49129425d5f6ee480cfb54444.tar.gz frameworks_base-1c2dadddf78c3aa49129425d5f6ee480cfb54444.tar.bz2 |
split-select: Languages should not be grouped exclusively
If a series of languages match one configuration, this is fine. They
should all be installed. Example: target = fr-rCA, splits = [fr, fr-rCA].
Change-Id: I652348ae85073c7984a92a802f8c9f84f5d436c5
Diffstat (limited to 'tools')
-rw-r--r-- | tools/split-select/Grouper.cpp | 9 | ||||
-rw-r--r-- | tools/split-select/Grouper_test.cpp | 9 |
2 files changed, 7 insertions, 11 deletions
diff --git a/tools/split-select/Grouper.cpp b/tools/split-select/Grouper.cpp index 22685cd..55e52fc 100644 --- a/tools/split-select/Grouper.cpp +++ b/tools/split-select/Grouper.cpp @@ -34,7 +34,6 @@ groupByMutualExclusivity(const Vector<SplitDescription>& splits) { // Find mutually exclusive splits and group them. KeyedVector<SplitDescription, SortedVector<SplitDescription> > densityGroups; KeyedVector<SplitDescription, SortedVector<SplitDescription> > abiGroups; - KeyedVector<SplitDescription, SortedVector<SplitDescription> > localeGroups; const size_t splitCount = splits.size(); for (size_t i = 0; i < splitCount; i++) { const SplitDescription& split = splits[i]; @@ -47,10 +46,6 @@ groupByMutualExclusivity(const Vector<SplitDescription>& splits) { SplitDescription key(split); key.abi = abi::Variant_none; appendValue(abiGroups, key, split); - } else if (split.config.locale != 0) { - SplitDescription key(split); - key.config.clearLocale(); - appendValue(localeGroups, key, split); } else { groups.add(); groups.editTop().add(split); @@ -67,10 +62,6 @@ groupByMutualExclusivity(const Vector<SplitDescription>& splits) { groups.add(abiGroups[i]); } - const size_t localeCount = localeGroups.size(); - for (size_t i = 0; i < localeCount; i++) { - groups.add(localeGroups[i]); - } return groups; } diff --git a/tools/split-select/Grouper_test.cpp b/tools/split-select/Grouper_test.cpp index a5f9c5a..7294a86 100644 --- a/tools/split-select/Grouper_test.cpp +++ b/tools/split-select/Grouper_test.cpp @@ -37,6 +37,8 @@ protected: addSplit(splits, "en-rUS-sw300dp-xhdpi"); addSplit(splits, "large"); addSplit(splits, "pl-rPL"); + addSplit(splits, "fr-rCA"); + addSplit(splits, "fr"); addSplit(splits, "xlarge"); addSplit(splits, "en-rUS-sw600dp-xhdpi"); addSplit(splits, "en-rUS-sw300dp-hdpi"); @@ -64,7 +66,7 @@ protected: }; TEST_F(GrouperTest, shouldHaveCorrectNumberOfGroups) { - EXPECT_EQ(12u, mGroups.size()); + EXPECT_EQ(15u, mGroups.size()); } TEST_F(GrouperTest, shouldGroupDensities) { @@ -79,7 +81,10 @@ TEST_F(GrouperTest, shouldGroupAbi) { } TEST_F(GrouperTest, shouldGroupLocale) { - expectHasGroupWithSplits("pl-rPL", "de-rDE"); + expectHasGroupWithSplits("pl-rPL"); + expectHasGroupWithSplits("de-rDE"); + expectHasGroupWithSplits("fr"); + expectHasGroupWithSplits("fr-rCA"); } TEST_F(GrouperTest, shouldGroupEachSplitIntoItsOwnGroup) { |