Update SubtitleWebView to use center alignment by default

This mimics the behaviour of SubtitleTextView for cues that don't have
alignment set.

PiperOrigin-RevId: 309389392
This commit is contained in:
ibaker 2020-05-01 12:33:00 +01:00 committed by Oliver Woodman
parent 0774ee1da9
commit 222231dd8e

View file

@ -318,17 +318,16 @@ import java.util.List;
private static String convertAlignmentToCss(@Nullable Layout.Alignment alignment) {
if (alignment == null) {
return "unset";
return "center";
}
switch (alignment) {
case ALIGN_NORMAL:
return "start";
case ALIGN_CENTER:
return "center";
case ALIGN_OPPOSITE:
return "end";
case ALIGN_CENTER:
default:
return "unset";
return "center";
}
}