Browse Source

FileContentProvider: don't verify projectionArray in query()

query() is already using a projection map and strict mode for those cases, so we're just duplicating work here.

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
Álvaro Brey Vilas 3 years ago
parent
commit
43adc856a4

+ 0 - 24
src/main/java/com/owncloud/android/providers/FileContentProvider.java

@@ -511,18 +511,6 @@ public class FileContentProvider extends ContentProvider {
 
         // verify only for those requests that are not internal
         final int uriMatch = mUriMatcher.match(uri);
-        switch (uriMatch) {
-            case ROOT_DIRECTORY:
-            case SINGLE_FILE:
-            case DIRECTORY:
-                VerificationUtils.verifyColumnNames(projectionArray);
-                // TODO verify selection and sortorder
-//                verifyColumnsSQL(selection);
-//                verifyColumnsSQL(sortOrder);
-
-            default:
-                // do nothing
-        }
 
         SQLiteQueryBuilder sqlQuery = new SQLiteQueryBuilder();
 
@@ -1092,18 +1080,6 @@ public class FileContentProvider extends ContentProvider {
             }
         }
 
-        @VisibleForTesting
-        public static void verifyColumnNames(@Nullable String[] columns) {
-            if (columns == null) {
-                return;
-            }
-
-            for (String name : columns) {
-                verifyColumnName(name);
-            }
-        }
-
-
         /**
          * matches against ProviderMeta, to verify that only allowed columns are used
          */