Fix crash while searching in Settings

A crash occurrs when power button is pressed during search in Settings
due to IndexOutOfBoundsException in HeaderViewListAdapter.
When suggestions and results are cleared,
the layouts should be invisible to solve this problem.

Bug: 27913974
Test: manual - search "font" and press power button twice

Change-Id: Ia53d393e695dbb238fc4c82a3fe52ef4250d84c1
diff --git a/src/com/android/settings/dashboard/SearchResultsSummary.java b/src/com/android/settings/dashboard/SearchResultsSummary.java
index 38f17e3..6f476a2 100644
--- a/src/com/android/settings/dashboard/SearchResultsSummary.java
+++ b/src/com/android/settings/dashboard/SearchResultsSummary.java
@@ -323,6 +323,7 @@
             mUpdateSuggestionsTask = null;
         }
         setSuggestionsCursor(null);
+        setSuggestionsVisibility(false);
     }
 
     private void setSuggestionsCursor(Cursor cursor) {
@@ -341,6 +342,7 @@
             mUpdateSearchResultsTask = null;
         }
         setResultsCursor(null);
+        setResultsVisibility(false);
     }
 
     private void setResultsCursor(Cursor cursor) {