Showing 32 of 532 total issues
Consider simplifying this complex logical expression. Open
Open
if (albumart != null && nowPlayingLayout != null && album != null && title != null && state != null && artist != null
&& albumart.getDrawable() != null && newImage instanceof BitmapDrawable && lyrics != null
&& mainLayout != null) {
Bitmap toUseForPalette = ((BitmapDrawable) newImage).getBitmap();
new Palette.Builder(toUseForPalette)
Avoid deeply nested control flow statements. Open
Open
if (!CommonMethods.isColorDark(backgroundCTo))
getWindow().getDecorView().setSystemUiVisibility(systemui | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
else
getWindow().getDecorView().setSystemUiVisibility(systemui);
Avoid deeply nested control flow statements. Open
Open
if (trueString == null) return "Supported";
else return trueString;
Avoid deeply nested control flow statements. Open
Open
if (a.addressLines.isNotEmpty()) for (s in a.addressLines) result.append("$s ")
Consider simplifying this complex logical expression. Open
Open
if (locationTo.getText().toString().isEmpty() || purpose.getText().toString().isEmpty()
|| mileageAfter.getText().toString().isEmpty() || mileageBefore.getText().toString().isEmpty() || fromTimeVal == 0
|| toTimeVal == 0) {
Snackbar.make(layout, "Please fill up all of the fields and ensure that they are correct", Snackbar.LENGTH_SHORT).show();
return false;
Avoid too many return
statements within this method. Open
Open
if (value <= 200) return if (nightMode) ColorUtils.DARK_YELLOW else ColorUtils.YELLOW
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return ColorUtils.RED
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
if (g > col.from && g <= col.to) return ColorUtils.getColorFromVariable(context, colorFromString(col.color, context))
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return super.onOptionsItemSelected(item);
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
if (value <= 100) return if (nightMode) ColorUtils.LIGHT_BLUE else ColorUtils.BLUE
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return "Fail";
Avoid too many return
statements within this method. Open
Open
return true;