diff --git a/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java b/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java index 6908e2ec7..9419d2318 100644 --- a/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/handler/FeedHandlerTest.java @@ -1,6 +1,7 @@ package de.test.antennapod.handler; import android.content.Context; +import android.support.test.InstrumentationRegistry; import android.test.InstrumentationTestCase; import org.xml.sax.SAXException; @@ -36,7 +37,7 @@ public class FeedHandlerTest extends InstrumentationTestCase { protected void setUp() throws Exception { super.setUp(); - Context context = getInstrumentation().getContext(); + Context context = InstrumentationRegistry.getTargetContext(); File destDir = context.getExternalFilesDir(FEEDS_DIR); assertNotNull(destDir); diff --git a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java index afe15f1b2..8d2408b45 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java +++ b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java @@ -56,6 +56,11 @@ public class AtomGenerator implements FeedGenerator{ xml.text(feed.getDescription()); xml.endTag(null, "subtitle"); } + if (feed.getImageUrl() != null) { + xml.startTag(null, "logo"); + xml.text(feed.getImageUrl()); + xml.endTag(null, "logo"); + } if (feed.getPaymentLink() != null) { GeneratorUtil.addPaymentLink(xml, feed.getPaymentLink(), false); diff --git a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java index f2d53799d..5f8b4d18c 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java +++ b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java @@ -54,6 +54,13 @@ public class RSS2Generator implements FeedGenerator{ xml.text(feed.getLanguage()); xml.endTag(null, "language"); } + if (feed.getImageUrl() != null) { + xml.startTag(null, "image"); + xml.startTag(null, "url"); + xml.text(feed.getImageUrl()); + xml.endTag(null, "url"); + xml.endTag(null, "image"); + } if (feed.getPaymentLink() != null) { GeneratorUtil.addPaymentLink(xml, feed.getPaymentLink(), true);