diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java b/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java index 647ab911f..459cd2478 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBReaderTest.java @@ -368,7 +368,6 @@ public class DBReaderTest { @Test public void testGetFeedItemlistCheckChaptersFalse() throws Exception { - Context context = InstrumentationRegistry.getTargetContext(); List feeds = DBTestUtils.saveFeedlist(10, 10, false, false, 0); for (Feed feed : feeds) { for (FeedItem item : feed.getItems()) { diff --git a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java index 8e16d1a3b..e95f0990e 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java @@ -98,15 +98,6 @@ public class UITestUtils { return String.format("%s/files/%d", server.getBaseUrl(), id); } - private File newBitmapFile(String name) throws IOException { - File imgFile = new File(destDir, name); - Bitmap bitmap = Bitmap.createBitmap(128, 128, Bitmap.Config.ARGB_8888); - FileOutputStream out = new FileOutputStream(imgFile); - bitmap.compress(Bitmap.CompressFormat.PNG, 1, out); - out.close(); - return imgFile; - } - private File newMediaFile(String name) throws IOException { File mediaFile = new File(hostedMediaDir, name); if (mediaFile.exists()) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java index 8b87d7c54..c2076c669 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java @@ -507,17 +507,6 @@ public final class DBReader { } } - /** - * Loads the download log for a particular feed from the database. - * - * @param feed Feed for which the download log is loaded - * @return A list with DownloadStatus objects that represent the feed's download log, - * newest events first. - */ - public static List getFeedDownloadLog(Feed feed) { - return getFeedDownloadLog(feed.getId()); - } - /** * Loads the download log for a particular feed from the database. * diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java index c4a06efa2..20067624b 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java @@ -379,18 +379,6 @@ public final class DBTasks { return result; } - /** - * Loads the queue from the database and checks if the specified FeedItem is in the queue. - * This method should NOT be executed in the GUI thread. - * - * @param context Used for accessing the DB. - * @param feedItemId ID of the FeedItem - */ - public static boolean isInQueue(Context context, final long feedItemId) { - LongList queue = DBReader.getQueueIDList(); - return queue.contains(feedItemId); - } - private static Feed searchFeedByIdentifyingValueOrID(PodDBAdapter adapter, Feed feed) { if (feed.getId() != 0) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java index 1aff73564..ce8342d57 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java @@ -904,49 +904,6 @@ public class PodDBAdapter { null, null); } - /** - * Returns a cursor for a DB query in the FeedImages table for given IDs. - * - * @param imageIds IDs of the images - * @return The cursor of the query - */ - public final Cursor getImageCursor(String... imageIds) { - int length = imageIds.length; - if (length > IN_OPERATOR_MAXIMUM) { - Log.w(TAG, "Length of id array is larger than " - + IN_OPERATOR_MAXIMUM + ". Creating multiple cursors"); - int numCursors = (int) (((double) length) / (IN_OPERATOR_MAXIMUM)) + 1; - Cursor[] cursors = new Cursor[numCursors]; - for (int i = 0; i < numCursors; i++) { - int neededLength; - String[] parts; - final int elementsLeft = length - i * IN_OPERATOR_MAXIMUM; - - if (elementsLeft >= IN_OPERATOR_MAXIMUM) { - neededLength = IN_OPERATOR_MAXIMUM; - parts = Arrays.copyOfRange(imageIds, i - * IN_OPERATOR_MAXIMUM, (i + 1) - * IN_OPERATOR_MAXIMUM); - } else { - neededLength = elementsLeft; - parts = Arrays.copyOfRange(imageIds, i - * IN_OPERATOR_MAXIMUM, (i * IN_OPERATOR_MAXIMUM) - + neededLength); - } - - cursors[i] = db.rawQuery("SELECT * FROM " - + TABLE_NAME_FEED_IMAGES + " WHERE " + KEY_ID + " IN " - + buildInOperator(neededLength), parts); - } - Cursor result = new MergeCursor(cursors); - result.moveToFirst(); - return result; - } else { - return db.query(TABLE_NAME_FEED_IMAGES, null, KEY_ID + " IN " - + buildInOperator(length), imageIds, null, null, null); - } - } - public final Cursor getSimpleChaptersOfFeedItemCursor(final FeedItem item) { return db.query(TABLE_NAME_SIMPLECHAPTERS, null, KEY_FEEDITEM + "=?", new String[]{String.valueOf(item.getId())}, null,