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/TabControl.java b/src/com/android/browser/TabControl.java
index 2488ec2..a30cdca 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -242,8 +242,8 @@
return createNewTab(false);
}
- SnapshotTab createSnapshotTab(long snapshotId) {
- SnapshotTab t = new SnapshotTab(mController, snapshotId);
+ SnapshotTab createSnapshotTab(long snapshotId, Bundle state) {
+ SnapshotTab t = new SnapshotTab(mController, snapshotId, state);
mTabs.add(t);
mTabCountObservable.set(mTabs.size());
return t;
@@ -441,7 +441,7 @@
Tab t = null;
// Add special check to restore Snapshot Tab if needed
if (state.getLong(SnapshotTab.SNAPSHOT_ID, -1) != -1 ) {
- t = (SnapshotTab) createSnapshotTab( state.getLong(SnapshotTab.SNAPSHOT_ID) );
+ t = (SnapshotTab) createSnapshotTab( state.getLong(SnapshotTab.SNAPSHOT_ID), state);
} else {
// presume its a normal Tab
t = createNewTab(state, false);