Fix for duplicate tab ids exception
- When the Snapshot tab was getting restored
its tab id was not getting restored again
because the object was not passed, when restoring
it.
This change fixes the issue
diff --git a/src/com/android/browser/SnapshotTab.java b/src/com/android/browser/SnapshotTab.java
index 13e94b8..7471bca 100644
--- a/src/com/android/browser/SnapshotTab.java
+++ b/src/com/android/browser/SnapshotTab.java
@@ -53,9 +53,13 @@
// Used for saving and restoring each Tab
static final String SNAPSHOT_ID = "snapshotId";
+ static final String ID = "ID";
- public SnapshotTab(WebViewController wvcontroller, long snapshotId) {
- super(wvcontroller, null, null);
+
+ public SnapshotTab(WebViewController wvcontroller,
+ long snapshotId,
+ Bundle state) {
+ super(wvcontroller, null, state);
mSnapshotId = snapshotId;
mWebViewFactory = mWebViewController.getWebViewFactory();
WebView web = mWebViewFactory.createWebView(false);
@@ -122,8 +126,8 @@
}
mSavedState = new Bundle();
+ mSavedState = super.saveState();
mSavedState.putLong(SNAPSHOT_ID, mSnapshotId);
-
return mSavedState;
}