diff options
author | 2015-03-10 16:55:43 -0700 | |
---|---|---|
committer | 2015-03-16 22:25:26 +0000 | |
commit | 8a9355a98ece3d7fc9d022e759d05378060c86e2 (patch) | |
tree | d6d76f94f2688f9bcee4c961dafc4cc3ec97a6bd /tools/aapt | |
parent | 9c329b8b6440823ef94bffebc0b1098e8b2ad622 (diff) |
Output modified bcp47 tag in ResTable_config::toString()
We expect to be able to parse the output of ResTable_config::toString(),
so it should use modified bcp47 (b+en+Latn+US).
Change-Id: I597a1779a1fa5cff171c473e6a0368d93b9c7722
Diffstat (limited to 'tools/aapt')
-rw-r--r-- | tools/aapt/AaptAssets.cpp | 27 | ||||
-rw-r--r-- | tools/aapt/AaptAssets.h | 2 | ||||
-rw-r--r-- | tools/aapt/tests/AaptConfig_test.cpp | 2 |
3 files changed, 1 insertions, 30 deletions
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp index 871e04f7aa9d..d346731e63e2 100644 --- a/tools/aapt/AaptAssets.cpp +++ b/tools/aapt/AaptAssets.cpp @@ -367,33 +367,6 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta return currentIndex; } - -String8 AaptLocaleValue::toDirName() const { - String8 dirName(""); - if (language[0]) { - dirName += language; - } else { - return dirName; - } - - if (script[0]) { - dirName += "-s"; - dirName += script; - } - - if (region[0]) { - dirName += "-r"; - dirName += region; - } - - if (variant[0]) { - dirName += "-v"; - dirName += variant; - } - - return dirName; -} - void AaptLocaleValue::initFromResTable(const ResTable_config& config) { config.unpackLanguage(language); config.unpackRegion(region); diff --git a/tools/aapt/AaptAssets.h b/tools/aapt/AaptAssets.h index 7ae5368d80bd..4fdc9640e8e5 100644 --- a/tools/aapt/AaptAssets.h +++ b/tools/aapt/AaptAssets.h @@ -78,8 +78,6 @@ struct AaptLocaleValue { void writeTo(ResTable_config* out) const; - String8 toDirName() const; - int compare(const AaptLocaleValue& other) const { return memcmp(this, &other, sizeof(AaptLocaleValue)); } diff --git a/tools/aapt/tests/AaptConfig_test.cpp b/tools/aapt/tests/AaptConfig_test.cpp index ef3860c72921..7618974db329 100644 --- a/tools/aapt/tests/AaptConfig_test.cpp +++ b/tools/aapt/tests/AaptConfig_test.cpp @@ -65,7 +65,7 @@ TEST(AaptConfigTest, ParseBasicQualifiers) { TEST(AaptConfigTest, ParseLocales) { ConfigDescription config; EXPECT_TRUE(TestParse("en-rUS", &config)); - EXPECT_EQ(String8("en-US"), config.toString()); + EXPECT_EQ(String8("en-rUS"), config.toString()); } TEST(AaptConfigTest, ParseQualifierAddedInApi13) { |