diff options
author | Bjorn Bringert <bringert@android.com> | 2010-09-15 20:46:42 +0100 |
---|---|---|
committer | Bjorn Bringert <bringert@android.com> | 2010-09-15 20:46:42 +0100 |
commit | 4346564c1f6faefff5e0d3fdc7f189ec2e948019 (patch) | |
tree | 7ecedbab5dff885457588e8ef61fcfa41657c286 /tools | |
parent | 6248bff91a445c29df38f54d05b494a0e4f19897 (diff) | |
download | packages_apps_browser-4346564c1f6faefff5e0d3fdc7f189ec2e948019.zip packages_apps_browser-4346564c1f6faefff5e0d3fdc7f189ec2e948019.tar.gz packages_apps_browser-4346564c1f6faefff5e0d3fdc7f189ec2e948019.tar.bz2 |
Fix Google suggest and search URLs when Google Search is not installed
Bug: 3002110
Change-Id: Id49365bf53623c45bfa6f5d96d1938b801948396
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/get_search_engines.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/get_search_engines.py b/tools/get_search_engines.py index 2eecec3..cd73423 100755 --- a/tools/get_search_engines.py +++ b/tools/get_search_engines.py @@ -37,6 +37,12 @@ locales = ["cs-CZ", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", "it-IT", "ja-JP", "ko-KR", "nb-NO", "nl-BE", "nl-NL", "pl-PL", "pt-PT", "pt-BR", "ru-RU", "sv-SE", "tr-TR", "zh-CN", "zh-HK", "zh-MO", "zh-TW"] +google_data = ["google", "Google", "google.com", + "http://www.google.com/favicon.ico", + "http://www.google.com/m?hl={language}&ie={inputEncoding}&source=android-browser&q={searchTerms}", + "UTF-8", + "http://www.google.com/complete/search?hl={language}&json=true&q={searchTerms}"] + class SearchEngineManager(object): """Manages list of search engines and creates locale specific lists. @@ -92,6 +98,10 @@ class SearchEngineManager(object): except that the internal name of the search engine is inserted at the beginning of the list. """ + + if name == "google": + return google_data + # Find the first occurance of this search engine name in the form # " <name> =" in the chrome data file. re_exp = '\s' + name + '\s*=' |