diff options
author | ByteHamster <info@bytehamster.com> | 2019-05-27 13:06:52 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-05-27 13:06:52 +0200 |
commit | 2d5995d1a5fb17ae312f5e6b92d5b65c58ca736c (patch) | |
tree | c1ddf4d64f12560db9a39230a75e5dc3beff1dc7 | |
parent | 5ea11ca748c083808420bda1e527595a7579c644 (diff) | |
download | AntennaPod-2d5995d1a5fb17ae312f5e6b92d5b65c58ca736c.zip |
Allow mixed content
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java | 6 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java index ed591d21c..5cf2c5eeb 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java @@ -10,6 +10,7 @@ import android.content.SharedPreferences; import android.content.res.TypedArray; import android.graphics.Color; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; @@ -61,7 +62,6 @@ public class ItemDescriptionFragment extends Fragment { private String selectedURL; - @SuppressLint("NewApi") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -81,6 +81,10 @@ public class ItemDescriptionFragment extends Fragment { webvDescription.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); // Use cached resources, even if they have expired } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + webvDescription.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); + } + webvDescription.getSettings().setUseWideViewPort(false); webvDescription.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN); webvDescription.getSettings().setLoadWithOverviewMode(true); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index 2b8b2aa33..79b15a112 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -198,6 +198,9 @@ public class ItemFragment extends Fragment implements OnSwipeGesture { webvDescription.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); // Use cached resources, even if they have expired } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + webvDescription.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); + } webvDescription.getSettings().setUseWideViewPort(false); webvDescription.getSettings().setLayoutAlgorithm( WebSettings.LayoutAlgorithm.NARROW_COLUMNS); |