Fix more warnings

This commit is contained in:
tzugen 2021-05-19 18:37:54 +02:00
parent b559f6420e
commit 3a05f30907
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
14 changed files with 17 additions and 35 deletions

View File

@ -22,11 +22,10 @@ val CLIENT_VERSION = SubsonicAPIVersions.V1_16_0
const val CLIENT_ID = "test-client" const val CLIENT_ID = "test-client"
val dateFormat by lazy( val dateFormat by lazy(
LazyThreadSafetyMode.NONE, LazyThreadSafetyMode.NONE
{ ) {
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.US) SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.US)
} }
)
fun MockWebServerRule.enqueueResponse(resourceName: String) { fun MockWebServerRule.enqueueResponse(resourceName: String) {
mockWebServer.enqueueResponse(resourceName) mockWebServer.enqueueResponse(resourceName)

View File

@ -47,7 +47,7 @@ android {
lintOptions { lintOptions {
baselineFile file("lint-baseline.xml") baselineFile file("lint-baseline.xml")
warning 'MissingTranslation' ignore 'MissingTranslation'
warning 'ImpliedQuantity' warning 'ImpliedQuantity'
abortOnError true abortOnError true
} }

View File

@ -20,7 +20,7 @@
</p> </p>
<p> <p>
Par d&eacute;faut, cette application n'est pas configur&eacutee</b>. Apr&egrave;s avoir configur&eacute; votre Par d&eacute;faut, cette application n'est pas configur&eacutee. Apr&egrave;s avoir configur&eacute; votre
serveur personnel, veuillez acc&eacute;der aux <b>Param&egrave;tres</b> et modifier la configuration afin de vous connecter &agrave; votre propre ordinateur ou vos appareils mobiles. serveur personnel, veuillez acc&eacute;der aux <b>Param&egrave;tres</b> et modifier la configuration afin de vous connecter &agrave; votre propre ordinateur ou vos appareils mobiles.
</p> </p>

View File

@ -21,7 +21,7 @@ import org.moire.ultrasonic.R;
import org.moire.ultrasonic.util.Util; import org.moire.ultrasonic.util.Util;
/** /**
* Displays online help and about information in a webWiew * Displays online help and about information in a WebView
*/ */
public class AboutFragment extends Fragment { public class AboutFragment extends Fragment {

View File

@ -18,8 +18,6 @@
*/ */
package org.moire.ultrasonic.service; package org.moire.ultrasonic.service;
import org.moire.ultrasonic.audiofx.EqualizerController;
import org.moire.ultrasonic.audiofx.VisualizerController;
import org.moire.ultrasonic.domain.MusicDirectory.Entry; import org.moire.ultrasonic.domain.MusicDirectory.Entry;
import org.moire.ultrasonic.domain.PlayerState; import org.moire.ultrasonic.domain.PlayerState;
import org.moire.ultrasonic.domain.RepeatMode; import org.moire.ultrasonic.domain.RepeatMode;

View File

@ -24,11 +24,6 @@ import kotlin.Lazy;
import static org.koin.java.KoinJavaComponent.inject; import static org.koin.java.KoinJavaComponent.inject;
/**
* @author Sindre Mehus
* @version $Id$
*/
/** /**
* Responsible for cleaning up files from the offline download cache on the filesystem * Responsible for cleaning up files from the offline download cache on the filesystem
*/ */
@ -207,17 +202,8 @@ public class CacheCleaner
@Override @Override
public int compare(File a, File b) public int compare(File a, File b)
{ {
if (a.lastModified() < b.lastModified()) return Long.compare(a.lastModified(), b.lastModified());
{
return -1;
}
if (a.lastModified() > b.lastModified())
{
return 1;
}
return 0;
} }
}); });
} }

View File

@ -47,7 +47,7 @@ public class EntryByDiscAndTrackComparator implements Comparator<MusicDirectory.
private static int compare(long a, long b) private static int compare(long a, long b)
{ {
return a < b ? -1 : a > b ? 1 : 0; return Long.compare(a, b);
} }
private static int compare(String a, String b) private static int compare(String a, String b)

View File

@ -1,4 +1,4 @@
/*** /**
Copyright (c) 2008-2009 CommonsWare, LLC Copyright (c) 2008-2009 CommonsWare, LLC
Portions (c) 2009 Google, Inc. Portions (c) 2009 Google, Inc.

View File

@ -1,4 +1,4 @@
/*** /**
Copyright (c) 2008-2009 CommonsWare, LLC Copyright (c) 2008-2009 CommonsWare, LLC
Portions (c) 2009 Google, Inc. Portions (c) 2009 Google, Inc.

View File

@ -68,8 +68,8 @@ public class ArtistAdapter extends ArrayAdapter<Artist> implements SectionIndexe
} }
} }
sections = sectionSet.toArray(new Object[sectionSet.size()]); sections = sectionSet.toArray(new Object[0]);
positions = positionList.toArray(new Integer[positionList.size()]); positions = positionList.toArray(new Integer[0]);
} }
@NonNull @NonNull

View File

@ -4,7 +4,6 @@ import android.content.Context;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.ImageView;
import androidx.appcompat.widget.AppCompatImageView; import androidx.appcompat.widget.AppCompatImageView;

View File

@ -66,8 +66,8 @@ public class GenreAdapter extends ArrayAdapter<Genre> implements SectionIndexer
} }
} }
sections = sectionSet.toArray(new Object[sectionSet.size()]); sections = sectionSet.toArray(new Object[0]);
positions = positionList.toArray(new Integer[positionList.size()]); positions = positionList.toArray(new Integer[0]);
} }
@NonNull @NonNull

View File

@ -32,7 +32,7 @@ public class PodcastsChannelsAdapter extends ArrayAdapter<PodcastsChannel> {
PodcastsChannel entry = getItem(position); PodcastsChannel entry = getItem(position);
TextView view; TextView view;
if (convertView != null && convertView instanceof PlaylistView) { if (convertView instanceof PlaylistView) {
view = (TextView) convertView; view = (TextView) convertView;
} else { } else {
view = (TextView) layoutInflater view = (TextView) layoutInflater

View File

@ -28,7 +28,7 @@ public class SongListAdapter extends ArrayAdapter<DownloadFile>
SongView view; SongView view;
if (convertView != null && convertView instanceof SongView) if (convertView instanceof SongView)
{ {
SongView currentView = (SongView) convertView; SongView currentView = (SongView) convertView;
if (currentView.getEntry().equals(entry)) if (currentView.getEntry().equals(entry))