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
This commit is contained in:
Fabrice Di Meglio
2014-05-12 18:54:32 -07:00
parent dfeb64df7d
commit 8c3b0ce712
2 changed files with 42 additions and 3 deletions

View File

@@ -411,6 +411,10 @@ public class SettingsActivity extends Activity
return false;
}
if (mSearchResultsFragment != null) {
mSearchResultsFragment.setSearchView(mSearchView);
}
mSearchMenuItem.setOnActionExpandListener(this);
mSearchView.setOnQueryTextListener(this);
mSearchView.setOnCloseListener(this);