Fix bug #14323469 Settings crash on selecting keyword from recent searches
... after changing orientation
- set the SearchView for the SearchResultsFragment when the SearchView is
instantiated in the onCreateOptionsMenu(Menu)
- take care of the correct showing of the Recent Searched (suggestions)
Change-Id: Idfa17436d4a2436e0947ce1e1692355def3821a3
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 3c865a9..314b3c9 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -411,6 +411,10 @@
return false;
}
+ if (mSearchResultsFragment != null) {
+ mSearchResultsFragment.setSearchView(mSearchView);
+ }
+
mSearchMenuItem.setOnActionExpandListener(this);
mSearchView.setOnQueryTextListener(this);
mSearchView.setOnCloseListener(this);