Fix flash of comboview

Hiding the comboview does not check if its visible before starting the animation
to hide the view, this causes flash of comboview if multiple calls are made to
hide the view.

Change-Id: I31da921ee411ac8290df48d8faf6cd4badadaca9
diff --git a/src/com/android/browser/ComboView.java b/src/com/android/browser/ComboView.java
index 8d64ac9..733de12 100644
--- a/src/com/android/browser/ComboView.java
+++ b/src/com/android/browser/ComboView.java
@@ -204,16 +204,18 @@
     }
 
     public void hideViews() {
-        if(!(BrowserActivity.isTablet(mActivity)))
-          this.startAnimation(mOutAnimation);
-        this.setVisibility(View.INVISIBLE);
-        mActionBarContainerId = getResources().getIdentifier("action_bar_container", "id", "android");
-        ViewGroup actionBarContainer = (ViewGroup) mActivity.getWindow().getDecorView().findViewById(mActionBarContainerId);
-        if (actionBarContainer != null) {
-            actionBarContainer.removeOnLayoutChangeListener(this);
+        if (isShowing()) {
+            if (!(BrowserActivity.isTablet(mActivity)))
+                this.startAnimation(mOutAnimation);
+            this.setVisibility(View.INVISIBLE);
+            mActionBarContainerId = getResources().getIdentifier("action_bar_container", "id", "android");
+            ViewGroup actionBarContainer = (ViewGroup) mActivity.getWindow().getDecorView().findViewById(mActionBarContainerId);
+            if (actionBarContainer != null) {
+                actionBarContainer.removeOnLayoutChangeListener(this);
+            }
+            ActionBar actionBar = mActivity.getActionBar();
+            actionBar.hide();
         }
-        ActionBar actionBar = mActivity.getActionBar();
-        actionBar.hide();
     }
 
     //TODO: Save the selected tab on BrowserActivity's onSaveInstanceState