summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/TabControl.java
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-03-15 18:19:14 -0400
committerLeon Scroggins <scroggo@google.com>2010-03-17 08:46:53 -0400
commit6eac63e78d43d04e31c4d16830c44c4d9df82639 (patch)
tree42d423e0e98d816a0d44afa9b5249d08fdeee2f3 /src/com/android/browser/TabControl.java
parent98d5fce7c687cfcc956b10d44946d31f39b6dc15 (diff)
downloadpackages_apps_browser-6eac63e78d43d04e31c4d16830c44c4d9df82639.zip
packages_apps_browser-6eac63e78d43d04e31c4d16830c44c4d9df82639.tar.gz
packages_apps_browser-6eac63e78d43d04e31c4d16830c44c4d9df82639.tar.bz2
Do not destroy the backforward list when doing another voice search.
Fix for http://b/issue?id=2516327 Change-Id: I0daf8ba6e24be6682d849107914877fb0c31ec4f
Diffstat (limited to 'src/com/android/browser/TabControl.java')
-rw-r--r--src/com/android/browser/TabControl.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index e64f3fb..de32b03 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -490,11 +490,18 @@ class TabControl {
/**
* Recreate the main WebView of the given tab. Returns true if the WebView
- * was deleted.
+ * requires a load, whether it was due to the fact that it was deleted, or
+ * it is because it was a voice search.
*/
- boolean recreateWebView(Tab t, String url) {
+ boolean recreateWebView(Tab t, BrowserActivity.UrlData urlData) {
+ final String url = urlData.mUrl;
final WebView w = t.getWebView();
if (w != null) {
+ if (urlData.mVoiceIntent != null) {
+ // In the case of a voice search, we do not want to destroy the
+ // back forward list, so that we can go back to the prior search
+ return true;
+ }
if (url != null && url.equals(t.getOriginalUrl())) {
// The original url matches the current url. Just go back to the
// first history item so we can load it faster than if we