Fixed some lint errors
This commit is contained in:
parent
a5ee83f373
commit
4a3db25876
@ -29,7 +29,7 @@ public class GPodnetServiceTest {
|
|||||||
private static final String PW = "";
|
private static final String PW = "";
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
protected void setUp() {
|
public void setUp() {
|
||||||
service = new GpodnetService();
|
service = new GpodnetService();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public class AutoDownloadTest {
|
|||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
context = ApplicationProvider.getApplicationContext();
|
context = ApplicationProvider.getApplicationContext();
|
||||||
|
|
||||||
stubFeedsServer = new UITestUtils(context);;
|
stubFeedsServer = new UITestUtils(context);
|
||||||
stubFeedsServer.setup();
|
stubFeedsServer.setup();
|
||||||
|
|
||||||
dbTasksCallbacksOrig = ClientConfig.dbTasksCallbacks;
|
dbTasksCallbacksOrig = ClientConfig.dbTasksCallbacks;
|
||||||
@ -130,7 +130,7 @@ public class AutoDownloadTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void useDownloadAlgorithm(final AutomaticDownloadAlgorithm downloadAlgorithm) {
|
private void useDownloadAlgorithm(final AutomaticDownloadAlgorithm downloadAlgorithm) {
|
||||||
DBTasksCallbacks dbTasksCallbacksStub = new DBTasksCallbacks() {
|
ClientConfig.dbTasksCallbacks = new DBTasksCallbacks() {
|
||||||
@Override
|
@Override
|
||||||
public AutomaticDownloadAlgorithm getAutomaticDownloadAlgorithm() {
|
public AutomaticDownloadAlgorithm getAutomaticDownloadAlgorithm() {
|
||||||
return downloadAlgorithm;
|
return downloadAlgorithm;
|
||||||
@ -141,7 +141,6 @@ public class AutoDownloadTest {
|
|||||||
return dbTasksCallbacksOrig.getEpisodeCacheCleanupAlgorithm();
|
return dbTasksCallbacksOrig.getEpisodeCacheCleanupAlgorithm();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ClientConfig.dbTasksCallbacks = dbTasksCallbacksStub;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class StubDownloadAlgorithm implements AutomaticDownloadAlgorithm {
|
private class StubDownloadAlgorithm implements AutomaticDownloadAlgorithm {
|
||||||
|
@ -322,15 +322,11 @@ public class DBWriterTest {
|
|||||||
|
|
||||||
feed.setImageUrl("url");
|
feed.setImageUrl("url");
|
||||||
|
|
||||||
List<File> itemFiles = new ArrayList<>();
|
|
||||||
// create items with downloaded media files
|
// create items with downloaded media files
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed);
|
FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed);
|
||||||
feed.getItems().add(item);
|
feed.getItems().add(item);
|
||||||
|
|
||||||
File enc = new File(destFolder, "file " + i);
|
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);
|
FeedMedia media = new FeedMedia(0, item, 1, 1, 1, "mime_type", enc.getAbsolutePath(), "download_url", false, null, 0, 0);
|
||||||
item.setMedia(media);
|
item.setMedia(media);
|
||||||
}
|
}
|
||||||
@ -387,15 +383,11 @@ public class DBWriterTest {
|
|||||||
|
|
||||||
feed.setImageUrl("url");
|
feed.setImageUrl("url");
|
||||||
|
|
||||||
List<File> itemFiles = new ArrayList<>();
|
|
||||||
// create items with downloaded media files
|
// create items with downloaded media files
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed);
|
FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed);
|
||||||
feed.getItems().add(item);
|
feed.getItems().add(item);
|
||||||
|
|
||||||
File enc = new File(destFolder, "file " + i);
|
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);
|
FeedMedia media = new FeedMedia(0, item, 1, 1, 1, "mime_type", enc.getAbsolutePath(), "download_url", false, null, 0, 0);
|
||||||
item.setMedia(media);
|
item.setMedia(media);
|
||||||
}
|
}
|
||||||
|
@ -317,8 +317,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
|
|||||||
fragment = new AddFeedFragment();
|
fragment = new AddFeedFragment();
|
||||||
break;
|
break;
|
||||||
case SubscriptionFragment.TAG:
|
case SubscriptionFragment.TAG:
|
||||||
SubscriptionFragment subscriptionFragment = new SubscriptionFragment();
|
fragment = new SubscriptionFragment();
|
||||||
fragment = subscriptionFragment;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// default to the queue
|
// default to the queue
|
||||||
|
@ -144,7 +144,6 @@ public class ItemDescriptionFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextItemSelected(MenuItem item) {
|
public boolean onContextItemSelected(MenuItem item) {
|
||||||
|
@ -88,7 +88,7 @@ public class AspectRatioVideoView extends VideoView {
|
|||||||
mVideoWidth = videoWidth;
|
mVideoWidth = videoWidth;
|
||||||
mVideoHeight = videoHeight;
|
mVideoHeight = videoHeight;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* If this isn't set the video is stretched across the
|
* If this isn't set the video is stretched across the
|
||||||
* SurfaceHolders display surface (i.e. the SurfaceHolder
|
* SurfaceHolders display surface (i.e. the SurfaceHolder
|
||||||
* as the same size and the video is drawn to fit this
|
* as the same size and the video is drawn to fit this
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
tools:listitem="@layout/gpodnet_podcast_listitem" />
|
tools:listitem="@layout/gpodnet_podcast_listitem" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@id/android:empty"
|
android:id="@android:id/empty"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
|
@ -304,7 +304,7 @@ public class UserPreferences {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum EnqueueLocation {
|
public enum EnqueueLocation {
|
||||||
BACK, FRONT, AFTER_CURRENTLY_PLAYING;
|
BACK, FRONT, AFTER_CURRENTLY_PLAYING
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@ -566,8 +566,7 @@ public class UserPreferences {
|
|||||||
prefs.edit().putString(PREF_IMAGE_CACHE_SIZE, IMAGE_CACHE_DEFAULT_VALUE).apply();
|
prefs.edit().putString(PREF_IMAGE_CACHE_SIZE, IMAGE_CACHE_DEFAULT_VALUE).apply();
|
||||||
cacheSizeInt = Integer.parseInt(IMAGE_CACHE_DEFAULT_VALUE);
|
cacheSizeInt = Integer.parseInt(IMAGE_CACHE_DEFAULT_VALUE);
|
||||||
}
|
}
|
||||||
int cacheSizeMB = cacheSizeInt * 1024 * 1024;
|
return cacheSizeInt * 1024 * 1024;
|
||||||
return cacheSizeMB;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getFastForwardSecs() {
|
public static int getFastForwardSecs() {
|
||||||
@ -791,8 +790,7 @@ public class UserPreferences {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getMediaPlayer() {
|
public static String getMediaPlayer() {
|
||||||
String s = prefs.getString(PREF_MEDIA_PLAYER, "blaah");
|
return prefs.getString(PREF_MEDIA_PLAYER, PREF_MEDIA_PLAYER_EXOPLAYER);
|
||||||
return s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean useSonic() {
|
public static boolean useSonic() {
|
||||||
|
@ -25,7 +25,7 @@ public enum SortOrder {
|
|||||||
SMART_SHUFFLE_NEW_OLD(105, INTER_FEED);
|
SMART_SHUFFLE_NEW_OLD(105, INTER_FEED);
|
||||||
|
|
||||||
public enum Scope {
|
public enum Scope {
|
||||||
INTRA_FEED, INTER_FEED;
|
INTRA_FEED, INTER_FEED
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int code;
|
public final int code;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user