Merge "StartsWith allows a std::string prefix now."
am: 80ccac2fff
Change-Id: Ife18e431247a479cb038f21f92ad0b687a9509b8
diff --git a/minui/resources.cpp b/minui/resources.cpp
index 837f5eb..52ab60b 100644
--- a/minui/resources.cpp
+++ b/minui/resources.cpp
@@ -397,7 +397,7 @@
// match the locale string without the {script} section.
// For instance, prefix == "en" matches locale == "en-US", prefix == "sr-Latn" matches locale
// == "sr-Latn-BA", and prefix == "zh-CN" matches locale == "zh-Hans-CN".
- if (android::base::StartsWith(locale, prefix.c_str())) {
+ if (android::base::StartsWith(locale, prefix)) {
return true;
}
diff --git a/tests/manual/recovery_test.cpp b/tests/manual/recovery_test.cpp
index 92c6ef2..64e3b59 100644
--- a/tests/manual/recovery_test.cpp
+++ b/tests/manual/recovery_test.cpp
@@ -209,7 +209,7 @@
ASSERT_GT(height, y + 1 + h) << "Locale: " << kLocale << " is not found in the file.";
char* loc = reinterpret_cast<char*>(&row[5]);
if (matches_locale(loc, kLocale.c_str())) {
- EXPECT_TRUE(android::base::StartsWith(loc, kLocale.c_str()));
+ EXPECT_TRUE(android::base::StartsWith(loc, kLocale));
break;
} else {
for (int i = 0; i < h; ++i, ++y) {