Merge change 5160 into donut

* changes:
  Return the url of a browser history item in the intent query column of the suggestion. This is so that global search can rewrite a query in the search dialog (i.e., fill in the search box with the url of the suggestion when the user rolls over to select the suggestion). Browser uses android:searchMode="rewriteQueryFromData" to accomplish this but global search does the default thing of using the intent query column, if present, as a rewrite for the current query.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 4fce8c2..8e79573 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -905,7 +905,7 @@
                 || Intent.ACTION_WEB_SEARCH.equals(action)) {
             url = intent.getStringExtra(SearchManager.QUERY);
         }
-        return handleWebSearchRequest(url);
+        return handleWebSearchRequest(url, intent.getBundleExtra(SearchManager.APP_DATA));
     }
 
     /**
@@ -913,7 +913,7 @@
      * 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) {
+    private boolean handleWebSearchRequest(String inUrl, Bundle appData) {
         if (inUrl == null) return false;
 
         // In general, we shouldn't modify URL from Intent.
@@ -934,6 +934,9 @@
         Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
         intent.addCategory(Intent.CATEGORY_DEFAULT);
         intent.putExtra(SearchManager.QUERY, url);
+        if (appData != null) {
+            intent.putExtra(SearchManager.APP_DATA, appData);
+        }
         startActivity(intent);
 
         return true;