mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
codacy: Avoid using Literals in Conditional Statements
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
c0b76e33ec
commit
783e28365d
2 changed files with 3 additions and 2 deletions
|
@ -83,6 +83,7 @@ public class FileDataStorageManager {
|
|||
private static final String EXCEPTION_MSG = "Exception in batch of operations ";
|
||||
|
||||
public static final int ROOT_PARENT_ID = 0;
|
||||
public static final String NULL_STRING = "null";
|
||||
|
||||
private ContentResolver contentResolver;
|
||||
private ContentProviderClient contentProviderClient;
|
||||
|
@ -1001,7 +1002,7 @@ public class FileDataStorageManager {
|
|||
|
||||
String sharees = c.getString(c.getColumnIndex(ProviderTableMeta.FILE_SHAREES));
|
||||
|
||||
if (sharees == null || "null".equals(sharees) || sharees.isEmpty()) {
|
||||
if (sharees == null || NULL_STRING.equals(sharees) || sharees.isEmpty()) {
|
||||
file.setSharees(new ArrayList<>());
|
||||
} else {
|
||||
try {
|
||||
|
|
|
@ -636,7 +636,7 @@ public final class ThemeUtils {
|
|||
public static void setEditTextCursorColor(EditText editText, int color) {
|
||||
try {
|
||||
// Get the cursor resource id
|
||||
if (Build.VERSION.SDK_INT >= 28) {//set differently in Android P (API 28)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//set differently in Android P (API 28)
|
||||
Field field = TextView.class.getDeclaredField("mCursorDrawableRes");
|
||||
field.setAccessible(true);
|
||||
int drawableResId = field.getInt(editText);
|
||||
|
|
Loading…
Reference in a new issue