Hide keyboard before launching search results

While waiting for the WindowManager team to consider our request,
proposing a small fix for a better user experience.

Bug: 185809671
Test: manual
Change-Id: I47251a4690f4440a5a3ca22fa963ce5034a6c9bc
diff --git a/src/com/android/settings/intelligence/search/car/CarSearchFragment.java b/src/com/android/settings/intelligence/search/car/CarSearchFragment.java
index 22cabfe..e84d7e1 100644
--- a/src/com/android/settings/intelligence/search/car/CarSearchFragment.java
+++ b/src/com/android/settings/intelligence/search/car/CarSearchFragment.java
@@ -267,6 +267,11 @@
         mSearchFeatureProvider.searchResultClicked(getContext(), mQuery, result);
         mSavedQueryController.saveQuery(mQuery);
 
+        // Hide keyboard to apply the proper insets before the activity launches.
+        // TODO (b/187074444): remove if WindowManager updates ordering of insets such that they are
+        // applied before new activities are launched.
+        hideKeyboard();
+
         Intent intent = result.payload.getIntent();
         if (result instanceof AppSearchResult) {
             getActivity().startActivity(intent);