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/UrlHandler.java b/src/com/android/browser/UrlHandler.java
index c76eee8..02a080f 100644
--- a/src/com/android/browser/UrlHandler.java
+++ b/src/com/android/browser/UrlHandler.java
@@ -258,7 +258,7 @@
protected void onPostExecute(String result) {
// Make sure the Tab was not closed while handling the task
- if (mController.getTabControl().getTabIndex(mTab) != -1) {
+ if (mController.getTabControl().getTabPosition(mTab) != -1) {
// If the Activity Manager is not invoked, load the URL directly
if (!startActivityForUrl(result)) {
if (!handleMenuClick(mTab, result)) {