am 15e9f2dc: Pass through SearchManager.APP_DATA bundle in web searches.
Merge commit '15e9f2dc92cf1621f95071b3c740f46079aa0f3b'
* commit '15e9f2dc92cf1621f95071b3c740f46079aa0f3b':
Pass through SearchManager.APP_DATA bundle in web searches.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index ec68bfe..00e7c69 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -972,7 +972,7 @@
|| Intent.ACTION_WEB_SEARCH.equals(action)) {
url = intent.getStringExtra(SearchManager.QUERY);
}
- return handleWebSearchRequest(url);
+ return handleWebSearchRequest(url, intent.getBundleExtra(SearchManager.APP_DATA));
}
/**
@@ -980,7 +980,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.
@@ -1001,6 +1001,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;