codacy: Avoid using Literals in Conditional Statements
Signed-off-by: Andy Scherzinger <[email protected]>
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user