Commit ee587f8b authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

Use default locale when lowercasing chooser objects for search

An upcoming lint check will flag calls to toLowerCase() that do not
specify a locale. Since these strings are being compared to those
entered by the user the default locale is used.

Bug: 1085466
Change-Id: I4cbc60d99b02d34f741947c2ec8bd719b8843253
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216684
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772230}
parent 96721005
......@@ -863,7 +863,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
for (Website site : sites) {
for (ChosenObjectInfo info : site.getChosenObjectInfo()) {
if (mSearch == null || mSearch.isEmpty()
|| info.getName().toLowerCase().contains(mSearch)) {
|| info.getName().toLowerCase(Locale.getDefault()).contains(mSearch)) {
Pair<ArrayList<ChosenObjectInfo>, ArrayList<Website>> entry =
objects.get(info.getObject());
if (entry == null) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment