From 84db56f82bb3f3522308275a577426cb27a65b47 Mon Sep 17 00:00:00 2001 From: Ezequiel Date: Sun, 11 Oct 2020 13:05:02 -0300 Subject: [PATCH] Fix 'Visit website' button crashes app if there is no browser installed (#4520) --- .../adapter/actionbutton/VisitWebsiteActionButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/VisitWebsiteActionButton.java b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/VisitWebsiteActionButton.java index 46712a666..7b8659968 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/VisitWebsiteActionButton.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/VisitWebsiteActionButton.java @@ -8,6 +8,7 @@ import androidx.annotation.AttrRes; import androidx.annotation.StringRes; import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.FeedItem; +import de.danoeh.antennapod.core.util.IntentUtils; public class VisitWebsiteActionButton extends ItemActionButton { @@ -29,8 +30,7 @@ public class VisitWebsiteActionButton extends ItemActionButton { @Override public void onClick(Context context) { - Uri uri = Uri.parse(item.getLink()); - context.startActivity(new Intent(Intent.ACTION_VIEW, uri)); + IntentUtils.openInBrowser(context, item.getLink()); } @Override