Merge "Parse res-car as resources for UI_MODE_TYPE_CAR.."
This commit is contained in:
committed by
Android (Google) Code Review
commit
97a366f9d7
@@ -345,7 +345,8 @@ int AaptLocaleValue::initFromDirName(const Vector<String8>& parts, const int sta
|
||||
|
||||
return ++currentIndex;
|
||||
} else {
|
||||
if ((part.length() == 2 || part.length() == 3) && isAlpha(part)) {
|
||||
if ((part.length() == 2 || part.length() == 3)
|
||||
&& isAlpha(part) && strcmp("car", part.string())) {
|
||||
setLanguage(part);
|
||||
if (++currentIndex == size) {
|
||||
return size;
|
||||
|
||||
@@ -76,3 +76,9 @@ TEST(AaptConfigTest, ParseQualifierAddedInApi13) {
|
||||
EXPECT_TRUE(TestParse("sw600dp-v8", &config));
|
||||
EXPECT_EQ(String8("sw600dp-v13"), config.toString());
|
||||
}
|
||||
|
||||
TEST(AaptConfigTest, TestParsingOfCarAttribute) {
|
||||
ConfigDescription config;
|
||||
EXPECT_TRUE(TestParse("car", &config));
|
||||
EXPECT_EQ(android::ResTable_config::UI_MODE_TYPE_CAR, config.uiMode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user