diff options
author | Tobias Preuss <tobias.preuss@googlemail.com> | 2020-07-25 13:46:27 +0200 |
---|---|---|
committer | Tobias Preuss <tobias.preuss@googlemail.com> | 2020-07-26 16:52:32 +0200 |
commit | 10db0f3d11e46f60e66748e3a1b1a27bbdbbf828 (patch) | |
tree | 0bea4269ed6103c1cf44a3cc063438a30e023a91 /core | |
parent | 68d38a0b58becc125da8e752a784f6149bfa93bb (diff) | |
download | AntennaPod-10db0f3d11e46f60e66748e3a1b1a27bbdbbf828.zip |
Replace deprecated "Html#fromHtml" with "HtmlCompat#fromHtml".
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java index e85d5fae1..0c0561279 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomText.java @@ -1,7 +1,7 @@ package de.danoeh.antennapod.core.syndication.namespace.atom; -import android.os.Build; -import android.text.Html; +import androidx.core.text.HtmlCompat; + import de.danoeh.antennapod.core.syndication.namespace.Namespace; import de.danoeh.antennapod.core.syndication.namespace.SyndElement; @@ -24,11 +24,7 @@ public class AtomText extends SyndElement { if (type == null) { return content; } else if (type.equals(TYPE_HTML)) { - if (Build.VERSION.SDK_INT >= 24) { - return Html.fromHtml(content, Html.FROM_HTML_MODE_LEGACY).toString(); - } else { - return Html.fromHtml(content).toString(); - } + return HtmlCompat.fromHtml(content, HtmlCompat.FROM_HTML_MODE_LEGACY).toString(); } else if (type.equals(TYPE_XHTML)) { return content; } else { // Handle as text by default |