diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-20 01:49:15 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-20 01:49:15 +0100 |
commit | 9f9ddad685e4291376fca35b420c07475571b789 (patch) | |
tree | 21ed71f0283d0599d2f39d9d9c62149a2718b8af /app/src | |
parent | dd6f8908872444f0814371d9e02182be88972a26 (diff) | |
download | AntennaPod-9f9ddad685e4291376fca35b420c07475571b789.zip |
Prevent WebView segfault
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java | 7 |
1 files changed, 3 insertions, 4 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 6c9473176..f270dc22d 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java @@ -112,11 +112,10 @@ public class ItemDescriptionFragment extends Fragment implements AudioplayerCont Bundle savedInstanceState) { Log.d(TAG, "Creating view"); webvDescription = new WebView(getActivity()); + if (Build.VERSION.SDK_INT >= 11) { + webvDescription.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + } if (UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) { - if (Build.VERSION.SDK_INT >= 11 - && Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { - webvDescription.setLayerType(View.LAYER_TYPE_SOFTWARE, null); - } webvDescription.setBackgroundColor(getResources().getColor(R.color.black)); } webvDescription.getSettings().setUseWideViewPort(false); |