aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--minui/resources.cpp2
-rw-r--r--tests/manual/recovery_test.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/minui/resources.cpp b/minui/resources.cpp
index 837f5ebc..52ab60b1 100644
--- a/minui/resources.cpp
+++ b/minui/resources.cpp
@@ -397,7 +397,7 @@ bool matches_locale(const std::string& prefix, const std::string& locale) {
397 // match the locale string without the {script} section. 397 // match the locale string without the {script} section.
398 // For instance, prefix == "en" matches locale == "en-US", prefix == "sr-Latn" matches locale 398 // For instance, prefix == "en" matches locale == "en-US", prefix == "sr-Latn" matches locale
399 // == "sr-Latn-BA", and prefix == "zh-CN" matches locale == "zh-Hans-CN". 399 // == "sr-Latn-BA", and prefix == "zh-CN" matches locale == "zh-Hans-CN".
400 if (android::base::StartsWith(locale, prefix.c_str())) { 400 if (android::base::StartsWith(locale, prefix)) {
401 return true; 401 return true;
402 } 402 }
403 403
diff --git a/tests/manual/recovery_test.cpp b/tests/manual/recovery_test.cpp
index 92c6ef2d..64e3b59e 100644
--- a/tests/manual/recovery_test.cpp
+++ b/tests/manual/recovery_test.cpp
@@ -209,7 +209,7 @@ TEST_P(ResourceTest, ValidateLocale) {
209 ASSERT_GT(height, y + 1 + h) << "Locale: " << kLocale << " is not found in the file."; 209 ASSERT_GT(height, y + 1 + h) << "Locale: " << kLocale << " is not found in the file.";
210 char* loc = reinterpret_cast<char*>(&row[5]); 210 char* loc = reinterpret_cast<char*>(&row[5]);
211 if (matches_locale(loc, kLocale.c_str())) { 211 if (matches_locale(loc, kLocale.c_str())) {
212 EXPECT_TRUE(android::base::StartsWith(loc, kLocale.c_str())); 212 EXPECT_TRUE(android::base::StartsWith(loc, kLocale));
213 break; 213 break;
214 } else { 214 } else {
215 for (int i = 0; i < h; ++i, ++y) { 215 for (int i = 0; i < h; ++i, ++y) {