fix last tab close bug
Bug: 5098467
The controller did not update the tab list correctly
and called activity finish instead. The adapter
got updated and showed the last tab still
Now the controller removes the last tab before
calling finish, so the visible update to the tab
list is correct.
Change-Id: Idf29dff7d60181c63f6b3ebcbc8a1562f027b2c1
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index fc4c35c..457c2e0 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2301,6 +2301,7 @@
public void closeCurrentTab() {
if (mTabControl.getTabCount() == 1) {
mCrashRecoveryHandler.clearState();
+ mTabControl.removeTab(getCurrentTab());
mActivity.finish();
return;
}