fix ComboPage and tab interaction

    Bug: http://b/issue?id=3259963
    Make sure the combo page is hidden correctly when the user
    interacts with the tab bar

Change-Id: I776b30690dbc10a399ca31f9e1c8b9c4f677a1d2
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 4dc4c4b..e4b0982 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2179,6 +2179,8 @@
      */
     @Override
     public boolean switchToTab(int index) {
+        // hide combo view if open
+        removeComboView();
         Tab tab = mTabControl.getTab(index);
         Tab currentTab = mTabControl.getCurrentTab();
         if (tab == null || tab == currentTab) {
@@ -2195,6 +2197,8 @@
 
     @Override
     public void closeCurrentTab() {
+        // hide combo view if open
+        removeComboView();
         final Tab current = mTabControl.getCurrentTab();
         if (mTabControl.getTabCount() == 1) {
             // This is the last tab.  Open a new one, with the home
@@ -2228,6 +2232,8 @@
      */
     @Override
     public void closeTab(Tab tab) {
+        // hide combo view if open
+        removeComboView();
         int currentIndex = mTabControl.getCurrentIndex();
         int removeIndex = mTabControl.getTabIndex(tab);
         removeTab(tab);