Omnibox supports search extra data

 Bug: 3025590
 Fix the omnibox to support passing on SearchManager.EXTRA_SEARCH_DATA
 in searches done from the suggestion adapter.

Change-Id: Ica6462ef27722c3bbcc0508178ce431e87e27e86
diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java
index 626283a..d3609b2 100644
--- a/src/com/android/browser/SuggestionsAdapter.java
+++ b/src/com/android/browser/SuggestionsAdapter.java
@@ -73,7 +73,7 @@
 
         public void onSearch(String txt);
 
-        public void onSelect(String txt);
+        public void onSelect(String txt, String extraData);
 
         public void onFilterComplete(int count);
 
@@ -119,7 +119,8 @@
             mListener.onSearch(item.title);
         } else {
             SuggestItem item = (SuggestItem) v.getTag();
-            mListener.onSelect((TextUtils.isEmpty(item.url)? item.title : item.url));
+            mListener.onSelect((TextUtils.isEmpty(item.url)? item.title : item.url),
+                    item.extra);
         }
     }
 
@@ -378,6 +379,7 @@
         String title;
         String url;
         int type;
+        String extra;
 
         public SuggestItem(String text, String u, int t) {
             title = text;
@@ -541,7 +543,10 @@
                 String uri = mCursor.getString(
                         mCursor.getColumnIndex(SearchManager.SUGGEST_COLUMN_INTENT_DATA));
                 int type = (TextUtils.isEmpty(url)) ? TYPE_SUGGEST : TYPE_SUGGEST_URL;
-                return new SuggestItem(title, url, type);
+                SuggestItem item = new SuggestItem(title, url, type);
+                item.extra = mCursor.getString(
+                        mCursor.getColumnIndex(SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA));
+                return item;
             }
             return null;
         }