Close the SearchDialog when a new Intent opens the browser.

Fix for http://b/issue?id=2522723

Change-Id: Idf5d878d45b40be93a222385111a87ec32aa2f1b
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index fef8495..cbf78d6 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -409,6 +409,9 @@
             // just resume the browser
             return;
         }
+        // In case the SearchDialog is open.
+        ((SearchManager) getSystemService(Context.SEARCH_SERVICE))
+                .stopSearch();
         boolean activateVoiceSearch = RecognizerResultsIntent
                 .ACTION_VOICE_SEARCH_RESULTS.equals(action);
         if (Intent.ACTION_VIEW.equals(action)