mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 22:25:44 +03:00
codacy: Avoid using Literals in Conditional Statements
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
638a5b9fc0
commit
e0802a0da4
1 changed files with 2 additions and 1 deletions
|
@ -89,6 +89,7 @@ public class FileContentProvider extends ContentProvider {
|
|||
private static final String UPGRADE_VERSION_MSG = "OUT of the ADD in onUpgrade; oldVersion == %d, newVersion == %d";
|
||||
private static final int SINGLE_PATH_SEGMENT = 1;
|
||||
public static final int ARBITRARY_DATA_TABLE_INTRODUCTION_VERSION = 20;
|
||||
public static final int MINIMUM_PATH_SEGMENTS_SIZE = 1;
|
||||
|
||||
private DataBaseHelper mDbHelper;
|
||||
private Context mContext;
|
||||
|
@ -186,7 +187,7 @@ public class FileContentProvider extends ContentProvider {
|
|||
children.close();
|
||||
}
|
||||
|
||||
if (uri.getPathSegments().size() > 1) {
|
||||
if (uri.getPathSegments().size() > MINIMUM_PATH_SEGMENTS_SIZE) {
|
||||
count += db.delete(ProviderTableMeta.FILE_TABLE_NAME,
|
||||
ProviderTableMeta._ID + "=" + uri.getPathSegments().get(1)
|
||||
+ (!TextUtils.isEmpty(where) ? " AND (" + where + ")" : ""), whereArgs);
|
||||
|
|
Loading…
Reference in a new issue