From 04d325331b0740e95d80fba59a0361e5ac52202e Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 20 Jan 2020 14:59:58 +0000 Subject: [PATCH] Add default to switch in TtmlDecoder Also de-dupe a couple of case statements PiperOrigin-RevId: 290610993 --- .../google/android/exoplayer2/text/ttml/TtmlDecoder.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java b/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java index 6dabcdd904..4bba366e44 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java @@ -488,20 +488,19 @@ public final class TtmlDecoder extends SimpleSubtitleDecoder { case TtmlNode.ATTR_TTS_TEXT_ALIGN: switch (Util.toLowerInvariant(attributeValue)) { case TtmlNode.LEFT: - style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_NORMAL); - break; case TtmlNode.START: style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_NORMAL); break; case TtmlNode.RIGHT: - style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_OPPOSITE); - break; case TtmlNode.END: style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_OPPOSITE); break; case TtmlNode.CENTER: style = createIfNull(style).setTextAlign(Layout.Alignment.ALIGN_CENTER); break; + default: + // ignore + break; } break; case TtmlNode.ATTR_TTS_TEXT_DECORATION: