[Android] [PATCH 1/3] Remove identical overridden implementation

Romain Vimont rom at rom1v.com
Tue Nov 7 18:34:45 CET 2017


MainActivity provided the very same implementation for
onQueryTextChange(), overridden from its superclass ContentActivity.

To avoid code duplication, remove it.
---
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 672dc229e..5d85a52e0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -557,18 +557,6 @@ public class MainActivity extends ContentActivity implements FilterQueryProvider
     }
 
     @Override
-    public boolean onQueryTextChange(String filterQueryString) {
-        if (filterQueryString.length() < 3)
-            return false;
-        final Fragment current = getCurrentFragment();
-        if (current instanceof Filterable) {
-            ((Filterable) current).getFilter().filter(filterQueryString);
-            return true;
-        }
-        return false;
-    }
-
-    @Override
     public boolean onNavigationItemSelected(MenuItem item) {
         // This should not happen
         if(item == null)
-- 
2.11.0



More information about the Android mailing list