introduce tab IDs
Tabs are identified by IDs now, instead of their position
Refactored the save/restore code
Change-Id: I7133d55831201d097dc19ec938a85e7085f36749
diff --git a/src/com/android/browser/ActiveTabsPage.java b/src/com/android/browser/ActiveTabsPage.java
index 52d943f..0feba9a 100644
--- a/src/com/android/browser/ActiveTabsPage.java
+++ b/src/com/android/browser/ActiveTabsPage.java
@@ -83,7 +83,8 @@
@Override
public void onItemClick(
AdapterView<?> parent, View view, int position, long id) {
- boolean needToAttach = !mController.switchToTab(position);
+ final Tab tab = mTabControl.getTab(position);
+ boolean needToAttach = !mController.switchToTab(tab);
mController.removeActiveTabsPage(needToAttach);
}