Get tab id from Tab for onHistoryItemCommit
Do not query the tab id from TabControl. The tab might be getting recreated
because of restore during this time the current tab & thier ids might not be set.
Tab.this will always ensure we get the correct tab id.
Change-Id: I396e9ffcb35c468fd3d916ba4cd49cb202a2017c
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 6919300..2ddd2d1 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -613,8 +613,7 @@
final int maxIdx = view.copyBackForwardList().getSize();
final WebView wv = view;
final int currIdx = index;
- final int currentTabIdx = (int) mWebViewController.getTabControl().
- getCurrentTab().getId();
+ final int currentTabIdx = (int) Tab.this.getId();
view.getSnapshotIds(new ValueCallback <List<Integer>>() {
@Override
public void onReceiveValue(List<Integer> ids) {