Don't propagate attrs into child SubtitleOutput from SubtitleView

#minor-release

PiperOrigin-RevId: 382763308
This commit is contained in:
ibaker 2021-07-02 18:09:18 +01:00 committed by kim-vde
parent 5e4056eb4c
commit 3bd662eb9a
2 changed files with 4 additions and 1 deletions

View File

@ -69,6 +69,9 @@
* Fix `StyledPlayerView` and `StyledPlayerControlView` popup menu items * Fix `StyledPlayerView` and `StyledPlayerControlView` popup menu items
not expanding to occupy the full width of the popup not expanding to occupy the full width of the popup
([#9086](https://github.com/google/ExoPlayer/issues/9086)). ([#9086](https://github.com/google/ExoPlayer/issues/9086)).
* Don't propagate `AttributeSet` from `SubtitleView` constructor into
`CanvasSubtitleOutput`. Just passing the `Context` is enough, and
ensures programmatic changes to the `SubtitleView` will propagate down.
* Video: * Video:
* Fix `IncorrectContextUseViolation` strict mode warning on Android 11 * Fix `IncorrectContextUseViolation` strict mode warning on Android 11
([#8246](https://github.com/google/ExoPlayer/pull/8246)). ([#8246](https://github.com/google/ExoPlayer/pull/8246)).

View File

@ -140,7 +140,7 @@ public final class SubtitleView extends FrameLayout implements TextOutput {
applyEmbeddedStyles = true; applyEmbeddedStyles = true;
applyEmbeddedFontSizes = true; applyEmbeddedFontSizes = true;
CanvasSubtitleOutput canvasSubtitleOutput = new CanvasSubtitleOutput(context, attrs); CanvasSubtitleOutput canvasSubtitleOutput = new CanvasSubtitleOutput(context);
output = canvasSubtitleOutput; output = canvasSubtitleOutput;
innerSubtitleView = canvasSubtitleOutput; innerSubtitleView = canvasSubtitleOutput;
addView(innerSubtitleView); addView(innerSubtitleView);