am cf849950: Fix 1970279. Like "Go", search key should get the current url and pre-fill it in the search/goto widget.
Merge commit 'cf849950fe8ad5425ccd82b48b9a014dea8a288e'
* commit 'cf849950fe8ad5425ccd82b48b9a014dea8a288e':
Fix 1970279. Like "Go", search key should get the current url and pre-fill it in the search/goto widget.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index c69a115..95e1996 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -1523,7 +1523,8 @@
*/
@Override
public boolean onSearchRequested() {
- startSearch(null, false,
+ String url = getTopWindow().getUrl();
+ startSearch(mSettings.getHomePage().equals(url) ? null : url, false,
createGoogleSearchSourceBundle(GOOGLE_SEARCH_SOURCE_SEARCHKEY), false);
return true;
}