am e20c4a40: AI 149721: Import Portuguese translations.

Merge commit 'e20c4a40dded9e10c41523d9614cf8aecbc6c059' into donut

* commit 'e20c4a40dded9e10c41523d9614cf8aecbc6c059':
  AI 149721: Import Portuguese translations.
diff --git a/Android.mk b/Android.mk
index 02ba333..33cd6ab 100644
--- a/Android.mk
+++ b/Android.mk
@@ -3,10 +3,6 @@
 
 LOCAL_MODULE_TAGS := user
 
-# TODO: Remove dependency of application on the test runner (android.test.runner) 
-# library.
-LOCAL_JAVA_LIBRARIES := android.test.runner
-
 LOCAL_STATIC_JAVA_LIBRARIES := google-framework
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
@@ -14,3 +10,6 @@
 LOCAL_PACKAGE_NAME := Browser
 
 include $(BUILD_PACKAGE)
+
+# additionally, build tests in sub-folders in a separate .apk
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c67cc97..0cc9538 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -49,13 +49,10 @@
                    android:label="@string/application_name"
                    android:icon="@drawable/ic_launcher_browser"
                    android:taskAffinity="android.task.browser" >
-        <!-- TODO: Remove dependency of application on the test runner
-             (android.test) library. -->
-        <uses-library android:name="android.test.runner" />
 
-        <provider android:name="BrowserProvider" 
-                  android:authorities="browser" 
-                  android:multiprocess="true" 
+        <provider android:name="BrowserProvider"
+                  android:authorities="browser"
+                  android:multiprocess="true"
                   android:readPermission="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
                   android:writePermission="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
         <activity android:name="BrowserActivity"
@@ -82,6 +79,7 @@
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="http" />
                 <data android:scheme="https" />
+                <data android:scheme="data" />
                 <data android:mimeType="text/html"/>
                 <data android:mimeType="text/plain"/>
                 <data android:mimeType="application/xhtml+xml"/>
@@ -111,7 +109,6 @@
                 <data android:scheme="https" />
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.WEB_SEARCH" />
                 <action android:name="android.intent.action.MEDIA_SEARCH" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
@@ -148,7 +145,7 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
 
-        </activity-alias>        
+        </activity-alias>
 
         <activity android:name="BrowserDownloadPage" android:label=""
                   android:configChanges="orientation|keyboardHidden">
@@ -176,6 +173,19 @@
                   android:theme="@android:style/Theme.Dialog">
         </activity>
 
+        <activity android:name="BookmarkSearch"
+                  android:label="@string/bookmarks_search"
+                  android:stateNotNeeded="true"
+                  android:theme="@android:style/Theme.NoDisplay"
+                  android:excludeFromRecents="true">
+            <intent-filter>
+                <action android:name="android.intent.action.SEARCH" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <meta-data android:name="android.app.searchable"
+                    android:resource="@xml/bookmarks_searchable" />
+        </activity>
+
         <service android:name="GearsDialogService"
                  android:process=":dialog"
                  android:exported="false">
@@ -199,23 +209,5 @@
 
     </application>
 
-    <!-- Browser tests.  Invoke with: -->
-    <!--      adb shell am instrument -w com.android.browser/.BrowserTestRunner -->
-    <instrumentation android:name="BrowserTestRunner"
-        android:targetPackage="com.android.browser"
-        android:label="@string/activity_instrumentation_test_runner"
-    />
-    <!-- Browser tests.  Invoke with: -->
-    <!--      adb shell am instrument -w com.android.browser/.BrowserFunctionalTestRunner -->
-    <instrumentation android:name="BrowserFunctionalTestRunner"
-        android:targetPackage="com.android.browser"
-        android:label="@string/activity_instrumentation_functional_test_runner"
-    />
-
-    <instrumentation android:name="BrowserLaunchPerformance"
-        android:targetPackage="com.android.browser"
-        android:label="Browser Launch Performance"
-    />
-
 </manifest>
 
diff --git a/res/drawable/ic_search_category_bookmark.png b/res/drawable/ic_search_category_bookmark.png
index 08b5e74..d228408 100755
--- a/res/drawable/ic_search_category_bookmark.png
+++ b/res/drawable/ic_search_category_bookmark.png
Binary files differ
diff --git a/res/drawable/ic_search_category_history.png b/res/drawable/ic_search_category_history.png
index 894c254..12cd51c 100755
--- a/res/drawable/ic_search_category_history.png
+++ b/res/drawable/ic_search_category_history.png
Binary files differ
diff --git a/res/drawable/ic_search_category_suggest.png b/res/drawable/ic_search_category_suggest.png
index ada07e6..a4ed7aa 100755
--- a/res/drawable/ic_search_category_suggest.png
+++ b/res/drawable/ic_search_category_suggest.png
Binary files differ
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 8379ab6..67ab130 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -236,7 +236,6 @@
     <string name="download_length_required">"Nelze stáhnout. Velikost položky nelze určit."</string>
     <string name="download_precondition_failed">"Stahování bylo přerušeno a nelze v něm pokračovat."</string>
     <string name="activity_instrumentation_test_runner">"Testovací verze prohlížeče"</string>
-    <string name="search_google">"Prohledat Google"</string>
     <string name="permlab_readHistoryBookmarks">"čtení historie a záložek prohlížeče"</string>
     <string name="permdesc_readHistoryBookmarks">"Umožňuje aplikaci číst všechny navštívené adresy URL a záložky prohlížeče."</string>
     <string name="permlab_writeHistoryBookmarks">"zápis historie a záložek prohlížeče"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index a6f2f0f..184bc83 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -236,7 +236,6 @@
     <string name="download_length_required">"Download kann nicht gestartet werden, da die Größe des Elements nicht bestimmt werden kann."</string>
     <string name="download_precondition_failed">"Download wurde unterbrochen und kann nicht fortgesetzt werden."</string>
     <string name="activity_instrumentation_test_runner">"Browser Test Runner"</string>
-    <string name="search_google">"In Google suchen"</string>
     <string name="permlab_readHistoryBookmarks">"Browserverlauf und Lesezeichen lesen"</string>
     <string name="permdesc_readHistoryBookmarks">"Ermöglicht der Anwendung, alle URLs, die mit dem Browser besucht wurden, sowie alle Lesezeichen des Browsers zu lesen."</string>
     <string name="permlab_writeHistoryBookmarks">"Browserverlauf und Lesezeichen schreiben"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
new file mode 100644
index 0000000..5a5eb6e
--- /dev/null
+++ b/res/values-es-rUS/strings.xml
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="application_name">"Navegador"</string>
+    <string name="tab_bookmarks">"Marcadores"</string>
+    <string name="tab_most_visited">"Los más visitados"</string>
+    <string name="tab_history">"Historial"</string>
+    <string name="added_to_bookmarks">"Agregado a marcadores"</string>
+    <string name="removed_from_bookmarks">"Suprimido de los marcadores"</string>
+    <string name="sign_in_to">"Iniciar sesión en <xliff:g id="HOSTNAME">%s1</xliff:g> \"<xliff:g id="REALM">%s2</xliff:g>\""</string>
+    <string name="username">"Nombre"</string>
+    <string name="password">"Contraseña"</string>
+    <string name="action">"Iniciar sesión"</string>
+    <string name="cancel">"Cancelar"</string>
+    <string name="ok">"Aceptar"</string>
+    <!-- no translation found for matches_found:zero (6242659159545399963) -->
+    <!-- no translation found for matches_found:one (4352019729062956802) -->
+    <!-- no translation found for matches_found:few (5544267486978946555) -->
+    <!-- no translation found for matches_found:other (6616125067364315405) -->
+    <string name="page_info">"Información de la página"</string>
+    <string name="page_info_view">"Ver información de la página"</string>
+    <string name="page_info_address">"Dirección:"</string>
+    <string name="ssl_warnings_header">"Existen problemas con el certificado de seguridad para este sitio."</string>
+    <string name="ssl_continue">"Continuar"</string>
+    <string name="security_warning">"Advertencia de seguridad"</string>
+    <string name="view_certificate">"Ver certificado"</string>
+    <string name="ssl_untrusted">"Este certificado no proviene de una fuente confiable."</string>
+    <string name="ssl_mismatch">"El nombre del sitio no coincide con el nombre del certificado."</string>
+    <string name="ssl_expired">"Este certificado ha expirado."</string>
+    <string name="ssl_not_yet_valid">"Este certificado aún no es válido."</string>
+    <string name="ssl_certificate">"Certificado de seguridad"</string>
+    <string name="ssl_certificate_is_valid">"Este certificado es válido."</string>
+    <string name="issued_to">"Emitido a:"</string>
+    <string name="common_name">"Nombre habitual:"</string>
+    <string name="org_name">"Organización:"</string>
+    <string name="org_unit">"Unidad organizativa"</string>
+    <string name="issued_by">"Emitido por:"</string>
+    <string name="validity_period">"Validez:"</string>
+    <string name="issued_on">"Enviado el:"</string>
+    <string name="expires_on">"Expira el:"</string>
+    <string name="retrieving_creds_dlg_msg">"Recuperando detalles de inicio de sesión..."</string>
+    <string name="stopping">"Deteniendo..."</string>
+    <string name="stop">"Detener"</string>
+    <string name="reload">"Actualizar"</string>
+    <string name="forward">"Reenviar"</string>
+    <string name="save">"Aceptar"</string>
+    <string name="do_not_save">"Cancelar"</string>
+    <string name="location">"Ubicación"</string>
+    <string name="name">"Nombre"</string>
+    <string name="http">"http://"</string>
+    <string name="save_to_bookmarks">"Marcador"</string>
+    <string name="edit_bookmark">"Editar marcador"</string>
+    <string name="create_shortcut_bookmark">"Agregar acceso directo a la página de inicio"</string>
+    <string name="open_bookmark">"Abrir"</string>
+    <string name="remove_bookmark">"Eliminar marcador"</string>
+    <string name="remove_history_item">"Suprimir del historial"</string>
+    <string name="bookmark_saved">"Guardado en los marcadores."</string>
+    <string name="bookmark_needs_title">"El marcador debe tener un nombre."</string>
+    <string name="bookmark_needs_url">"El marcador debe tener una ubicación."</string>
+    <string name="empty_bookmark">"No es posible crear un marcador vacío."</string>
+    <string name="bookmark_url_not_valid">"La URL no es válida."</string>
+    <string name="delete_bookmark">"Eliminar"</string>
+    <string name="bookmark_page">"Última página vista del marcador"</string>
+    <string name="current_page">"de "</string>
+    <string name="delete_bookmark_warning">"El marcador \"<xliff:g id="BOOKMARK">%s</xliff:g>\" se eliminará."</string>
+    <string name="open_in_new_window">"Abrir en una ventana nueva"</string>
+    <string name="new_window">"Ventana nueva"</string>
+    <string name="goto_dot">"Ir"</string>
+    <string name="find_dot">"Buscar en la página"</string>
+    <string name="select_dot">"Seleccionar texto"</string>
+    <string name="view_tabs">"Descripción general de la ventana"</string>
+    <string name="view_tabs_condensed">"Windows"</string>
+    <string name="tab_picker_title">"Ventana actual"</string>
+    <string name="tab_picker_view_tab">"Ver"</string>
+    <string name="tab_picker_new_tab">"Ventana nueva"</string>
+    <string name="tab_picker_remove_tab">"Cerrar"</string>
+    <string name="tab_picker_bookmark">"Marcador"</string>
+    <string name="tab_picker_send_url">"Compartir enlace"</string>
+    <string name="bookmarks">"Marcadores"</string>
+    <string name="shortcut_bookmark">"Marcador"</string>
+    <string name="history">"Historial"</string>
+    <string name="menu_view_download">"Descargas"</string>
+    <string name="share_page">"Compartir página"</string>
+    <string name="contextmenu_openlink">"Abrir"</string>
+    <string name="contextmenu_openlink_newwindow">"Abrir en una ventana nueva"</string>
+    <string name="contextmenu_bookmark_thislink">"Enlace del marcador"</string>
+    <string name="contextmenu_savelink">"Guardar enlace"</string>
+    <string name="contextmenu_sharelink">"Compartir enlace"</string>
+    <string name="contextmenu_copy">"Copiar"</string>
+    <string name="contextmenu_copylink">"Copiar URL de vínculo"</string>
+    <string name="contextmenu_download_image">"Guardar imagen"</string>
+    <string name="contextmenu_view_image">"Ver imagen"</string>
+    <string name="contextmenu_dial_dot">"Discar..."</string>
+    <string name="contextmenu_add_contact">"Agregar contacto"</string>
+    <string name="contextmenu_send_mail">"Enviar correo electrónico"</string>
+    <string name="contextmenu_map">"Situar en el mapa"</string>
+    <string name="clear">"Borrar"</string>
+    <string name="replace">"Reemplazar"</string>
+    <string name="browser_bookmarks_page_bookmarks_text">"Marcadores"</string>
+    <string name="menu_preferences">"Configuración"</string>
+    <string name="pref_content_title">"Configuración del contenido de la página"</string>
+    <string name="pref_content_load_images">"Cargar imágenes"</string>
+    <string name="pref_content_load_images_summary">"Visualizar imágenes en páginas web"</string>
+    <string name="pref_content_block_popups">"Bloquear ventanas emergentes"</string>
+    <string name="pref_content_javascript">"Habilitar JavaScript"</string>
+    <string name="pref_content_open_in_background">"Abrir en modo subordinado"</string>
+    <string name="pref_content_open_in_background_summary">"Hay ventanas nuevas abiertas detrás de la ventana actual"</string>
+    <string name="pref_content_homepage">"Definir página de inicio"</string>
+    <string name="pref_content_autofit">"Ajuste automático de páginas"</string>
+    <string name="pref_content_autofit_summary">"Formatea las páginas web para que se ajusten a la pantalla"</string>
+    <string name="pref_privacy_title">"Configuración de privacidad"</string>
+    <string name="pref_privacy_clear_cache">"Borrar caché"</string>
+    <string name="pref_privacy_clear_cache_summary">"Eliminar todo el contenido de la página en caché"</string>
+    <string name="pref_privacy_clear_cache_dlg">"Se borrará el caché."</string>
+    <string name="pref_privacy_clear_cookies">"Borrar todos los datos de cookies"</string>
+    <string name="pref_privacy_clear_cookies_summary">"Borrar todas las cookies del navegador"</string>
+    <string name="pref_privacy_clear_cookies_dlg">"Se borrarán todas las cookies."</string>
+    <string name="pref_privacy_clear_history">"Borrar historial"</string>
+    <string name="pref_privacy_clear_history_summary">"Borrar el historial de navegación del navegador"</string>
+    <string name="pref_privacy_clear_history_dlg">"Se borrará el historial del navegador."</string>
+    <string name="pref_privacy_clear_form_data">"Borrar datos del formulario"</string>
+    <string name="pref_privacy_clear_form_data_summary">"Borrar todos los datos guardados del formulario"</string>
+    <string name="pref_privacy_clear_form_data_dlg">"Se borrarán todos los datos guardados del formulario."</string>
+    <string name="pref_privacy_clear_passwords">"Borrar contraseñas"</string>
+    <string name="pref_privacy_clear_passwords_summary">"Borrar todas las contraseñas guardadas"</string>
+    <string name="pref_privacy_clear_passwords_dlg">"Se borrarán todas las contraseñas guardadas."</string>
+    <string name="pref_security_title">"Configuración de seguridad"</string>
+    <string name="pref_security_remember_passwords">"Recordar contraseñas"</string>
+    <string name="pref_security_remember_passwords_summary">"Guardar nombres de usuario y contraseñas para sitios web"</string>
+    <string name="pref_security_save_form_data">"Recordar datos del formulario"</string>
+    <string name="pref_security_save_form_data_summary">"Recordar los datos ingresados en los formularios para uso futuro"</string>
+    <string name="pref_security_show_security_warning">"Mostrar advertencias de seguridad"</string>
+    <string name="pref_security_show_security_warning_summary">"Mostrar una advertencia si hay un problema con la seguridad de un sitio"</string>
+    <string name="pref_security_accept_cookies">"Aceptar cookies"</string>
+    <string name="pref_security_accept_cookies_summary">"Permitir que los sitios guarden y lean datos de las \"cookies\""</string>
+    <string name="pref_text_size">"Definir tamaño del texto"</string>
+  <string-array name="pref_text_size_choices">
+    <item>"Pequeño"</item>
+    <item>"Pequeño"</item>
+    <item>"Normal"</item>
+    <item>"Grande"</item>
+    <item>"Enorme"</item>
+  </string-array>
+    <string name="pref_text_size_dialogtitle">"Tamaño del texto"</string>
+    <string name="pref_extras_title">"Configuración avanzada"</string>
+    <string name="pref_extras_gears_enable">"Habilitar Gears"</string>
+    <string name="pref_extras_gears_enable_summary">"Aplicaciones que amplían la funcionalidad del navegador"</string>
+    <string name="pref_extras_gears_settings">"Configuración de Gears"</string>
+    <string name="pref_plugin_installed">"Lista de complementos"</string>
+    <string name="pref_plugin_installed_empty_list">"No hay complementos instalados."</string>
+    <string name="pref_extras_gears_settings_summary">"Aplicaciones que amplían la funcionalidad del navegador"</string>
+    <string name="pref_extras_reset_default">"Restablecer a los valores predeterminados"</string>
+    <string name="pref_extras_reset_default_summary">"Borrar todos los datos del navegador y restablecer la configuración a los valores predeterminados"</string>
+    <string name="pref_extras_reset_default_dlg">"Se borrarán todos los datos del navegador y la configuración volverá a los valores predeterminados."</string>
+    <string name="pref_extras_reset_default_dlg_title">"Restablecer a los valores predeterminados"</string>
+    <string name="pref_development_title">"Depurar"</string>
+    <string name="pref_default_text_encoding">"Definir codificación de texto"</string>
+  <string-array name="pref_default_text_encoding_choices">
+    <item>"Latino-1 (ISO-8859-1)"</item>
+    <item>"Unicode (UTF-8)"</item>
+    <item>"Japonés (ISO-2022-JP)"</item>
+    <item>"Japonés (SHIFT_JIS)"</item>
+    <item>"Japonés (EUC-JP)"</item>
+  </string-array>
+    <string name="pref_default_text_encoding_dialogtitle">"Codificación de texto"</string>
+    <string name="pref_default_text_encoding_default">"Latino-1"</string>
+    <string name="browserFrameRedirect">"Redireccionamiento"</string>
+    <string name="browserFrame307Post">"Esta página web está siendo redireccionada. ¿Deseas reenviar los datos que ingresaste en tu formulario a la ubicación nueva?"</string>
+    <string name="browserFrameNetworkErrorLabel">"Problema de conectividad de datos"</string>
+    <string name="browserFrameFileErrorLabel">"Problema con el archivo"</string>
+    <string name="browserFrameFormResubmitLabel">"Confirmar"</string>
+    <string name="browserFrameFormResubmitMessage">"La página que intentas ver contiene datos que ya se han suministrado (\"POSTDATA\"). Si vuelves a enviar los datos, se repetirán las acciones que haya realizado el formulario (como una búsqueda o compra en línea)."</string>
+    <string name="loadSuspendedTitle">"No hay conexión a la red"</string>
+    <string name="loadSuspended">"La página continuará cargando cuando se haya restablecido la conexión."</string>
+    <string name="clear_history">"Borrar historial"</string>
+    <string name="browser_history">"Últimas páginas visitadas"</string>
+    <string name="empty_history">"El historial del navegador está vacío."</string>
+    <string name="add_new_bookmark">"Agregar marcador..."</string>
+    <string name="no_database">"No hay base de datos"</string>
+    <string name="search_hint">"Escribe la dirección web"</string>
+    <string name="search_button_text">"Ir"</string>
+    <string name="attention">"Atención"</string>
+    <string name="popup_window_attempt">"Este sitio está intentando abrir una ventana emergente."</string>
+    <string name="allow">"Permitir"</string>
+    <string name="block">"Bloquear"</string>
+    <string name="too_many_windows_dialog_title">"Se alcanzó el límite de la ventana"</string>
+    <string name="too_many_windows_dialog_message">"No se ha podido abrir una ventana nueva porque ya has abierto el máximo permitido."</string>
+    <string name="too_many_subwindows_dialog_title">"Ventana emergente ya abierta"</string>
+    <string name="too_many_subwindows_dialog_message">"No es posible abrir una ventana emergente nueva porque sólo puede abrirse una por vez."</string>
+    <string name="download_title">"Historial de descarga"</string>
+    <string name="download_unknown_filename">"&lt;Desconocido&gt;"</string>
+    <string name="download_menu_open">"Abrir"</string>
+    <string name="download_menu_clear">"Borrar de la lista"</string>
+    <string name="download_menu_cancel">"Cancelar descarga"</string>
+    <string name="download_menu_cancel_all">"Cancelar todas las descargas"</string>
+    <string name="download_menu_clear_all">"Borrar lista"</string>
+    <string name="download_clear_dlg_title">"Borrar"</string>
+    <string name="download_clear_dlg_msg">"Todos los elementos se borrarán de la lista y se suprimirán del caché del navegador."</string>
+    <string name="download_cancel_dlg_title">"Cancelar descargas"</string>
+    <string name="download_cancel_dlg_msg">"Las <xliff:g id="DOWNLOAD_COUNT">%d</xliff:g> descargas se cancelarán y se borrarán del historial de descarga."</string>
+    <string name="download_file_error_dlg_title">"No hay espacio suficiente"</string>
+    <string name="download_file_error_dlg_msg">"<xliff:g id="FILENAME">%s</xliff:g> no se pudo cargar."\n"Libera espacio en tu teléfono y vuelve a intentarlo."</string>
+    <string name="download_failed_generic_dlg_title">"Descarga incorrecta"</string>
+    <string name="download_no_sdcard_dlg_title">"No hay tarjeta SD"</string>
+    <string name="download_no_sdcard_dlg_msg">"Es necesario tener una tarjeta SD para descargar <xliff:g id="FILENAME">%s</xliff:g>."</string>
+    <string name="download_sdcard_busy_dlg_title">"Tarjeta SD no disponible"</string>
+    <string name="download_sdcard_busy_dlg_msg">"La tarjeta SD está llena. Para permitir descargas, selecciona \"Desactivar almacenamiento USB\" en la notificación."</string>
+    <string name="download_no_application">"No se encuentra una aplicación para abrir este archivo."</string>
+    <string name="retry">"¿Intentar nuevamente"</string>
+    <string name="no_downloads">"El historial de descarga está vacío."</string>
+    <string name="download_error">"Descarga incorrecta."</string>
+    <string name="download_success">"<xliff:g id="FILE">%s</xliff:g> Descarga completa."</string>
+    <string name="download_running">"Descargando..."</string>
+    <string name="download_pending">"Iniciando la descarga..."</string>
+    <string name="download_pending_network">"Esperando la conexión de datos..."</string>
+    <string name="download_running_paused">"Esperando la conexión de datos..."</string>
+    <string name="download_canceled">"Descarga cancelada."</string>
+    <string name="download_not_acceptable">"No es posible realizar la descarga. El contenido no se admite en el teléfono."</string>
+    <string name="download_file_error">"No es posible terminar la descarga. No hay espacio suficiente."</string>
+    <string name="download_length_required">"No es posible realizar la descarga. No puede determinarse el tamaño del elemento."</string>
+    <string name="download_precondition_failed">"Descarga interrumpida. No se puede retomar."</string>
+    <string name="activity_instrumentation_test_runner">"Ejecutor de pruebas del navegador"</string>
+    <string name="permlab_readHistoryBookmarks">"leer historial y marcadores del navegador"</string>
+    <string name="permdesc_readHistoryBookmarks">"Permite a la aplicación leer todas las URL que ha visitado el navegador y todos los marcadores del navegador."</string>
+    <string name="permlab_writeHistoryBookmarks">"escribir historial y marcadores del navegador"</string>
+    <string name="permdesc_writeHistoryBookmarks">"Permite a una aplicación modificar el historial y los marcadores del navegador almacenados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar tus datos."</string>
+    <string name="query_data_prompt">"Permitir almacenamiento"</string>
+    <string name="query_data_message">"Este sitio web desea almacenar información en tu teléfono."</string>
+    <string name="location_prompt">"Acceder a tu ubicación"</string>
+    <string name="location_message">"Este sitio web desea acceder a tu ubicación."</string>
+    <string name="shortcut_prompt">"Crear un acceso directo"</string>
+    <string name="shortcut_message">"Este sitio web desea crear un acceso directo a esta página en tu pantalla de inicio"</string>
+    <string name="settings_message">"En la siguiente tabla, se muestran los permisos que has otorgado a cada sitio que ha intentado utilizar Gears."</string>
+    <string name="filepicker_message">"File Picker"</string>
+    <string name="image_message">"Imagen seleccionada"</string>
+    <string name="settings_title">"Configuración de Gears"</string>
+    <string name="privacy_policy">"Lee la política de privacidad del sitio para ver cómo se utilizará tu ubicación."</string>
+    <string name="settings_storage_title">"Permitir almacenamiento local"</string>
+    <string name="settings_storage_subtitle_on">"Este sitio puede guardar información en tu teléfono"</string>
+    <string name="settings_storage_subtitle_off">"Este sitio no puede guardar información en tu teléfono"</string>
+    <string name="settings_location_title">"Permitir detección de ubicación"</string>
+    <string name="settings_location_subtitle_on">"Este sitio puede leer tu ubicación actual"</string>
+    <string name="settings_location_subtitle_off">"Este sitio no puede leer tu ubicación actual"</string>
+    <string name="settings_remove_site">"Suprimir este sitio de Gears"</string>
+    <string name="settings_empty">"No hay permisos definidos"</string>
+    <string name="settings_confirmation_remove_title">"Suprimir este sitio"</string>
+    <string name="settings_confirmation_remove">"Se borrarán todos los permisos y se eliminarán los datos del sitio almacenados en el teléfono."</string>
+    <string name="storage_notification">"Este sitio almacenará información en este teléfono. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
+    <string name="storage_notification_alwaysdeny">"Este sitio nunca almacenará información en este teléfono. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
+    <string name="location_notification">"Este sitio puede acceder a tu ubicación. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
+    <string name="location_notification_alwaysdeny">"Este sitio no accederá a tu ubicación. "\n" Cambia esta configuración en:"\n" Configuración -&gt; Configuración de Gears"</string>
+    <string name="shortcut_notification">"Acceso directo creado"</string>
+    <string name="permission_button_alwaysdeny">"No permitir nunca"</string>
+    <string name="permission_button_allow">"Aceptar"</string>
+    <string name="permission_button_deny">"Cancelar"</string>
+    <string name="shortcut_button_alwaysdeny">"No permitir nunca"</string>
+    <string name="shortcut_button_allow">"Aceptar"</string>
+    <string name="shortcut_button_deny">"Cancelar"</string>
+    <string name="settings_button_allow">"Aplicar"</string>
+    <string name="settings_button_deny">"Cancelar"</string>
+    <string name="filepicker_button_allow">"Aceptar"</string>
+    <string name="filepicker_button_deny">"Cancelar"</string>
+    <string name="filepicker_path">"ruta:"</string>
+    <string name="filepicker_no_files_selected">"No hay archivos seleccionados"</string>
+    <string name="filepicker_one_file_selected">"Un archivo seleccionado"</string>
+    <string name="filepicker_some_files_selected">"archivo seleccionado"</string>
+    <string name="remove">"Eliminar"</string>
+    <string name="local_storage">"Almacenamiento local"</string>
+    <string name="allowed">"Permitido"</string>
+    <string name="denied">"Denegado"</string>
+    <string name="unrecognized_dialog_message">"Tipo de diálogo no reconocido"</string>
+    <string name="default_button">"Aceptar"</string>
+    <string name="zoom_overview_button_text">"Descripción general"</string>
+</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 3cde9b4..0ba9501 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -117,12 +117,12 @@
     <string name="pref_content_title">"Configuración de contenido de la página"</string>
     <string name="pref_content_load_images">"Cargar imágenes"</string>
     <string name="pref_content_load_images_summary">"Mostrar imágenes en páginas web"</string>
-    <string name="pref_content_block_popups">"Bloquear ventanas emer."</string>
+    <string name="pref_content_block_popups">"Bloquear ventanas emergentes"</string>
     <string name="pref_content_javascript">"Habilitar JavaScript"</string>
     <string name="pref_content_open_in_background">"Abrir en segundo plano"</string>
     <string name="pref_content_open_in_background_summary">"Nuevas ventanas abiertas detrás de la actual"</string>
     <string name="pref_content_homepage">"Establecer página principal"</string>
-    <string name="pref_content_autofit">"Ajustar páginas automát."</string>
+    <string name="pref_content_autofit">"Ajustar páginas automáticamente"</string>
     <string name="pref_content_autofit_summary">"Configurar las páginas web para ajustarlas a la pantalla"</string>
     <string name="pref_privacy_title">"Configuración de privacidad"</string>
     <string name="pref_privacy_clear_cache">"Borrar caché"</string>
@@ -143,9 +143,9 @@
     <string name="pref_security_title">"Configuración de seguridad"</string>
     <string name="pref_security_remember_passwords">"Recordar contraseñas"</string>
     <string name="pref_security_remember_passwords_summary">"Guardar nombres de usuario y contraseñas de sitios web"</string>
-    <string name="pref_security_save_form_data">"Recordar formularios"</string>
+    <string name="pref_security_save_form_data">"Recordar datos de formulario"</string>
     <string name="pref_security_save_form_data_summary">"Recordar datos introducidos en formularios"</string>
-    <string name="pref_security_show_security_warning">"Mostrar advertencias"</string>
+    <string name="pref_security_show_security_warning">"Mostrar advertencias de seguridad"</string>
     <string name="pref_security_show_security_warning_summary">"Mostrar advertencia si hay algún problema con la seguridad del sitio"</string>
     <string name="pref_security_accept_cookies">"Aceptar cookies"</string>
     <string name="pref_security_accept_cookies_summary">"Permitir que los sitios guarden y lean datos de cookies"</string>
@@ -165,12 +165,12 @@
     <string name="pref_plugin_installed">"Lista de complementos"</string>
     <string name="pref_plugin_installed_empty_list">"Ningún complemento instalado"</string>
     <string name="pref_extras_gears_settings_summary">"Aplicaciones que amplían las funciones del navegador"</string>
-    <string name="pref_extras_reset_default">"Restablecer valores pred."</string>
+    <string name="pref_extras_reset_default">"Restablecer valores predeterminados"</string>
     <string name="pref_extras_reset_default_summary">"Borrar todos los datos del navegador y restablecer la configuración predeterminada"</string>
     <string name="pref_extras_reset_default_dlg">"Se borrarán todos los datos del navegador y se restablecerá la configuración predeterminada."</string>
     <string name="pref_extras_reset_default_dlg_title">"Restablecer valores predeterminados"</string>
     <string name="pref_development_title">"Depurar"</string>
-    <string name="pref_default_text_encoding">"Codificación de texto"</string>
+    <string name="pref_default_text_encoding">"Establecer codificación de texto"</string>
   <string-array name="pref_default_text_encoding_choices">
     <item>"Latín-1 (ISO-8859-1)"</item>
     <item>"Unicode (UTF-8)"</item>
@@ -236,7 +236,6 @@
     <string name="download_length_required">"No se puede realizar la descarga, porque no es posible determinar el tamaño del elemento."</string>
     <string name="download_precondition_failed">"La descarga se ha interrumpido y no se puede reanudar."</string>
     <string name="activity_instrumentation_test_runner">"Realizador de pruebas del navegador"</string>
-    <string name="search_google">"Búsqueda de Google"</string>
     <string name="permlab_readHistoryBookmarks">"leer información de marcadores y del historial del navegador"</string>
     <string name="permdesc_readHistoryBookmarks">"Permite que la aplicación lea todas las URL que ha visitado el navegador y todos sus marcadores."</string>
     <string name="permlab_writeHistoryBookmarks">"escribir en marcadores y en el historial del navegador"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 9093f99..4be49ee 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -122,7 +122,7 @@
     <string name="pref_content_open_in_background">"Ouvrir en arrière-plan"</string>
     <string name="pref_content_open_in_background_summary">"Les nouvelles fenêtres s\'ouvrent derrière la fenêtre actuelle"</string>
     <string name="pref_content_homepage">"Configurer la page d\'accueil"</string>
-    <string name="pref_content_autofit">"Redimensionner"</string>
+    <string name="pref_content_autofit">"Redimensionner les pages"</string>
     <string name="pref_content_autofit_summary">"Configurer les pages Web pour qu\'elles s\'ajustent à l\'écran"</string>
     <string name="pref_privacy_title">"Paramètres de confidentialité"</string>
     <string name="pref_privacy_clear_cache">"Effacer le cache"</string>
@@ -134,18 +134,18 @@
     <string name="pref_privacy_clear_history">"Effacer l\'historique"</string>
     <string name="pref_privacy_clear_history_summary">"Effacer l\'historique du navigateur"</string>
     <string name="pref_privacy_clear_history_dlg">"L\'historique du navigateur sera effacé."</string>
-    <string name="pref_privacy_clear_form_data">"Eff. données formulaires"</string>
+    <string name="pref_privacy_clear_form_data">"Effacer données formulaire"</string>
     <string name="pref_privacy_clear_form_data_summary">"Effacer toutes les données de formulaire enregistrées"</string>
     <string name="pref_privacy_clear_form_data_dlg">"Toutes les données de formulaire enregistrées seront effacées."</string>
     <string name="pref_privacy_clear_passwords">"Effacer les mots de passe"</string>
     <string name="pref_privacy_clear_passwords_summary">"Effacer tous les mots de passe enregistrés"</string>
     <string name="pref_privacy_clear_passwords_dlg">"Tous les mots de passe enregistrés seront effacés."</string>
     <string name="pref_security_title">"Paramètres de sécurité"</string>
-    <string name="pref_security_remember_passwords">"Mém. mots de passe"</string>
+    <string name="pref_security_remember_passwords">"Mémoriser les mots de passe"</string>
     <string name="pref_security_remember_passwords_summary">"Enregistrer les noms d\'utilisateur et les mots de passe pour les sites Web"</string>
-    <string name="pref_security_save_form_data">"Mém. données formulaire"</string>
-    <string name="pref_security_save_form_data_summary">"Mémoriser les données saisies dans les formulaires pour les réutiliser"</string>
-    <string name="pref_security_show_security_warning">"Avertiss. de sécurité"</string>
+    <string name="pref_security_save_form_data">"Mémoriser données formulaire"</string>
+    <string name="pref_security_save_form_data_summary">"Mémoriser les données saisies dans les formulaires pour les utiliser ultérieurement"</string>
+    <string name="pref_security_show_security_warning">"Avertissements de sécurité"</string>
     <string name="pref_security_show_security_warning_summary">"Afficher un avertissement en cas de problème de sécurité d\'un site"</string>
     <string name="pref_security_accept_cookies">"Accepter les cookies"</string>
     <string name="pref_security_accept_cookies_summary">"Autoriser les sites à enregistrer et lire les données des cookies"</string>
@@ -236,22 +236,21 @@
     <string name="download_length_required">"Téléchargement impossible. La taille de l\'élément n\'a pas pu être déterminée."</string>
     <string name="download_precondition_failed">"Téléchargement interrompu. Impossible de reprendre le téléchargement."</string>
     <string name="activity_instrumentation_test_runner">"Testeur de navigateur"</string>
-    <string name="search_google">"Recherche Google"</string>
     <string name="permlab_readHistoryBookmarks">"Lecture de l\'historique du navigateur et des favoris"</string>
     <string name="permdesc_readHistoryBookmarks">"Permet à l\'application de lire toutes les URL visitées par le navigateur et tous les favoris."</string>
     <string name="permlab_writeHistoryBookmarks">"Enregistrement de l\'historique du navigateur et des favoris"</string>
     <string name="permdesc_writeHistoryBookmarks">"Permet à une application de modifier l\'historique du navigateur ou les favoris enregistrés sur votre téléphone. Des applications malveillantes peuvent utiliser cette fonction pour effacer ou modifier les données de votre navigateur."</string>
     <string name="query_data_prompt">"Autoriser le stockage"</string>
     <string name="query_data_message">"Ce site souhaite enregistrer des informations sur votre téléphone."</string>
-    <string name="location_prompt">"Afficher ma position"</string>
+    <string name="location_prompt">"Afficher votre position"</string>
     <string name="location_message">"Ce site souhaite afficher votre position."</string>
     <string name="shortcut_prompt">"Créer un raccourci"</string>
-    <string name="shortcut_message">"Le site souhaite créer un raccourci vers cette page sur votre écran d\'accueil."</string>
+    <string name="shortcut_message">"Le site souhaite créer un raccourci vers cette page sur votre page d\'accueil."</string>
     <string name="settings_message">"Le tableau ci-dessous indique les fonctions que vous avez autorisées pour chaque site ayant tenté d\'utiliser Google Gears."</string>
     <string name="filepicker_message">"Sélecteur de fichier"</string>
     <string name="image_message">"Image sélectionnée"</string>
     <string name="settings_title">"Paramètres Google Gears"</string>
-    <string name="privacy_policy">"Lisez les règles de confidentialité du site pour savoir comment les informations sur votre localisation seront utilisées."</string>
+    <string name="privacy_policy">"Lisez les règles de confidentialité du site pour voir comment votre emplacement sera utilisé."</string>
     <string name="settings_storage_title">"Autoriser le stockage local"</string>
     <string name="settings_storage_subtitle_on">"Ce site peut enregistrer des informations sur votre téléphone."</string>
     <string name="settings_storage_subtitle_off">"Ce site ne peut enregistrer aucune information sur votre téléphone."</string>
@@ -264,7 +263,7 @@
     <string name="settings_confirmation_remove">"Toutes les autorisations seront effacées et toutes les données enregistrées par le site sur votre téléphone seront supprimées."</string>
     <string name="storage_notification">"Ce site enregistrera des informations sur votre téléphone."\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
     <string name="storage_notification_alwaysdeny">"Ce site n\'enregistrera jamais aucune information sur votre téléphone."\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
-    <string name="location_notification">"Ce site peut afficher votre position actuelle. "\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
+    <string name="location_notification">"Ce site peut afficher votre emplacement actuel. "\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
     <string name="location_notification_alwaysdeny">"Ce site n\'affichera pas votre position actuelle."\n" Modifiez ce paramètre dans :"\n" Paramètres -&gt; Paramètres Gears."</string>
     <string name="shortcut_notification">"Raccourci créé"</string>
     <string name="permission_button_alwaysdeny">"Ne jamais autoriser"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index b94a285..d441fba 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -145,7 +145,7 @@
     <string name="pref_security_remember_passwords_summary">"Salva nomi utente e password per i siti web"</string>
     <string name="pref_security_save_form_data">"Memorizza dati moduli"</string>
     <string name="pref_security_save_form_data_summary">"Memorizza i dati che digito nei moduli per usi futuri"</string>
-    <string name="pref_security_show_security_warning">"Mostra avvisi protezione"</string>
+    <string name="pref_security_show_security_warning">"Mostra avvisi di protezione"</string>
     <string name="pref_security_show_security_warning_summary">"Mostra un avviso se esiste un problema di sicurezza con un sito"</string>
     <string name="pref_security_accept_cookies">"Accetta cookie"</string>
     <string name="pref_security_accept_cookies_summary">"Consenti ai siti di salvare e leggere i dati \"cookie\""</string>
@@ -236,7 +236,6 @@
     <string name="download_length_required">"Impossibile effettuare il download. Impossibile determinare le dimensioni dell\'elemento."</string>
     <string name="download_precondition_failed">"Download interrotto. Impossibile ripristinarlo."</string>
     <string name="activity_instrumentation_test_runner">"Browser Test Runner"</string>
-    <string name="search_google">"Cerca su Google"</string>
     <string name="permlab_readHistoryBookmarks">"lettura cronologia e segnalibri del browser"</string>
     <string name="permdesc_readHistoryBookmarks">"Consente all\'applicazione di leggere tutti gli URL visitati e tutti i segnalibri del browser."</string>
     <string name="permlab_writeHistoryBookmarks">"creazione cronologia e segnalibri del browser"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index a5629c5..be64425 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -66,7 +66,7 @@
     <string name="http">"http://"</string>
     <string name="save_to_bookmarks">"ブックマーク"</string>
     <string name="edit_bookmark">"ブックマークを編集"</string>
-    <string name="create_shortcut_bookmark">"ショートカットを作成"</string>
+    <string name="create_shortcut_bookmark">"ショートカットをホームに追加"</string>
     <string name="open_bookmark">"開く"</string>
     <string name="remove_bookmark">"ブックマークを削除"</string>
     <string name="remove_history_item">"履歴から消去"</string>
@@ -103,7 +103,7 @@
     <string name="contextmenu_savelink">"リンクを保存"</string>
     <string name="contextmenu_sharelink">"リンクを共有"</string>
     <string name="contextmenu_copy">"コピー"</string>
-    <string name="contextmenu_copylink">"URLをコピー"</string>
+    <string name="contextmenu_copylink">"リンクのURLをコピー"</string>
     <string name="contextmenu_download_image">"画像を保存"</string>
     <string name="contextmenu_view_image">"画像を表示"</string>
     <string name="contextmenu_dial_dot">"発信..."</string>
@@ -202,7 +202,7 @@
     <string name="too_many_windows_dialog_title">"ウィンドウの数が最大です"</string>
     <string name="too_many_windows_dialog_message">"既にウィンドウの数が最大なので、新しいウィンドウを開けません。"</string>
     <string name="too_many_subwindows_dialog_title">"ポップアップが既に開いています"</string>
-    <string name="too_many_subwindows_dialog_message">"一度に1つのポップアップウィンドウしか開けません。"</string>
+    <string name="too_many_subwindows_dialog_message">"一度に開けるポップアップウィンドウは1つだけなので、新しいポップアップウィンドウを開けませんでした。"</string>
     <string name="download_title">"ダウンロード履歴"</string>
     <string name="download_unknown_filename">"&lt;不明&gt;"</string>
     <string name="download_menu_open">"開く"</string>
@@ -236,7 +236,6 @@
     <string name="download_length_required">"項目のサイズを特定できないため、ダウンロードできません。"</string>
     <string name="download_precondition_failed">"ダウンロードが中断されました。再開できません。"</string>
     <string name="activity_instrumentation_test_runner">"Browser Test Runner"</string>
-    <string name="search_google">"Google検索"</string>
     <string name="permlab_readHistoryBookmarks">"ブラウザの履歴とブックマークの読み取り"</string>
     <string name="permdesc_readHistoryBookmarks">"ブラウザでアクセスしたすべてのURLとブックマークの読み取りをアプリケーションに許可します。"</string>
     <string name="permlab_writeHistoryBookmarks">"ブラウザの履歴とブックマークの書き込み"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 51a622a..60c1975 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -236,7 +236,6 @@
     <string name="download_length_required">"항목의 크기를 확인할 수 없으므로 다운로드할 수 없습니다."</string>
     <string name="download_precondition_failed">"다운로드 중단됨. 다시 시작할 수 없습니다."</string>
     <string name="activity_instrumentation_test_runner">"브라우저 테스트 실행기"</string>
-    <string name="search_google">"Google 검색"</string>
     <string name="permlab_readHistoryBookmarks">"브라우저의 기록 및 북마크 읽기"</string>
     <string name="permdesc_readHistoryBookmarks">"응용프로그램이 브라우저에서 방문한 모든 URL과 브라우저의 북마크를 모두 읽을 수 있습니다."</string>
     <string name="permlab_writeHistoryBookmarks">"브라우저의 기록 및 북마크 쓰기"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index d1a56fe..ad4fee2 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -27,12 +27,10 @@
     <string name="action">"Logg inn"</string>
     <string name="cancel">"Avbryt"</string>
     <string name="ok">"OK"</string>
-  <plurals name="matches_found">
-    <item quantity="zero">"Ingen treff"</item>
-    <item quantity="one">"Ett treff"</item>
-    <item quantity="few">"<xliff:g id="NUMBER">%d</xliff:g> treff"</item>
-    <item quantity="other">"<xliff:g id="NUMBER">%d</xliff:g> treff"</item>
-  </plurals>
+    <!-- no translation found for matches_found:zero (6242659159545399963) -->
+    <!-- no translation found for matches_found:one (4352019729062956802) -->
+    <!-- no translation found for matches_found:few (5544267486978946555) -->
+    <!-- no translation found for matches_found:other (6616125067364315405) -->
     <string name="page_info">"Sideinformasjon"</string>
     <string name="page_info_view">"Vis sideinformasjon"</string>
     <string name="page_info_address">"Adresse:"</string>
@@ -236,7 +234,6 @@
     <string name="download_length_required">"Kan ikke laste ned. Klarte ikke bestemme størrelsen på filen."</string>
     <string name="download_precondition_failed">"Nedlastingen ble avbrutt. Den kan ikke fortsettes."</string>
     <string name="activity_instrumentation_test_runner">"Browser Test Runner"</string>
-    <string name="search_google">"Søk på Google"</string>
     <string name="permlab_readHistoryBookmarks">"read Browser\'s history and bookmarks"</string>
     <string name="permdesc_readHistoryBookmarks">"Allows the application to read all the URLs that the Browser has visited, and all of the Browser\'s bookmarks."</string>
     <string name="permlab_writeHistoryBookmarks">"write Browser\'s history and bookmarks"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 87fb6f6..5904587 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -236,7 +236,6 @@
     <string name="download_length_required">"Kan niet downloaden. De grootte van het item kan niet worden vastgesteld."</string>
     <string name="download_precondition_failed">"Download is onderbroken. Deze kan niet worden voortgezet."</string>
     <string name="activity_instrumentation_test_runner">"Browser Test Runner"</string>
-    <string name="search_google">"Zoeken met Google"</string>
     <string name="permlab_readHistoryBookmarks">"browsergeschiedenis en bladwijzers lezen"</string>
     <string name="permdesc_readHistoryBookmarks">"Hiermee kan een toepassing de URL\'s lezen die u via de browser heeft bezocht, evenals alle bladwijzers van de browser."</string>
     <string name="permlab_writeHistoryBookmarks">"browsergeschiedenis en bladwijzers schrijven"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index f477763..9b8b29b 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -81,7 +81,7 @@
     <string name="delete_bookmark_warning">"Zakładka „<xliff:g id="BOOKMARK">%s</xliff:g>” zostanie usunięta."</string>
     <string name="open_in_new_window">"Otwórz w nowym oknie"</string>
     <string name="new_window">"Nowe okno"</string>
-    <string name="goto_dot">"Przejdź"</string>
+    <string name="goto_dot">"Idź"</string>
     <string name="find_dot">"Znajdź na stronie"</string>
     <string name="select_dot">"Zaznacz tekst"</string>
     <string name="view_tabs">"Przegląd okien"</string>
@@ -108,7 +108,7 @@
     <string name="contextmenu_view_image">"Wyświetl obraz"</string>
     <string name="contextmenu_dial_dot">"Wybierz numer…"</string>
     <string name="contextmenu_add_contact">"Dodaj kontakt"</string>
-    <string name="contextmenu_send_mail">"Wyślij e-mail"</string>
+    <string name="contextmenu_send_mail">"Wyślij wiadomość e-mail"</string>
     <string name="contextmenu_map">"Mapa"</string>
     <string name="clear">"Wyczyść"</string>
     <string name="replace">"Zastąp adres"</string>
@@ -128,7 +128,7 @@
     <string name="pref_privacy_clear_cache">"Wyczyść pamięć podręczną"</string>
     <string name="pref_privacy_clear_cache_summary">"Usuń całą zawartość stron z pamięci podręcznej"</string>
     <string name="pref_privacy_clear_cache_dlg">"Pamięć podręczna zostanie wyczyszczona."</string>
-    <string name="pref_privacy_clear_cookies">"Wyczyść wszystkie pliki cookie"</string>
+    <string name="pref_privacy_clear_cookies">"Wyczyść wszystkie cookies"</string>
     <string name="pref_privacy_clear_cookies_summary">"Wyczyść pliki cookie przeglądarki"</string>
     <string name="pref_privacy_clear_cookies_dlg">"Wszystkie pliki cookie zostaną usunięte."</string>
     <string name="pref_privacy_clear_history">"Wyczyść historię"</string>
@@ -141,14 +141,14 @@
     <string name="pref_privacy_clear_passwords_summary">"Wyczyść wszystkie zapamiętane hasła"</string>
     <string name="pref_privacy_clear_passwords_dlg">"Wszystkie zapamiętane hasła zostaną wyczyszczone."</string>
     <string name="pref_security_title">"Ustawienia zabezpieczeń"</string>
-    <string name="pref_security_remember_passwords">"Pamiętaj hasła"</string>
+    <string name="pref_security_remember_passwords">"Zapamiętuj hasła"</string>
     <string name="pref_security_remember_passwords_summary">"Zapamiętuj nazwy użytkownika i hasła do stron WWW"</string>
-    <string name="pref_security_save_form_data">"Pamiętaj wpisane dane"</string>
+    <string name="pref_security_save_form_data">"Zapamiętuj wpisane dane"</string>
     <string name="pref_security_save_form_data_summary">"Zapamiętuj do późniejszego użycia dane, które wpisuję w formularzach"</string>
     <string name="pref_security_show_security_warning">"Wyświetlaj ostrzeżenia"</string>
     <string name="pref_security_show_security_warning_summary">"Wyświetl ostrzeżenie w razie problemów z zabezpieczeniami strony"</string>
     <string name="pref_security_accept_cookies">"Akceptuj pliki cookie"</string>
-    <string name="pref_security_accept_cookies_summary">"Zezwalaj witrynom na zapis i odczyt danych w plikach cookie"</string>
+    <string name="pref_security_accept_cookies_summary">"Zezwalaj witrynom na zapis i odczyt danych plików „cookie”."</string>
     <string name="pref_text_size">"Ustaw rozmiar tekstu"</string>
   <string-array name="pref_text_size_choices">
     <item>"Bardzo mały"</item>
@@ -159,9 +159,9 @@
   </string-array>
     <string name="pref_text_size_dialogtitle">"Rozmiar tekstu"</string>
     <string name="pref_extras_title">"Ustawienia zaawansowane"</string>
-    <string name="pref_extras_gears_enable">"Włącz dodatek Gears"</string>
+    <string name="pref_extras_gears_enable">"Włącz technologię Gears"</string>
     <string name="pref_extras_gears_enable_summary">"Aplikacje rozszerzające zakres funkcji przeglądarki"</string>
-    <string name="pref_extras_gears_settings">"Ustawienia dodatku Gears"</string>
+    <string name="pref_extras_gears_settings">"Gears – ustawienia"</string>
     <string name="pref_plugin_installed">"Lista dodatków plug-in"</string>
     <string name="pref_plugin_installed_empty_list">"Brak zainstalowanych dodatków plug-in."</string>
     <string name="pref_extras_gears_settings_summary">"Aplikacje rozszerzające zakres funkcji przeglądarki"</string>
@@ -236,7 +236,6 @@
     <string name="download_length_required">"Pobieranie niemożliwe. Nie można ustalić rozmiaru elementu."</string>
     <string name="download_precondition_failed">"Pobieranie zostało przerwane. Nie można go wznowić."</string>
     <string name="activity_instrumentation_test_runner">"Uruchamianie testów przeglądarki"</string>
-    <string name="search_google">"Szukanie Google"</string>
     <string name="permlab_readHistoryBookmarks">"odczytywanie historii i zakładek przeglądarki"</string>
     <string name="permdesc_readHistoryBookmarks">"Zezwala aplikacji na odczytanie wszystkich adresów URL odwiedzonych przy użyciu przeglądarki oraz wszystkich zakładek przeglądarki."</string>
     <string name="permlab_writeHistoryBookmarks">"zapisać historię i zakładki przeglądarki"</string>
@@ -247,10 +246,10 @@
     <string name="location_message">"Ta witryna internetowa chce uzyskać dostęp do informacji o Twojej lokalizacji."</string>
     <string name="shortcut_prompt">"Utwórz skrót"</string>
     <string name="shortcut_message">"Ta witryna internetowa chce utworzyć skrót do tej strony na Twoim ekranie głównym."</string>
-    <string name="settings_message">"W poniższej tabeli przedstawiono uprawnienia udzielone każdej z witryn próbujących użyć dodatku Gears."</string>
+    <string name="settings_message">"W poniższej tabeli przedstawiono uprawnienia udzielone każdej z witryn próbujących użyć Gears."</string>
     <string name="filepicker_message">"Wybór plików"</string>
     <string name="image_message">"Wybrany obraz"</string>
-    <string name="settings_title">"Ustawienia dodatku Gears"</string>
+    <string name="settings_title">"Gears – ustawienia"</string>
     <string name="privacy_policy">"Przeczytaj zasady zachowania poufności informacji witryny, aby dowiedzieć się, jak będą użyte informacje o twojej lokalizacji."</string>
     <string name="settings_storage_title">"Zezwól na zapis lokalnie"</string>
     <string name="settings_storage_subtitle_on">"Ta witryna może zapisać informacje w telefonie"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 71dbefa..b4aa71b 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -236,7 +236,6 @@
     <string name="download_length_required">"Загрузка невозможна. Не удается определить размер элемента."</string>
     <string name="download_precondition_failed">"Загрузка прервана и не может быть продолжена."</string>
     <string name="activity_instrumentation_test_runner">"Проверка браузера"</string>
-    <string name="search_google">"Поиск в Google"</string>
     <string name="permlab_readHistoryBookmarks">"считывать историю и закладки браузера"</string>
     <string name="permdesc_readHistoryBookmarks">"Позволяет приложению считывать все URL, открытые через браузер, и все закладки браузера."</string>
     <string name="permlab_writeHistoryBookmarks">"записывать историю и закладки браузера"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index d0368bb..2928301 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -15,6 +15,10 @@
 -->
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Do not translate.  This string is an internal URI, not seen in the UI. -->
+    <string name="google_search_base" translatable="false">
+        http://www.google.cn/m?hl=%1$s&amp;gl=%2$s&amp;</string>
+
     <string name="application_name">"浏览器"</string>
     <string name="tab_bookmarks">"书签"</string>
     <string name="tab_most_visited">"访问最多的网站"</string>
@@ -234,7 +238,6 @@
     <string name="download_length_required">"无法下载。无法确定该项的大小。"</string>
     <string name="download_precondition_failed">"下载中断,无法重新开始。"</string>
     <string name="activity_instrumentation_test_runner">"浏览器测试运行器"</string>
-    <string name="search_google">"使用 Google 进行搜索"</string>
     <string name="permlab_readHistoryBookmarks">"读取浏览器的历史记录和书签"</string>
     <string name="permdesc_readHistoryBookmarks">"允许应用程序读取浏览器访问过的所有网址以及浏览器的所有书签。"</string>
     <string name="permlab_writeHistoryBookmarks">"写入浏览器的历史记录和书签"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 95dcec0..b1729d2 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -236,7 +236,6 @@
     <string name="download_length_required">"無法下載。物件大小無法估計。"</string>
     <string name="download_precondition_failed">"下載中斷。無法續傳。"</string>
     <string name="activity_instrumentation_test_runner">"Browser Test Runner"</string>
-    <string name="search_google">"搜尋 Google"</string>
     <string name="permlab_readHistoryBookmarks">"讀取瀏覽器的瀏覽記錄和書籤"</string>
     <string name="permdesc_readHistoryBookmarks">"允許應用程式讀取瀏覽器造訪過的所有 URL 和瀏覽器所有的書籤。"</string>
     <string name="permlab_writeHistoryBookmarks">"寫入瀏覽器的瀏覽記錄和書籤"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 98142ac..253efc1 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -38,6 +38,8 @@
     <string name="password">Password</string>
     <!-- The label on the "sign in" button -->
     <string name="action">Sign in</string>
+    <!-- The name of the bookmarks and history search suggestion source.  -->
+    <string name="bookmarks_search">Browser</string>
 
     <!-- Label for a cancel button.  It is used for multiple cancel buttons in different contexts -->
     <string name="cancel">Cancel</string>
@@ -582,6 +584,11 @@
     <!-- Do not translate.  Testing only -->
     <string name="dump_nav" translatable="false">Dump navigation cache</string>
 
+    <!-- The default homepage. If it starts with "http://www.google" and the
+            user signs up the device with a Google sites account, the site's
+            domain will be appended. -->
+    <string name="homepage_base">http://www.google.com/m?client=ms-{CID}</string>
+
     <!-- Bookmarks -->
     <string-array name="bookmarks" translatable="false">
         <item>Google</item>
@@ -625,10 +632,11 @@
     <!-- Do not translate.  This string is an internal URI, not seen in the UI. -->
     <string name="google_search_base" translatable="false">
         http://www.google.com/m?hl=%1$s&amp;gl=%2$s&amp;</string>
-
-    <!-- Used in Goto to indicate Google search -->
-    <string name="search_google">Search Google</string>
-
+    
+    <!-- The description of the suggestion that lets the user search the web for the query currently
+         in the text field. -->
+    <string name="search_the_web">Search the web</string>
+    
     <!-- Title of an application permission, listed so the user can choose whether 
         they want to allow the application to do this. -->
     <string name="permlab_readHistoryBookmarks">read Browser\'s history and bookmarks</string>
diff --git a/res/xml/bookmarks_searchable.xml b/res/xml/bookmarks_searchable.xml
new file mode 100644
index 0000000..bc6ac93
--- /dev/null
+++ b/res/xml/bookmarks_searchable.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<searchable xmlns:android="http://schemas.android.com/apk/res/android"
+    android:label="@string/bookmarks_search"
+    android:searchButtonText="@string/search_button_text"
+    android:searchMode="queryRewriteFromData"
+    android:inputType="textUri"
+    android:imeOptions="actionGo"
+
+    android:includeInGlobalSearch="true"
+    android:searchSuggestAuthority="browser"
+    android:searchSuggestPath="bookmarks"
+    android:searchSuggestSelection="url LIKE ?"
+    android:searchSuggestIntentAction="android.intent.action.VIEW"
+/>
diff --git a/src/com/android/browser/BookmarkSearch.java b/src/com/android/browser/BookmarkSearch.java
new file mode 100644
index 0000000..4d3ca0f
--- /dev/null
+++ b/src/com/android/browser/BookmarkSearch.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.browser;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+
+/**
+ * This activity is never started from the browser. Its purpose is to provide bookmark suggestions
+ * to global search (through its searchable meta-data), and to handle the intents produced
+ * by clicking such suggestions.
+ */
+public class BookmarkSearch extends Activity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        Intent intent = getIntent();
+        if (intent != null) {
+            String action = intent.getAction();
+            if (Intent.ACTION_VIEW.equals(action)) {
+                intent.setClass(this, BrowserActivity.class);
+                startActivity(intent);
+            }
+        }
+        finish();
+    }
+
+}
diff --git a/src/com/android/browser/Browser.java b/src/com/android/browser/Browser.java
index 32cee67..524f789 100644
--- a/src/com/android/browser/Browser.java
+++ b/src/com/android/browser/Browser.java
@@ -16,7 +16,6 @@
 
 package com.android.browser;
 
-import android.util.Config;
 import android.util.Log;
 
 import android.app.Application;
@@ -30,6 +29,15 @@
 
     private final static String LOGTAG = "browser";
 
+    // Set to true to enable extra debugging.
+    final static boolean DEBUG = false;
+    
+    // Set to true to enable verbose logging.
+    final static boolean LOGV_ENABLED = DEBUG;
+
+    // Set to true to enable extra debug logging.
+    final static boolean LOGD_ENABLED = true;
+
     /**
      * Specifies a heap utilization ratio that works better
      * for the browser than the default ratio does.
@@ -40,7 +48,7 @@
     }
 
     public void onCreate() {
-        if (Config.LOGV)
+        if (LOGV_ENABLED)
             Log.v(LOGTAG, "Browser.onCreate: this=" + this);
         // Fix heap utilization for better heap size characteristics.
         VMRuntime.getRuntime().setTargetHeapUtilization(
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 47f12e3..3252da3 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -86,7 +86,6 @@
 import android.text.TextUtils;
 import android.text.format.DateFormat;
 import android.text.util.Regex;
-import android.util.Config;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.Gravity;
@@ -151,11 +150,25 @@
         View.OnCreateContextMenuListener,
         DownloadListener {
 
+    /* Define some aliases to make these debugging flags easier to refer to.
+     * This file imports android.provider.Browser, so we can't just refer to "Browser.DEBUG".
+     */
+    private final static boolean DEBUG = com.android.browser.Browser.DEBUG;
+    private final static boolean LOGV_ENABLED = com.android.browser.Browser.LOGV_ENABLED;
+    private final static boolean LOGD_ENABLED = com.android.browser.Browser.LOGD_ENABLED;
+
     private IGoogleLoginService mGls = null;
     private ServiceConnection mGlsConnection = null;
 
     private SensorManager mSensorManager = null;
 
+    // These are single-character shortcuts for searching popular sources.
+    private static final int SHORTCUT_INVALID = 0;
+    private static final int SHORTCUT_GOOGLE_SEARCH = 1;
+    private static final int SHORTCUT_WIKIPEDIA_SEARCH = 2;
+    private static final int SHORTCUT_DICTIONARY_SEARCH = 3;
+    private static final int SHORTCUT_GOOGLE_MOBILE_LOCAL_SEARCH = 4;
+
     /* Whitelisted webpages
     private static HashSet<String> sWhiteList;
 
@@ -184,6 +197,9 @@
                 try {
                     if (mGls == null) return;
 
+                    if (!homepage.startsWith("http://www.google.")) return;
+                    if (homepage.indexOf('?') == -1) return;
+
                     String hostedUser = mGls.getAccount(GoogleLoginServiceConstants.PREFER_HOSTED);
                     String googleUser = mGls.getAccount(GoogleLoginServiceConstants.REQUIRE_GOOGLE);
 
@@ -203,8 +219,7 @@
 
                     if (googleUser == null || !hostedUser.equals(googleUser)) {
                         String domain = hostedUser.substring(hostedUser.lastIndexOf('@')+1);
-                        homepage = "http://www.google.com/m/a/" + domain + "?client=ms-" +
-                            Partner.getString(BrowserActivity.this.getContentResolver(), Partner.CLIENT_ID);
+                        homepage = homepage.replace("?", "/a/" + domain + "?");
                     }
                 } catch (RemoteException ignore) {
                     // Login service died; carry on
@@ -373,7 +388,7 @@
                 s.loadFromDb(mContext);
                 pluginsPath = s.getPluginsPath();
             }
-            if (Config.LOGV) {
+            if (LOGV_ENABLED) {
                 Log.v(TAG, "Plugin path: " + pluginsPath);
             }
         }
@@ -400,7 +415,7 @@
          * We delete the directory, then recreate it.
          */
         public void cleanPluginsDirectory() {
-          if (Config.LOGV) {
+          if (LOGV_ENABLED) {
             Log.v(TAG, "delete plugins directory: " + pluginsPath);
           }
           File pluginsDirectory = new File(pluginsPath);
@@ -416,7 +431,7 @@
          */
         public void copyBuildInfos() {
           try {
-            if (Config.LOGV) {
+            if (LOGV_ENABLED) {
               Log.v(TAG, "Copy build infos to the plugins directory");
             }
             File buildInfoFile = new File(SYSTEM_BUILD_INFOS_FILE);
@@ -448,7 +463,7 @@
             File buildInfoFile = new File(SYSTEM_BUILD_INFOS_FILE);
             File buildInfoPlugins = new File(pluginsPath, BUILD_INFOS_FILE);
             if (!buildInfoPlugins.exists()) {
-              if (Config.LOGV) {
+              if (LOGV_ENABLED) {
                 Log.v(TAG, "build.prop in plugins directory " + pluginsPath
                   + " does not exist, therefore it's a new system image");
               }
@@ -458,7 +473,7 @@
               String buildInfoPlugin = contentsOfFile(buildInfoPlugins);
               if (buildInfo == null || buildInfoPlugin == null
                   || buildInfo.compareTo(buildInfoPlugin) != 0) {
-                if (Config.LOGV) {
+                if (LOGV_ENABLED) {
                   Log.v(TAG, "build.prop are different, "
                     + " therefore it's a new system image");
                 }
@@ -491,7 +506,7 @@
               String path = entry.getName().substring(zipFilterLength);
               File outputFile = new File(pluginsPath, path);
               if (!outputFile.exists()) {
-                if (Config.LOGV) {
+                if (LOGV_ENABLED) {
                   Log.v(TAG, "checkIsDifferentVersions(): extracted file "
                     + path + " does not exist, we have a different version");
                 }
@@ -536,7 +551,7 @@
                     outputFile.getParentFile().mkdirs();
 
                     if (outputFile.exists() && !mDoOverwrite) {
-                        if (Config.LOGV) {
+                        if (LOGV_ENABLED) {
                             Log.v(TAG, path + " already extracted.");
                         }
                     } else {
@@ -548,7 +563,7 @@
                                 path + TEMPORARY_EXTENSION);
                         }
                         FileOutputStream fos = new FileOutputStream(outputFile);
-                        if (Config.LOGV) {
+                        if (LOGV_ENABLED) {
                             Log.v(TAG, "copy " + entry + " to "
                                 + pluginsPath + "/" + path);
                         }
@@ -563,7 +578,7 @@
                     File renamedFile = (File) elems.nextElement();
                     File sourceFile = new File(renamedFile.getPath()
                         + TEMPORARY_EXTENSION);
-                    if (Config.LOGV) {
+                    if (LOGV_ENABLED) {
                         Log.v(TAG, "rename " + sourceFile.getPath()
                             + " to " + renamedFile.getPath());
                     }
@@ -623,7 +638,7 @@
     }
 
     @Override public void onCreate(Bundle icicle) {
-        if (Config.LOGV) {
+        if (LOGV_ENABLED) {
             Log.v(LOGTAG, this + " onStart");
         }
         super.onCreate(icicle);
@@ -676,6 +691,12 @@
         PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
         mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Browser");
 
+        // If this was a web search request, pass it on to the default web search provider.
+        if (handleWebSearchIntent(getIntent())) {
+            moveTaskToBack(true);
+            return;
+        }
+
         if (!mTabControl.restoreState(icicle)) {
             // clear up the thumbnail directory if we can't restore the state as
             // none of the files in the directory are referenced any more.
@@ -774,6 +795,12 @@
                 || Intent.ACTION_SEARCH.equals(action)
                 || MediaStore.INTENT_ACTION_MEDIA_SEARCH.equals(action)
                 || Intent.ACTION_WEB_SEARCH.equals(action)) {
+            // If this was a search request (e.g. search query directly typed into the address bar),
+            // pass it on to the default web search provider.
+            if (handleWebSearchIntent(intent)) {
+                return;
+            }
+
             String url = getUrlFromIntent(intent);
             if (url == null || url.length() == 0) {
                 url = mSettings.getHomePage();
@@ -837,6 +864,72 @@
         }
     }
 
+    private int parseUrlShortcut(String url) {
+        if (url == null) return SHORTCUT_INVALID;
+
+        // FIXME: quick search, need to be customized by setting
+        if (url.length() > 2 && url.charAt(1) == ' ') {
+            switch (url.charAt(0)) {
+            case 'g': return SHORTCUT_GOOGLE_SEARCH;
+            case 'w': return SHORTCUT_WIKIPEDIA_SEARCH;
+            case 'd': return SHORTCUT_DICTIONARY_SEARCH;
+            case 'l': return SHORTCUT_GOOGLE_MOBILE_LOCAL_SEARCH;
+            }
+        }
+        return SHORTCUT_INVALID;
+    }
+
+    /**
+     * Launches the default web search activity with the query parameters if the given intent's data
+     * are identified as plain search terms and not URLs/shortcuts.
+     * @return true if the intent was handled and web search activity was launched, false if not.
+     */
+    private boolean handleWebSearchIntent(Intent intent) {
+        if (intent == null) return false;
+
+        String url = null;
+        final String action = intent.getAction();
+        if (Intent.ACTION_VIEW.equals(action)) {
+            url = intent.getData().toString();
+        } else if (Intent.ACTION_SEARCH.equals(action)
+                || MediaStore.INTENT_ACTION_MEDIA_SEARCH.equals(action)
+                || Intent.ACTION_WEB_SEARCH.equals(action)) {
+            url = intent.getStringExtra(SearchManager.QUERY);
+        }
+        return handleWebSearchRequest(url);
+    }
+
+    /**
+     * Launches the default web search activity with the query parameters if the given url string
+     * was identified as plain search terms and not URL/shortcut.
+     * @return true if the request was handled and web search activity was launched, false if not.
+     */
+    private boolean handleWebSearchRequest(String inUrl) {
+        if (inUrl == null) return false;
+
+        // In general, we shouldn't modify URL from Intent.
+        // But currently, we get the user-typed URL from search box as well.
+        String url = fixUrl(inUrl).trim();
+
+        // URLs and site specific search shortcuts are handled by the regular flow of control, so
+        // return early.
+        if (Regex.WEB_URL_PATTERN.matcher(url).matches()
+                || ACCEPTED_URI_SCHEMA.matcher(url).matches()
+                || parseUrlShortcut(url) != SHORTCUT_INVALID) {
+            return false;
+        }
+
+        Browser.updateVisitedHistory(mResolver, url, false);
+        Browser.addSearchUrl(mResolver, url);
+
+        Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
+        intent.addCategory(Intent.CATEGORY_DEFAULT);
+        intent.putExtra(SearchManager.QUERY, url);
+        startActivity(intent);
+
+        return true;
+    }
+
     private String getUrlFromIntent(Intent intent) {
         String url = null;
         if (intent != null) {
@@ -990,7 +1083,7 @@
 
     @Override protected void onResume() {
         super.onResume();
-        if (Config.LOGV) {
+        if (LOGV_ENABLED) {
             Log.v(LOGTAG, "BrowserActivity.onResume: this=" + this);
         }
 
@@ -1037,7 +1130,7 @@
      *  the saved state.
      */
     @Override protected void onSaveInstanceState(Bundle outState) {
-        if (Config.LOGV) {
+        if (LOGV_ENABLED) {
             Log.v(LOGTAG, "BrowserActivity.onSaveInstanceState: this=" + this);
         }
         // the default implementation requires each view to have an id. As the
@@ -1083,7 +1176,7 @@
     }
 
     @Override protected void onDestroy() {
-        if (Config.LOGV) {
+        if (LOGV_ENABLED) {
             Log.v(LOGTAG, "BrowserActivity.onDestroy: this=" + this);
         }
         super.onDestroy();
@@ -1294,6 +1387,9 @@
         mCanChord = true;
         int id = item.getItemId();
         final WebView webView = getTopWindow();
+        if (null == webView) {
+            return false;
+        }
         final HashMap hrefMap = new HashMap();
         hrefMap.put("webview", webView);
         final Message msg = mHandler.obtainMessage(
@@ -1349,6 +1445,9 @@
             // menu key.
             return false;
         }
+        if (null == mTabOverview && null == getTopWindow()) {
+            return false;
+        }
         switch (item.getItemId()) {
             // -- Main menu
             case R.id.goto_menu_id: {
@@ -2126,6 +2225,9 @@
                     .setVisibility(View.VISIBLE);
         }
         mContentView.removeView(mTabOverview);
+        // Clear all the data for tab picker so next time it will be
+        // recreated.
+        mTabControl.wipeAllPickerData();
         mTabOverview.clear();
         mTabOverview = null;
         mTabListener = null;
@@ -2346,7 +2448,7 @@
     private void revertLockIcon() {
         mLockIconType = mPrevLockType;
 
-        if (Config.LOGV) {
+        if (LOGV_ENABLED) {
             Log.v(LOGTAG, "BrowserActivity.revertLockIcon:" +
                   " revert lock icon to " + mLockIconType);
         }
@@ -2741,7 +2843,7 @@
                     String uiInfo = "UI thread used "
                             + (SystemClock.currentThreadTimeMillis() - mUiStart)
                             + " ms";
-                    if (Config.LOGD) {
+                    if (LOGD_ENABLED) {
                         Log.d(LOGTAG, uiInfo);
                     }
                     //The string that gets written to the log
@@ -2758,7 +2860,7 @@
                             + " ms and irq took "
                             + (sysCpu[4] + sysCpu[5] + sysCpu[6] - mIrqStart)
                             * 10 + " ms, " + uiInfo;
-                    if (Config.LOGD) {
+                    if (LOGD_ENABLED) {
                         Log.d(LOGTAG, performanceString + "\nWebpage: " + url);
                     }
                     if (url != null) {
@@ -2773,7 +2875,7 @@
                         } else if (newUrl.startsWith("https://")) {
                             newUrl = newUrl.substring(8);
                         }
-                        if (Config.LOGD) {
+                        if (LOGD_ENABLED) {
                             Log.d(LOGTAG, newUrl + " loaded");
                         }
                         /*
@@ -2905,7 +3007,7 @@
                     // If NOT a 'safe' url, change the lock to mixed content!
                     if (!(URLUtil.isHttpsUrl(url) || URLUtil.isDataUrl(url) || URLUtil.isAboutUrl(url))) {
                         mLockIconType = LOCK_ICON_MIXED;
-                        if (Config.LOGV) {
+                        if (LOGV_ENABLED) {
                             Log.v(LOGTAG, "BrowserActivity.updateLockIcon:" +
                                   " updated lock icon to " + mLockIconType + " due to " + url);
                         }
@@ -3365,7 +3467,7 @@
 
         @Override
         public void onReceivedTitle(WebView view, String title) {
-            String url = view.getOriginalUrl();
+            String url = view.getUrl();
 
             // here, if url is null, we want to reset the title
             setUrlTitle(url, title);
@@ -3388,7 +3490,7 @@
                 Cursor c = mResolver.query(Browser.BOOKMARKS_URI,
                     Browser.HISTORY_PROJECTION, where, selArgs, null);
                 if (c.moveToFirst()) {
-                    if (Config.LOGV) {
+                    if (LOGV_ENABLED) {
                         Log.v(LOGTAG, "updating cursor");
                     }
                     // Current implementation of database only has one entry per
@@ -3438,7 +3540,7 @@
                     startActivity(intent);
                     return;
                 } catch (ActivityNotFoundException ex) {
-                    if (Config.LOGD) {
+                    if (LOGD_ENABLED) {
                         Log.d(LOGTAG, "activity not found for " + mimetype
                                 + " over " + Uri.parse(url).getScheme(), ex);
                     }
@@ -3562,7 +3664,7 @@
         mLockIconType = LOCK_ICON_UNSECURE;
         if (URLUtil.isHttpsUrl(url)) {
             mLockIconType = LOCK_ICON_SECURE;
-            if (Config.LOGV) {
+            if (LOGV_ENABLED) {
                 Log.v(LOGTAG, "BrowserActivity.resetLockIcon:" +
                       " reset lock icon to " + mLockIconType);
             }
@@ -3582,7 +3684,7 @@
 
         mLockIconType = LOCK_ICON_UNSECURE;
 
-        if (Config.LOGV) {
+        if (LOGV_ENABLED) {
           Log.v(LOGTAG, "BrowserActivity.resetLockIcon:" +
                 " reset lock icon to " + mLockIconType);
         }
@@ -4140,7 +4242,7 @@
     private class TabListener implements ImageGrid.Listener {
         public void remove(int position) {
             // Note: Remove is not enabled if we have only one tab.
-            if (Config.DEBUG && mTabControl.getTabCount() == 1) {
+            if (DEBUG && mTabControl.getTabCount() == 1) {
                 throw new AssertionError();
             }
 
@@ -4188,10 +4290,6 @@
                 }
             }
 
-            // Clear all the data for tab picker so next time it will be
-            // recreated.
-            mTabControl.wipeAllPickerData();
-
             // NEW_TAB means that the "New Tab" cell was clicked on.
             if (index == ImageGrid.NEW_TAB) {
                 openTabAndShow(mSettings.getHomePage(), null, false, null);
@@ -4409,46 +4507,34 @@
 
         Matcher matcher = ACCEPTED_URI_SCHEMA.matcher(inUrl);
         if (matcher.matches()) {
-            if (hasSpace) {
-                inUrl = inUrl.replace(" ", "%20");
-            }
             // force scheme to lowercase
             String scheme = matcher.group(1);
             String lcScheme = scheme.toLowerCase();
             if (!lcScheme.equals(scheme)) {
-                return lcScheme + matcher.group(2);
+                inUrl = lcScheme + matcher.group(2);
+            }
+            if (hasSpace) {
+                inUrl = inUrl.replace(" ", "%20");
             }
             return inUrl;
         }
         if (hasSpace) {
-            // FIXME: quick search, need to be customized by setting
-            if (inUrl.length() > 2 && inUrl.charAt(1) == ' ') {
-                // FIXME: Is this the correct place to add to searches?
-                // what if someone else calls this function?
-                char char0 = inUrl.charAt(0);
-
-                if (char0 == 'g') {
-                    Browser.addSearchUrl(mResolver, inUrl);
-                    return composeSearchUrl(inUrl.substring(2));
-
-                } else if (char0 == 'w') {
-                    Browser.addSearchUrl(mResolver, inUrl);
-                    return URLUtil.composeSearchUrl(inUrl.substring(2),
-                            QuickSearch_W,
-                            QUERY_PLACE_HOLDER);
-
-                } else if (char0 == 'd') {
-                    Browser.addSearchUrl(mResolver, inUrl);
-                    return URLUtil.composeSearchUrl(inUrl.substring(2),
-                            QuickSearch_D,
-                            QUERY_PLACE_HOLDER);
-
-                } else if (char0 == 'l') {
-                    Browser.addSearchUrl(mResolver, inUrl);
+            // FIXME: Is this the correct place to add to searches?
+            // what if someone else calls this function?
+            int shortcut = parseUrlShortcut(inUrl);
+            if (shortcut != SHORTCUT_INVALID) {
+                Browser.addSearchUrl(mResolver, inUrl);
+                String query = inUrl.substring(2);
+                switch (shortcut) {
+                case SHORTCUT_GOOGLE_SEARCH:
+                    return composeSearchUrl(query);
+                case SHORTCUT_WIKIPEDIA_SEARCH:
+                    return URLUtil.composeSearchUrl(query, QuickSearch_W, QUERY_PLACE_HOLDER);
+                case SHORTCUT_DICTIONARY_SEARCH:
+                    return URLUtil.composeSearchUrl(query, QuickSearch_D, QUERY_PLACE_HOLDER);
+                case SHORTCUT_GOOGLE_MOBILE_LOCAL_SEARCH:
                     // FIXME: we need location in this case
-                    return URLUtil.composeSearchUrl(inUrl.substring(2),
-                            QuickSearch_L,
-                            QUERY_PLACE_HOLDER);
+                    return URLUtil.composeSearchUrl(query, QuickSearch_L, QUERY_PLACE_HOLDER);
                 }
             }
         } else {
@@ -4482,9 +4568,26 @@
              * mcc-specific xml files.)
              */
             Locale l = Locale.getDefault();
+            String language = l.getLanguage();
+            String country = l.getCountry().toLowerCase();
+            // Chinese and Portuguese have two langauge variants.
+            if ("zh".equals(language)) {
+                if ("cn".equals(country)) {
+                    language = "zh-CN";
+                } else if ("tw".equals(country)) {
+                    language = "zh-TW";
+                }
+            } else if ("pt".equals(language)) {
+                if ("br".equals(country)) {
+                    language = "pt-BR";
+                } else if ("pt".equals(country)) {
+                    language = "pt-PT";
+                }
+            }
             QuickSearch_G = getResources().getString(
-                    R.string.google_search_base, l.getLanguage(),
-                    l.getCountry().toLowerCase())
+                    R.string.google_search_base,
+                    language,
+                    country)
                     + "client=ms-"
                     + Partner.getString(this.getContentResolver(), Partner.CLIENT_ID)
                     + "&source=android-" + GOOGLE_SEARCH_SOURCE_SUGGEST + "&q=%s";
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java
index 42e22a5..d2f4a0a 100644
--- a/src/com/android/browser/BrowserProvider.java
+++ b/src/com/android/browser/BrowserProvider.java
@@ -17,33 +17,35 @@
 package com.android.browser;
 
 import com.google.android.providers.GoogleSettings.Partner;
-import java.util.Date;
 
-import android.app.ISearchManager;
 import android.app.SearchManager;
 import android.content.ComponentName;
 import android.content.ContentProvider;
 import android.content.ContentUris;
-import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.content.UriMatcher;
 import android.content.SharedPreferences.Editor;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
 import android.database.AbstractCursor;
 import android.database.Cursor;
-import android.database.sqlite.SQLiteOpenHelper;
 import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
 import android.net.Uri;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.SystemProperties;
 import android.preference.PreferenceManager;
 import android.provider.Browser;
-import android.util.Log;
 import android.server.search.SearchableInfo;
+import android.text.TextUtils;
 import android.text.util.Regex;
+import android.util.Log;
+import android.util.TypedValue;
+
+import java.util.Date;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 
 public class BrowserProvider extends ContentProvider {
@@ -62,7 +64,7 @@
     private static final String[] SUGGEST_PROJECTION = new String[] {
             "_id", "url", "title", "bookmark"
     };
-    private static final String SUGGEST_SELECTION = 
+    private static final String SUGGEST_SELECTION =
             "url LIKE ? OR url LIKE ? OR url LIKE ? OR url LIKE ?";
     private String[] SUGGEST_ARGS = new String[4];
 
@@ -74,6 +76,7 @@
     private static final int SUGGEST_COLUMN_ICON_1_ID = 5;
     private static final int SUGGEST_COLUMN_ICON_2_ID = 6;
     private static final int SUGGEST_COLUMN_QUERY_ID = 7;
+    private static final int SUGGEST_COLUMN_FORMAT = 8;
 
     // shared suggestion columns
     private static final String[] COLUMNS = new String[] {
@@ -84,7 +87,8 @@
             SearchManager.SUGGEST_COLUMN_TEXT_2,
             SearchManager.SUGGEST_COLUMN_ICON_1,
             SearchManager.SUGGEST_COLUMN_ICON_2,
-            SearchManager.SUGGEST_COLUMN_QUERY};
+            SearchManager.SUGGEST_COLUMN_QUERY,
+            SearchManager.SUGGEST_COLUMN_FORMAT};
 
     private static final int MAX_SUGGESTION_SHORT_ENTRIES = 3;
     private static final int MAX_SUGGESTION_LONG_ENTRIES = 6;
@@ -97,6 +101,7 @@
     private static final int URI_MATCH_SEARCHES_ID = 11;
     //
     private static final int URI_MATCH_SUGGEST = 20;
+    private static final int URI_MATCH_BOOKMARKS_SUGGEST = 21;
 
     private static final UriMatcher URI_MATCHER;
 
@@ -112,6 +117,9 @@
                 URI_MATCH_SEARCHES_ID);
         URI_MATCHER.addURI("browser", SearchManager.SUGGEST_URI_PATH_QUERY,
                 URI_MATCH_SUGGEST);
+        URI_MATCHER.addURI("browser",
+                TABLE_NAMES[URI_MATCH_BOOKMARKS] + "/" + SearchManager.SUGGEST_URI_PATH_QUERY,
+                URI_MATCH_BOOKMARKS_SUGGEST);
     }
 
     // 1 -> 2 add cache table
@@ -133,14 +141,23 @@
     // 18 -> 19 Remove labels table
     private static final int DATABASE_VERSION = 19;
 
+    // Regular expression which matches http://, followed by some stuff, followed by
+    // optionally a trailing slash, all matched as separate groups.
+    private static final Pattern STRIP_URL_PATTERN = Pattern.compile("^(http://)(.*?)(/$)?");
+
+    // The hex color string to be applied to urls of website suggestions, as derived from
+    // the current theme. This is not set until/unless beautifyUrl is called, at which point
+    // this variable caches the color value.
+    private static String mSearchUrlColorHex;
+
     public BrowserProvider() {
     }
-  
+
 
     private static CharSequence replaceSystemPropertyInString(Context context, CharSequence srcString) {
         StringBuffer sb = new StringBuffer();
         int lastCharLoc = 0;
-        
+
         final String client_id = Partner.getString(context.getContentResolver(), Partner.CLIENT_ID);
 
         for (int i = 0; i < srcString.length(); ++i) {
@@ -202,7 +219,7 @@
                     CharSequence bookmarkDestination = replaceSystemPropertyInString(mContext, bookmarks[i + 1]);
                     db.execSQL("INSERT INTO bookmarks (title, url, visits, " +
                             "date, created, bookmark)" + " VALUES('" +
-                            bookmarks[i] + "', '" + bookmarkDestination + 
+                            bookmarks[i] + "', '" + bookmarkDestination +
                             "', 0, 0, 0, 1);");
                 }
             } catch (ArrayIndexOutOfBoundsException e) {
@@ -233,7 +250,7 @@
     public boolean onCreate() {
         final Context context = getContext();
         mOpenHelper = new DatabaseHelper(context);
-        // we added "picasa web album" into default bookmarks for version 19. 
+        // we added "picasa web album" into default bookmarks for version 19.
         // To avoid erasing the bookmark table, we added it explicitly for
         // version 18 and 19 as in the other cases, we will erase the table.
         if (DATABASE_VERSION == 18 || DATABASE_VERSION == 19) {
@@ -274,9 +291,9 @@
      * Subclass AbstractCursor so we can combine multiple Cursors and add
      * "Google Search".
      * Here are the rules.
-     * 1. We only have MAX_SUGGESTION_LONG_ENTRIES in the list plus 
+     * 1. We only have MAX_SUGGESTION_LONG_ENTRIES in the list plus
      *      "Google Search";
-     * 2. If bookmark/history entries are less than 
+     * 2. If bookmark/history entries are less than
      *      (MAX_SUGGESTION_SHORT_ENTRIES -1), we include Google suggest.
      */
     private class MySuggestionCursor extends AbstractCursor {
@@ -286,6 +303,9 @@
         private int     mSuggestionCount;
         private boolean mBeyondCursor;
         private String  mString;
+        private int     mSuggestText1Id;
+        private int     mSuggestText2Id;
+        private int     mSuggestQueryId;
 
         public MySuggestionCursor(Cursor hc, Cursor sc, String string) {
             mHistoryCursor = hc;
@@ -297,6 +317,22 @@
             }
             mString = string;
             mBeyondCursor = false;
+
+            // Some web suggest providers only give suggestions and have no description string for
+            // items. The order of the result columns may be different as well. So retrieve the
+            // column indices for the fields we need now and check before using below.
+            if (mSuggestCursor == null) {
+                mSuggestText1Id = -1;
+                mSuggestText2Id = -1;
+                mSuggestQueryId = -1;
+            } else {
+                mSuggestText1Id = mSuggestCursor.getColumnIndex(
+                                SearchManager.SUGGEST_COLUMN_TEXT_1);
+                mSuggestText2Id = mSuggestCursor.getColumnIndex(
+                                SearchManager.SUGGEST_COLUMN_TEXT_2);
+                mSuggestQueryId = mSuggestCursor.getColumnIndex(
+                                SearchManager.SUGGEST_COLUMN_QUERY);
+            }
         }
 
         @Override
@@ -350,20 +386,22 @@
 
                     case SUGGEST_COLUMN_TEXT_1_ID:
                         if (mHistoryCount > mPos) {
-                            return mHistoryCursor.getString(1);
+                            return getHistoryTitle();
                         } else if (!mBeyondCursor) {
-                            return mSuggestCursor.getString(1);
+                            if (mSuggestText1Id == -1) return null;
+                            return mSuggestCursor.getString(mSuggestText1Id);
                         } else {
                             return mString;
                         }
 
                     case SUGGEST_COLUMN_TEXT_2_ID:
                         if (mHistoryCount > mPos) {
-                            return mHistoryCursor.getString(2);
+                            return getHistorySubtitle();
                         } else if (!mBeyondCursor) {
-                            return mSuggestCursor.getString(2);
+                            if (mSuggestText2Id == -1) return null;
+                            return mSuggestCursor.getString(mSuggestText2Id);
                         } else {
-                            return getContext().getString(R.string.search_google);
+                            return getContext().getString(R.string.search_the_web);
                         }
 
                     case SUGGEST_COLUMN_ICON_1_ID:
@@ -390,10 +428,14 @@
                         if (mHistoryCount > mPos) {
                             return null;
                         } else if (!mBeyondCursor) {
-                            return mSuggestCursor.getString(3);
+                            if (mSuggestQueryId == -1) return null;
+                            return mSuggestCursor.getString(mSuggestQueryId);
                         } else {
                             return mString;
                         }
+
+                    case SUGGEST_COLUMN_FORMAT:
+                        return "html";
                 }
             }
             return null;
@@ -460,11 +502,61 @@
                 mSuggestCursor = null;
             }
         }
+
+        /**
+         * Provides the title (text line 1) for a browser suggestion, which should be the
+         * webpage title. If the webpage title is empty, returns the stripped url instead.
+         *
+         * @return the title string to use
+         */
+        private String getHistoryTitle() {
+            String title = mHistoryCursor.getString(2 /* webpage title */);
+            if (TextUtils.isEmpty(title) || TextUtils.getTrimmedLength(title) == 0) {
+                title = beautifyUrl(mHistoryCursor.getString(1 /* url */));
+            }
+            return title;
+        }
+
+        /**
+         * Provides the subtitle (text line 2) for a browser suggestion, which should be the
+         * webpage url. If the webpage title is empty, then the url should go in the title
+         * instead, and the subtitle should be empty, so this would return null.
+         *
+         * @return the subtitle string to use, or null if none
+         */
+        private String getHistorySubtitle() {
+            String title = mHistoryCursor.getString(2 /* webpage title */);
+            if (TextUtils.isEmpty(title) || TextUtils.getTrimmedLength(title) == 0) {
+                return null;
+            } else {
+                return beautifyUrl(mHistoryCursor.getString(1 /* url */));
+            }
+        }
+
+        /**
+         * Strips "http://" from the beginning of a url and "/" from the end,
+         * and adds html formatting to make it green.
+         */
+        private String beautifyUrl(String url) {
+            if (mSearchUrlColorHex == null) {
+                // Get the color used for this purpose from the current theme.
+                TypedValue colorValue = new TypedValue();
+                getContext().getTheme().resolveAttribute(
+                        com.android.internal.R.attr.textColorSearchUrl, colorValue, true);
+                int color = getContext().getResources().getColor(colorValue.resourceId);
+
+                // Convert the int color value into a hex string, and strip the first two
+                // characters which will be the alpha transparency (html doesn't want this).
+                mSearchUrlColorHex = Integer.toHexString(color).substring(2);
+            }
+
+            return "<font color=\"#" + mSearchUrlColorHex + "\">" + stripUrl(url) + "</font>";
+        }
     }
 
     @Override
     public Cursor query(Uri url, String[] projectionIn, String selection,
-            String[] selectionArgs, String sortOrder) 
+            String[] selectionArgs, String sortOrder)
             throws IllegalStateException {
         SQLiteDatabase db = mOpenHelper.getReadableDatabase();
 
@@ -473,7 +565,7 @@
             throw new IllegalArgumentException("Unknown URL");
         }
 
-        if (match == URI_MATCH_SUGGEST) {
+        if (match == URI_MATCH_SUGGEST || match == URI_MATCH_BOOKMARKS_SUGGEST) {
             String suggestSelection;
             String [] myArgs;
             if (selectionArgs[0] == null || selectionArgs[0].equals("")) {
@@ -500,48 +592,26 @@
                     ORDER_BY,
                     (new Integer(MAX_SUGGESTION_LONG_ENTRIES)).toString());
 
-            if (Regex.WEB_URL_PATTERN.matcher(selectionArgs[0]).matches()) {
+            if (match == URI_MATCH_BOOKMARKS_SUGGEST
+                    || Regex.WEB_URL_PATTERN.matcher(selectionArgs[0]).matches()) {
                 return new MySuggestionCursor(c, null, "");
             } else {
                 // get Google suggest if there is still space in the list
                 if (myArgs != null && myArgs.length > 1
                         && c.getCount() < (MAX_SUGGESTION_SHORT_ENTRIES - 1)) {
-                    ISearchManager sm = ISearchManager.Stub
-                            .asInterface(ServiceManager
-                                    .getService(Context.SEARCH_SERVICE));
-                    SearchableInfo si = null;
-                    try {
-                        // use the global search to get Google suggest provider
-                        si = sm.getSearchableInfo(new ComponentName(
-                                getContext(), "com.android.browser"), true);
-
-                        // similar to the getSuggestions() in SearchDialog.java
-                        StringBuilder uriStr = new StringBuilder("content://");
-                        uriStr.append(si.getSuggestAuthority());
-                        // if content path provided, insert it now
-                        final String contentPath = si.getSuggestPath();
-                        if (contentPath != null) {
-                            uriStr.append('/');
-                            uriStr.append(contentPath);
-                        }
-                        // append standard suggestion query path 
-                        uriStr.append('/' + SearchManager.SUGGEST_URI_PATH_QUERY);
-                        // inject query, either as selection args or inline
-                        String[] selArgs = null;
-                        if (si.getSuggestSelection() != null) {
-                            selArgs = new String[] {selectionArgs[0]};
-                        } else {
-                            uriStr.append('/');
-                            uriStr.append(Uri.encode(selectionArgs[0]));
-                        }
-
-                        // finally, make the query
-                        Cursor sc = getContext().getContentResolver().query(
-                                Uri.parse(uriStr.toString()), null,
-                                si.getSuggestSelection(), selArgs, null);
-
+                    Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
+                    intent.addCategory(Intent.CATEGORY_DEFAULT);
+                    ResolveInfo info = getContext().getPackageManager().resolveActivity(
+                            intent, PackageManager.MATCH_DEFAULT_ONLY);
+                    if (info != null) {
+                        ComponentName googleSearchComponent =
+                                new ComponentName(info.activityInfo.packageName,
+                                        info.activityInfo.name);
+                        SearchableInfo si =
+                                SearchManager.getSearchableInfo(googleSearchComponent, false);
+                        Cursor sc = SearchManager.getSuggestions(
+                                getContext(), si, selectionArgs[0]);
                         return new MySuggestionCursor(c, sc, selectionArgs[0]);
-                    } catch (RemoteException e) {
                     }
                 }
                 return new MySuggestionCursor(c, null, selectionArgs[0]);
@@ -694,4 +764,26 @@
         getContext().getContentResolver().notifyChange(url, null);
         return ret;
     }
+
+    /**
+     * Strips the provided url of preceding "http://" and any trailing "/". Does not
+     * strip "https://". If the provided string cannot be stripped, the original string
+     * is returned.
+     *
+     * TODO: Put this in TextUtils to be used by other packages doing something similar.
+     *
+     * @param url a url to strip, like "http://www.google.com/"
+     * @return a stripped url like "www.google.com", or the original string if it could
+     *         not be stripped
+     */
+    private static String stripUrl(String url) {
+        if (url == null) return null;
+        Matcher m = STRIP_URL_PATTERN.matcher(url);
+        if (m.matches() && m.groupCount() == 3) {
+            return m.group(2);
+        } else {
+            return url;
+        }
+    }
+
 }
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 0e2c5af..68438b3 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -67,7 +67,7 @@
     private boolean saveFormData = true;
     private boolean openInBackground = false;
     private String defaultTextEncodingName;
-    private String homeUrl = "http://www.google.com/m?client=ms-";
+    private String homeUrl = "";
     private boolean loginInitialized = false;
     private boolean autoFitPage = true;
     private boolean showDebugSettings = false;
@@ -199,7 +199,7 @@
         // local directory.
         pluginsPath = ctx.getDir("plugins", 0).getPath();
 
-        homeUrl += Partner.getString(ctx.getContentResolver(), Partner.CLIENT_ID);
+        homeUrl = getFactoryResetHomeUrl(ctx);
 
         // Load the defaults from the xml
         // This call is TOO SLOW, need to manually keep the defaults
@@ -439,6 +439,17 @@
         p.edit().clear().commit();
         PreferenceManager.setDefaultValues(context, R.xml.browser_preferences,
                 true);
+        // reset homeUrl
+        setHomePage(context, getFactoryResetHomeUrl(context));
+    }
+
+    private String getFactoryResetHomeUrl(Context context) {
+        String url = context.getResources().getString(R.string.homepage_base);
+        if (url.indexOf("{CID}") != -1) {
+            url = url.replace("{CID}", Partner.getString(context
+                    .getContentResolver(), Partner.CLIENT_ID, "android-google"));
+        }
+        return url;
     }
 
     // Private constructor that does nothing.
diff --git a/src/com/android/browser/FakeWebView.java b/src/com/android/browser/FakeWebView.java
index 633b799..da5ef5f 100644
--- a/src/com/android/browser/FakeWebView.java
+++ b/src/com/android/browser/FakeWebView.java
@@ -33,17 +33,9 @@
  *  overrides ImageView so it can be used for the new tab image as well.
  */
 public class FakeWebView extends ImageView {
-    private TabControl.Tab mTab;
-    private Picture        mPicture;
+    private TabControl.PickerData mPickerData;
     private boolean        mUsesResource;
 
-    private class Listener implements WebView.PictureListener {
-        public void onNewPicture(WebView view, Picture p) {
-            FakeWebView.this.mPicture = p;
-            FakeWebView.this.invalidate();
-        }
-    };
-
     public FakeWebView(Context context) {
         this(context, null);
     }
@@ -68,17 +60,21 @@
             // would be nice to know if the picture is empty so we can avoid
             // drawing white.
             canvas.drawColor(Color.WHITE);
-            if (mTab != null) {
-                final WebView w = mTab.getTopWindow();
-                if (w != null) {
-                    if (mPicture != null) {
-                        canvas.save();
-                        float scale = getWidth() * w.getScale() / w.getWidth();
-                        canvas.scale(scale, scale);
-                        canvas.translate(-w.getScrollX(), -w.getScrollY());
-                        canvas.drawPicture(mPicture);
-                        canvas.restore();
+            if (mPickerData != null) {
+                final Picture p = mPickerData.mPicture;
+                if (p != null) {
+                    canvas.save();
+                    float scale = getWidth() * mPickerData.mScale
+                            / mPickerData.mWidth;
+                    // Check for NaN and infinity.
+                    if (Float.isNaN(scale) || Float.isInfinite(scale)) {
+                        scale = 1.0f;
                     }
+                    canvas.scale(scale, scale);
+                    canvas.translate(-mPickerData.mScrollX,
+                            -mPickerData.mScrollY);
+                    canvas.drawPicture(p);
+                    canvas.restore();
                 }
             }
         }
@@ -87,25 +83,24 @@
     @Override
     public void setImageResource(int resId) {
         mUsesResource = true;
-        mTab = null;
+        mPickerData = null;
         super.setImageResource(resId);
     }
 
     /**
      *  Set a WebView for this FakeWebView to represent.
-     *  @param  v WebView whose picture and other data will be used in onDraw.
+     *  @param  t The tab whose picture and other data will be used in onDraw.
      */
     public void setTab(TabControl.Tab t) {
         mUsesResource = false;
-        mTab = t;
-        if (t != null && t.getWebView() != null) {
-            Listener l = new Listener();
-            if (t.getSubWebView() != null) {
-                t.getSubWebView().setPictureListener(l);
-            } else {
-                t.getWebView().setPictureListener(l);
-            }
-            mPicture = mTab.getTopWindow().capturePicture();
+        if (mPickerData != null) {
+            // Clear the old tab's view first
+            mPickerData.mFakeWebView = null;
+        }
+        mPickerData = null;
+        if (t != null && t.getPickerData() != null) {
+            mPickerData = t.getPickerData();
+            mPickerData.mFakeWebView = this;
         }
     }
 }
diff --git a/src/com/android/browser/GearsNativeDialog.java b/src/com/android/browser/GearsNativeDialog.java
index ecf166d..b44ec2a 100644
--- a/src/com/android/browser/GearsNativeDialog.java
+++ b/src/com/android/browser/GearsNativeDialog.java
@@ -23,7 +23,6 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
-import android.util.Config;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.KeyEvent;
@@ -137,7 +136,7 @@
       return;
     }
 
-    if (Config.LOGV) {
+    if (Browser.LOGV_ENABLED) {
       Log.v(TAG, "dialogtype: " + dialogTypeString);
     }
 
diff --git a/src/com/android/browser/ImageAdapter.java b/src/com/android/browser/ImageAdapter.java
index e957143..f95753a 100644
--- a/src/com/android/browser/ImageAdapter.java
+++ b/src/com/android/browser/ImageAdapter.java
@@ -27,7 +27,6 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.LayoutInflater;
-import android.webkit.WebView;
 import android.widget.ImageView;
 import android.widget.ListAdapter;
 import android.widget.TextView;
@@ -73,22 +72,10 @@
      * Clear the internal WebViews and remove their picture listeners.
      */
     public void clear() {
-        for (TabControl.Tab t : mItems) {
-            clearPictureListeners(t);
-        }
         mItems.clear();
         notifyObservers();
     }
 
-    private void clearPictureListeners(TabControl.Tab t) {
-        if (t.getWebView() != null) {
-            t.getWebView().setPictureListener(null);
-            if (t.getSubWebView() != null) {
-                t.getSubWebView().setPictureListener(null);
-            }
-        }
-    }
-
     /**
      * Add a new window web page to the grid
      * 
@@ -113,7 +100,7 @@
      */
     public void remove(int index) {
         if (index >= 0 && index < mItems.size()) {
-            clearPictureListeners(mItems.remove(index));
+            mItems.remove(index);
             notifyObservers();
             mMaxedOut = false;
         }
diff --git a/src/com/android/browser/ImageGrid.java b/src/com/android/browser/ImageGrid.java
index 9eccb16..9967f36 100644
--- a/src/com/android/browser/ImageGrid.java
+++ b/src/com/android/browser/ImageGrid.java
@@ -17,7 +17,6 @@
 package com.android.browser;
 
 import android.content.Context;
-import android.util.Config;
 import android.view.ContextMenu;
 import android.view.ContextMenu.ContextMenuInfo;
 import android.view.KeyEvent;
@@ -109,7 +108,7 @@
      * @param index Window to remove, from 0 to MAX_TABS-1
      */
     public void remove(int index) {
-        if (Config.DEBUG && (index < 0 || index >= TabControl.MAX_TABS)) {
+        if (Browser.DEBUG && (index < 0 || index >= TabControl.MAX_TABS)) {
             throw new AssertionError();
         }
         mAdapter.remove(index);
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index ee63f2c..581d144 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -17,10 +17,10 @@
 package com.android.browser;
 
 import android.content.Context;
+import android.graphics.Picture;
 import android.net.http.SslError;
 import android.os.Bundle;
 import android.os.Message;
-import android.util.Config;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -40,6 +40,7 @@
 import android.widget.ImageButton;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.util.ArrayList;
 import java.util.Vector;
 
@@ -126,7 +127,7 @@
         }
         @Override
         public void onCloseWindow(WebView window) {
-            if (Config.DEBUG && window != mTab.mSubView) {
+            if (Browser.DEBUG && window != mTab.mSubView) {
                 throw new AssertionError("Can't close the window");
             }
             mActivity.dismissSubWindow(mTab);
@@ -143,10 +144,24 @@
         }
     }
 
+    // Extra saved information for displaying the tab in the picker.
+    public static class PickerData {
+        String  mUrl;
+        String  mTitle;
+        float   mScale;
+        int     mScrollX;
+        int     mScrollY;
+        int     mWidth;
+        Picture mPicture;
+        // This can be null. When a new picture comes in, this view should be
+        // invalidated to show the new picture.
+        FakeWebView mFakeWebView;
+    }
+
     /**
      * Private class for maintaining Tabs with a main WebView and a subwindow.
      */
-    public class Tab {
+    public class Tab implements WebView.PictureListener {
         // Main WebView
         private WebView mMainView;
         // Subwindow WebView
@@ -161,10 +176,9 @@
         // information needed to restore the WebView if the user goes back to
         // the tab.
         private Bundle mSavedState;
-        // Extra saved information for displaying the tab in the picker.
-        private String mUrl;
-        private String mTitle;
- 
+        // Data used when displaying the tab in the picker.
+        private PickerData mPickerData;
+
         // Parent Tab. This is the Tab that created this Tab, or null
         // if the Tab was created by the UI
         private Tab mParentTab;
@@ -235,7 +249,10 @@
          * @return The WebView's url or null.
          */
         public String getUrl() {
-            return mUrl;
+            if (mPickerData != null) {
+                return mPickerData.mUrl;
+            }
+            return null;
         }
 
         /**
@@ -246,7 +263,17 @@
          * @return The WebView's title (or url) or null.
          */
         public String getTitle() {
-            return mTitle;
+            if (mPickerData != null) {
+                return mPickerData.mTitle;
+            }
+            return null;
+        }
+
+        /**
+         * Returns the picker data.
+         */
+        public PickerData getPickerData() {
+            return mPickerData;
         }
 
         private void setParentTab(Tab parent) {
@@ -308,6 +335,18 @@
         public boolean closeOnExit() {
             return mCloseOnExit;
         }
+
+        public void onNewPicture(WebView view, Picture p) {
+            if (mPickerData == null) {
+                return;
+            }
+
+            mPickerData.mPicture = p;
+            // Tell the FakeWebView to redraw.
+            if (mPickerData.mFakeWebView != null) {
+                mPickerData.mFakeWebView.invalidate();
+            }
+        }
     };
 
     // Directory to store thumbnails for each WebView.
@@ -484,8 +523,8 @@
         // This tab may have been pushed in to the background and then closed.
         // If the saved state contains a picture file, delete the file.
         if (t.mSavedState != null) {
-            if (t.mSavedState.containsKey("picture")) {
-                new File(t.mSavedState.getString("picture")).delete();
+            if (t.mSavedState.containsKey(CURRPICTURE)) {
+                new File(t.mSavedState.getString(CURRPICTURE)).delete();
             }
         }
 
@@ -544,6 +583,8 @@
     private static final String CURRTAB = "currentTab";
     private static final String CURRURL = "currentUrl";
     private static final String CURRTITLE = "currentTitle";
+    private static final String CURRWIDTH = "currentWidth";
+    private static final String CURRPICTURE = "currentPicture";
     private static final String CLOSEONEXIT = "closeonexit";
     private static final String PARENTTAB = "parentTab";
     private static final String APPID = "appid";
@@ -596,8 +637,7 @@
                     Tab t = new Tab(null, false, null, null);
                     t.mSavedState = inState.getBundle(WEBVIEW + i);
                     if (t.mSavedState != null) {
-                        t.mUrl = t.mSavedState.getString(CURRURL);
-                        t.mTitle = t.mSavedState.getString(CURRTITLE);
+                        populatePickerDataFromSavedState(t);
                         // Need to maintain the app id and original url so we
                         // can possibly reuse this tab.
                         t.mAppId = t.mSavedState.getString(APPID);
@@ -793,8 +833,7 @@
         // Clear the saved state except for the app id and close-on-exit
         // values.
         t.mSavedState = null;
-        t.mUrl = null;
-        t.mTitle = null;
+        t.mPickerData = null;
         // Save the new url in order to avoid deleting the WebView.
         t.mOriginalUrl = url;
         return true;
@@ -919,30 +958,89 @@
     }
 
     /**
-     * Ensure that Tab t has a title, url, and favicon.
+     * Ensure that Tab t has data to display in the tab picker.
      * @param  t   Tab to populate.
      */
     /* package */ void populatePickerData(Tab t) {
-        if (t == null || t.mMainView == null) {
+        if (t == null) {
             return;
         }
+
+        // mMainView == null indicates that the tab has been freed.
+        if (t.mMainView == null) {
+            populatePickerDataFromSavedState(t);
+            return;
+        }
+
         // FIXME: The only place we cared about subwindow was for 
         // bookmarking (i.e. not when saving state). Was this deliberate?
         final WebBackForwardList list = t.mMainView.copyBackForwardList();
         final WebHistoryItem item =
                 list != null ? list.getCurrentItem() : null;
         populatePickerData(t, item);
+
+        // This method is only called during the tab picker creation. At this
+        // point we need to listen for new pictures since the WebView is still
+        // active.
+        final WebView w = t.getTopWindow();
+        w.setPictureListener(t);
+        // Capture the picture here instead of populatePickerData since it can
+        // be called when saving the state of a tab.
+        t.mPickerData.mPicture = w.capturePicture();
     }
 
-    // Populate the picker data
-    private void populatePickerData(Tab t, WebHistoryItem item) {
-        if (item != null) {
-            t.mUrl = item.getUrl();
-            t.mTitle = item.getTitle();
-            if (t.mTitle == null) {
-                t.mTitle = t.mUrl;
+    // Create the PickerData and populate it using the saved state of the tab.
+    private void populatePickerDataFromSavedState(Tab t) {
+        if (t.mSavedState == null) {
+            return;
+        }
+
+        final PickerData data = new PickerData();
+        final Bundle state = t.mSavedState;
+        data.mUrl = state.getString(CURRURL);
+        data.mTitle = state.getString(CURRTITLE);
+        data.mWidth = state.getInt(CURRWIDTH, 0);
+        // XXX: These keys are from WebView.savePicture so if they change, this
+        // will break.
+        data.mScale = state.getFloat("scale", 1.0f);
+        data.mScrollX = state.getInt("scrollX", 0);
+        data.mScrollY = state.getInt("scrollY", 0);
+
+        if (state.containsKey(CURRPICTURE)) {
+            final File f = new File(t.mSavedState.getString(CURRPICTURE));
+            try {
+                final FileInputStream in = new FileInputStream(f);
+                data.mPicture = Picture.createFromStream(in);
+                in.close();
+            } catch (Exception ex) {
+                // Ignore any problems with inflating the picture. We just
+                // won't draw anything.
             }
         }
+
+        // Set the tab's picker data.
+        t.mPickerData = data;
+    }
+
+    // Populate the picker data using the given history item and the current
+    // top WebView.
+    private void populatePickerData(Tab t, WebHistoryItem item) {
+        final PickerData data = new PickerData();
+        if (item != null) {
+            data.mUrl = item.getUrl();
+            data.mTitle = item.getTitle();
+            if (data.mTitle == null) {
+                data.mTitle = data.mUrl;
+            }
+        }
+        // We want to display the top window in the tab picker but use the url
+        // and title of the main window.
+        final WebView w = t.getTopWindow();
+        data.mWidth = w.getWidth();
+        data.mScale = w.getScale();
+        data.mScrollX = w.getScrollX();
+        data.mScrollY = w.getScrollY();
+        t.mPickerData = data;
     }
     
     /**
@@ -953,8 +1051,14 @@
         for (int i = 0; i < size; i++) {
             final Tab t = getTab(i);
             if (t != null && t.mSavedState == null) {
-                t.mUrl = null;
-                t.mTitle = null;
+                t.mPickerData = null;
+            }
+            if (t.mMainView != null) {
+                // Clear the picture listeners.
+                t.mMainView.setPictureListener(null);
+                if (t.mSubView != null) {
+                    t.mSubView.setPictureListener(null);
+                }
             }
         }
     }
@@ -976,7 +1080,7 @@
                 final File f = new File(mThumbnailDir, w.hashCode()
                         + "_pic.save");
                 if (w.savePicture(b, f)) {
-                    b.putString("picture", f.getPath());
+                    b.putString(CURRPICTURE, f.getPath());
                 }
             }
 
@@ -984,12 +1088,17 @@
             final WebHistoryItem item =
                     list != null ? list.getCurrentItem() : null;
             populatePickerData(t, item);
-            if (t.mUrl != null) {
-                b.putString(CURRURL, t.mUrl);
+
+            // XXX: WebView.savePicture stores the scale and scroll positions
+            // in the bundle so we don't have to do it here.
+            final PickerData data = t.mPickerData;
+            if (data.mUrl != null) {
+                b.putString(CURRURL, data.mUrl);
             }
-            if (t.mTitle != null) {
-                b.putString(CURRTITLE, t.mTitle);
+            if (data.mTitle != null) {
+                b.putString(CURRTITLE, data.mTitle);
             }
+            b.putInt(CURRWIDTH, data.mWidth);
             b.putBoolean(CLOSEONEXIT, t.mCloseOnExit);
             if (t.mAppId != null) {
                 b.putString(APPID, t.mAppId);
@@ -1020,8 +1129,7 @@
         // Restore the internal state even if the WebView fails to restore.
         // This will maintain the app id, original url and close-on-exit values.
         t.mSavedState = null;
-        t.mUrl = null;
-        t.mTitle = null;
+        t.mPickerData = null;
         t.mCloseOnExit = b.getBoolean(CLOSEONEXIT);
         t.mAppId = b.getString(APPID);
         t.mOriginalUrl = b.getString(ORIGINALURL);
@@ -1031,8 +1139,8 @@
         if (list == null) {
             return false;
         }
-        if (b.containsKey("picture")) {
-            final File f = new File(b.getString("picture"));
+        if (b.containsKey(CURRPICTURE)) {
+            final File f = new File(b.getString(CURRPICTURE));
             w.restorePicture(b, f);
             f.delete();
         }