From 2a6fbbb9a31171142f0929cd49794f2ec07ec0e9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 19 Jan 2012 13:14:54 +0300 Subject: [PATCH] limit search to API level 2 --- src/org/fox/ttrss/MainActivity.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 40c0a331..02f29ebb 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -1208,15 +1208,15 @@ public class MainActivity extends FragmentActivity implements OnlineServices { MenuItem search = m_menu.findItem(R.id.search); - if (search != null && !m_compatMode) { + search.setEnabled(m_apiLevel >= 2); + + if (!m_compatMode) { SearchView searchView = (SearchView) search.getActionView(); searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { private String query = ""; @Override public boolean onQueryTextSubmit(String query) { - Log.d(TAG, "Search/onQueryTextSubmit"); - HeadlinesFragment frag = (HeadlinesFragment) getSupportFragmentManager() .findFragmentById(R.id.headlines_fragment); @@ -1230,10 +1230,6 @@ public class MainActivity extends FragmentActivity implements OnlineServices { @Override public boolean onQueryTextChange(String newText) { - // TODO Auto-generated method stub - - Log.d(TAG, "Search/onQueryTextChange: " + newText); - if (newText.equals("") && !newText.equals(this.query)) { HeadlinesFragment frag = (HeadlinesFragment) getSupportFragmentManager() .findFragmentById(R.id.headlines_fragment);