summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2012-01-17 12:43:24 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-17 12:43:24 -0800
commit6eb5f84f14968c939776681666b917315577beb1 (patch)
tree614def3bb8f324c5253fa9975afe9cdc59c5475f /src
parent9f733096d8e5a875edcdd63e24ec7d5a029d499b (diff)
parent91911a26058418e622950cffc616f99ada49df1d (diff)
downloadpackages_apps_Browser-6eb5f84f14968c939776681666b917315577beb1.tar.gz
packages_apps_Browser-6eb5f84f14968c939776681666b917315577beb1.tar.bz2
packages_apps_Browser-6eb5f84f14968c939776681666b917315577beb1.zip
Merge "fix back key on tabs behavior"
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/Tab.java8
-rw-r--r--src/com/android/browser/TabControl.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index a7598c2c6..b09e4239b 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -1501,11 +1501,15 @@ class Tab implements PictureListener {
return mId;
}
+ void setWebView(WebView w) {
+ setWebView(w, true);
+ }
+
/**
* Sets the WebView for this tab, correctly removing the old WebView from
* the container view.
*/
- void setWebView(WebView w) {
+ void setWebView(WebView w, boolean restore) {
if (mMainView == w) {
return;
}
@@ -1542,7 +1546,7 @@ class Tab implements PictureListener {
if (tc != null && tc.getOnThumbnailUpdatedListener() != null) {
mMainView.setPictureListener(this);
}
- if (mSavedState != null) {
+ if (restore && (mSavedState != null)) {
WebBackForwardList restoredState
= mMainView.restoreState(mSavedState);
if (restoredState == null || restoredState.getSize() == 0) {
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index 0668b7445..993cd1138 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -613,7 +613,7 @@ class TabControl {
}
// Create a new WebView. If this tab is the current tab, we need to put
// back all the clients so force it to be the current tab.
- t.setWebView(createNewWebView());
+ t.setWebView(createNewWebView(), false);
if (getCurrentTab() == t) {
setCurrentTab(t, true);
}