summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/search
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-03-29 10:26:54 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-29 10:26:54 -0700
commit1b45e85db8ea7f962a36dccf881a2faaf46f82a8 (patch)
treedf2460ea345f574827bf9545054a0a1ac6064676 /src/com/android/browser/search
parent043e72f70ae61f1a62aefef6d137c4916206d3c9 (diff)
downloadpackages_apps_Browser-1b45e85db8ea7f962a36dccf881a2faaf46f82a8.zip
packages_apps_Browser-1b45e85db8ea7f962a36dccf881a2faaf46f82a8.tar.gz
packages_apps_Browser-1b45e85db8ea7f962a36dccf881a2faaf46f82a8.tar.bz2
Revert "fix hl parameter for incognito search"
This reverts commit 043e72f70ae61f1a62aefef6d137c4916206d3c9
Diffstat (limited to 'src/com/android/browser/search')
-rw-r--r--src/com/android/browser/search/SearchEngineInfo.java25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/com/android/browser/search/SearchEngineInfo.java b/src/com/android/browser/search/SearchEngineInfo.java
index 0c11a04..ec304f6 100644
--- a/src/com/android/browser/search/SearchEngineInfo.java
+++ b/src/com/android/browser/search/SearchEngineInfo.java
@@ -83,15 +83,13 @@ public class SearchEngineInfo {
// Add the current language/country information to the URIs.
Locale locale = context.getResources().getConfiguration().locale;
- String language = locale.getLanguage();
- StringBuilder languageBuilder = new StringBuilder(language);
- String country = locale.getCountry();
- if (!TextUtils.isEmpty(country) && useLangCountryHl(language, country)) {
- languageBuilder.append('-');
- languageBuilder.append(country);
+ StringBuilder language = new StringBuilder(locale.getLanguage());
+ if (!TextUtils.isEmpty(locale.getCountry())) {
+ language.append('-');
+ language.append(locale.getCountry());
}
- String language_str = languageBuilder.toString();
+ String language_str = language.toString();
mSearchEngineData[FIELD_SEARCH_URI] =
mSearchEngineData[FIELD_SEARCH_URI].replace(PARAMETER_LANGUAGE, language_str);
mSearchEngineData[FIELD_SUGGEST_URI] =
@@ -111,19 +109,6 @@ public class SearchEngineInfo {
mSearchEngineData[FIELD_SUGGEST_URI].replace(PARAMETER_INPUT_ENCODING, enc);
}
- private static boolean useLangCountryHl(String language, String country) {
- // lang-country is currently only supported for a small number of locales
- if("en".equals(language)) {
- return "GB".equals(country);
- } else if ("zh".equals(language)) {
- return "CN".equals(country) || "TW".equals(country);
- } else if ("pt".equals(language)) {
- return "BR".equals(country) || "PT".equals(country);
- } else {
- return false;
- }
- }
-
public String getName() {
return mName;
}