diff --git a/CHANGELOG.md b/CHANGELOG.md index d03177d2e..3902e8e3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ See for more information about XPrivacy 3 [this FAQ](https://github.com/M66B/XPr **Next release** +* Workaround for missing action view ([issue](/../../issues/2037)) + [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) **Version 3.4.4 TEST** diff --git a/src/biz/bokhorst/xprivacy/ActivityMain.java b/src/biz/bokhorst/xprivacy/ActivityMain.java index ee7eeaaa4..c95f9b9e2 100644 --- a/src/biz/bokhorst/xprivacy/ActivityMain.java +++ b/src/biz/bokhorst/xprivacy/ActivityMain.java @@ -485,29 +485,31 @@ public boolean onCreateOptionsMenu(Menu menu) { // Searchable SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView(); - searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { - @Override - public boolean onQueryTextChange(String newText) { - searchQuery = newText; - applyFilter(); - return true; - } + if (searchView != null) { + searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { + @Override + public boolean onQueryTextChange(String newText) { + searchQuery = newText; + applyFilter(); + return true; + } - @Override - public boolean onQueryTextSubmit(String query) { - searchQuery = query; - applyFilter(); - return true; - } - }); - searchView.setOnCloseListener(new SearchView.OnCloseListener() { - @Override - public boolean onClose() { - searchQuery = ""; - applyFilter(); - return true; - } - }); + @Override + public boolean onQueryTextSubmit(String query) { + searchQuery = query; + applyFilter(); + return true; + } + }); + searchView.setOnCloseListener(new SearchView.OnCloseListener() { + @Override + public boolean onClose() { + searchQuery = ""; + applyFilter(); + return true; + } + }); + } return true; } else