Fixed some lint errors

This commit is contained in:
ByteHamster 2019-11-22 19:29:17 +01:00
parent a5ee83f373
commit 4a3db25876
9 changed files with 10 additions and 23 deletions

View File

@ -29,7 +29,7 @@ public class GPodnetServiceTest {
private static final String PW = "";
@Before
protected void setUp() {
public void setUp() {
service = new GpodnetService();
}

View File

@ -44,7 +44,7 @@ public class AutoDownloadTest {
public void setUp() throws Exception {
context = ApplicationProvider.getApplicationContext();
stubFeedsServer = new UITestUtils(context);;
stubFeedsServer = new UITestUtils(context);
stubFeedsServer.setup();
dbTasksCallbacksOrig = ClientConfig.dbTasksCallbacks;
@ -130,7 +130,7 @@ public class AutoDownloadTest {
}
private void useDownloadAlgorithm(final AutomaticDownloadAlgorithm downloadAlgorithm) {
DBTasksCallbacks dbTasksCallbacksStub = new DBTasksCallbacks() {
ClientConfig.dbTasksCallbacks = new DBTasksCallbacks() {
@Override
public AutomaticDownloadAlgorithm getAutomaticDownloadAlgorithm() {
return downloadAlgorithm;
@ -141,7 +141,6 @@ public class AutoDownloadTest {
return dbTasksCallbacksOrig.getEpisodeCacheCleanupAlgorithm();
}
};
ClientConfig.dbTasksCallbacks = dbTasksCallbacksStub;
}
private class StubDownloadAlgorithm implements AutomaticDownloadAlgorithm {

View File

@ -322,15 +322,11 @@ public class DBWriterTest {
feed.setImageUrl("url");
List<File> itemFiles = new ArrayList<>();
// create items with downloaded media files
for (int i = 0; i < 10; i++) {
FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed);
feed.getItems().add(item);
File enc = new File(destFolder, "file " + i);
itemFiles.add(enc);
FeedMedia media = new FeedMedia(0, item, 1, 1, 1, "mime_type", enc.getAbsolutePath(), "download_url", false, null, 0, 0);
item.setMedia(media);
}
@ -387,15 +383,11 @@ public class DBWriterTest {
feed.setImageUrl("url");
List<File> itemFiles = new ArrayList<>();
// create items with downloaded media files
for (int i = 0; i < 10; i++) {
FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed);
feed.getItems().add(item);
File enc = new File(destFolder, "file " + i);
itemFiles.add(enc);
FeedMedia media = new FeedMedia(0, item, 1, 1, 1, "mime_type", enc.getAbsolutePath(), "download_url", false, null, 0, 0);
item.setMedia(media);
}

View File

@ -317,8 +317,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
fragment = new AddFeedFragment();
break;
case SubscriptionFragment.TAG:
SubscriptionFragment subscriptionFragment = new SubscriptionFragment();
fragment = subscriptionFragment;
fragment = new SubscriptionFragment();
break;
default:
// default to the queue

View File

@ -144,7 +144,6 @@ public class ItemDescriptionFragment extends Fragment {
}
};
@SuppressWarnings("deprecation")
@SuppressLint("NewApi")
@Override
public boolean onContextItemSelected(MenuItem item) {

View File

@ -88,7 +88,7 @@ public class AspectRatioVideoView extends VideoView {
mVideoWidth = videoWidth;
mVideoHeight = videoHeight;
/**
/*
* If this isn't set the video is stretched across the
* SurfaceHolders display surface (i.e. the SurfaceHolder
* as the same size and the video is drawn to fit this

View File

@ -20,7 +20,7 @@
tools:listitem="@layout/gpodnet_podcast_listitem" />
<TextView
android:id="@id/android:empty"
android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"

View File

@ -304,7 +304,7 @@ public class UserPreferences {
}
public enum EnqueueLocation {
BACK, FRONT, AFTER_CURRENTLY_PLAYING;
BACK, FRONT, AFTER_CURRENTLY_PLAYING
}
@NonNull
@ -566,8 +566,7 @@ public class UserPreferences {
prefs.edit().putString(PREF_IMAGE_CACHE_SIZE, IMAGE_CACHE_DEFAULT_VALUE).apply();
cacheSizeInt = Integer.parseInt(IMAGE_CACHE_DEFAULT_VALUE);
}
int cacheSizeMB = cacheSizeInt * 1024 * 1024;
return cacheSizeMB;
return cacheSizeInt * 1024 * 1024;
}
public static int getFastForwardSecs() {
@ -791,8 +790,7 @@ public class UserPreferences {
}
public static String getMediaPlayer() {
String s = prefs.getString(PREF_MEDIA_PLAYER, "blaah");
return s;
return prefs.getString(PREF_MEDIA_PLAYER, PREF_MEDIA_PLAYER_EXOPLAYER);
}
public static boolean useSonic() {

View File

@ -25,7 +25,7 @@ public enum SortOrder {
SMART_SHUFFLE_NEW_OLD(105, INTER_FEED);
public enum Scope {
INTRA_FEED, INTER_FEED;
INTRA_FEED, INTER_FEED
}
public final int code;