public static void configureSearchView(Activity activity, Menu menu) {
if (!isAndroid30())
return;
try {
SearchManager sm = (SearchManager) activity.getSystemService(
Context.SEARCH_SERVICE);
if (null == sm)
return;
Method m = sm.getClass().getMethod("getSearchableInfo",
android.content.ComponentName.class);
Object si = m.invoke(sm, activity.getComponentName());
MenuItem item = menu.findItem(R.id.list_search);
m = item.getClass().getMethod("getActionView");