diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java index efdf46a97..34cfe6d05 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/Timeline.java @@ -14,6 +14,7 @@ import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; +import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -42,22 +43,22 @@ public class Timeline { private final int pageMargin; public Timeline(Context context, ShownotesProvider shownotesProvider) { - if (shownotesProvider == null) throw new IllegalArgumentException("shownotesProvider = null"); + if (shownotesProvider == null) { + throw new IllegalArgumentException("shownotesProvider = null"); + } this.shownotesProvider = shownotesProvider; noShownotesLabel = context.getString(R.string.no_shownotes_label); - TypedArray res = context.getTheme().obtainStyledAttributes( - new int[]{ android.R.attr.textColorPrimary}); + TypedArray res = context.getTheme().obtainStyledAttributes(new int[]{android.R.attr.textColorPrimary}); @ColorInt int col = res.getColor(0, 0); colorPrimaryString = "rgba(" + Color.red(col) + "," + Color.green(col) + "," + - Color.blue(col) + "," + (Color.alpha(col)/256.0) + ")"; + Color.blue(col) + "," + (Color.alpha(col) / 255.0) + ")"; res.recycle(); - res = context.getTheme().obtainStyledAttributes( - new int[]{android.R.attr.textColorSecondary}); + res = context.getTheme().obtainStyledAttributes(new int[]{android.R.attr.textColorSecondary}); col = res.getColor(0, 0); colorSecondaryString = "rgba(" + Color.red(col) + "," + Color.green(col) + "," + - Color.blue(col) + "," + (Color.alpha(col)/256.0) + ")"; + Color.blue(col) + "," + (Color.alpha(col) / 255.0) + ")"; res.recycle(); pageMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, @@ -93,9 +94,9 @@ public class Timeline { return null; } - if(TextUtils.isEmpty(shownotes)) { + if (TextUtils.isEmpty(shownotes)) { Log.d(TAG, "shownotesProvider contained no shownotes. Returning 'no shownotes' message"); - shownotes ="" + + shownotes = "" + "
" + "