Commit a155edc5 by olly Committed by Oliver Woodman

Hide subtitles when switching player in SimpleExoPlayerView

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177941993
parent 2b317234
......@@ -425,6 +425,9 @@ public final class SimpleExoPlayerView extends FrameLayout {
if (shutterView != null) {
shutterView.setVisibility(VISIBLE);
}
if (subtitleView != null) {
subtitleView.setCues(null);
}
if (player != null) {
if (surfaceView instanceof TextureView) {
player.setVideoTextureView((TextureView) surfaceView);
......
......@@ -19,6 +19,7 @@ import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
......@@ -87,9 +88,9 @@ public final class SubtitleView extends View implements TextOutput {
/**
* Sets the cues to be displayed by the view.
*
* @param cues The cues to display.
* @param cues The cues to display, or null to clear the cues.
*/
public void setCues(List<Cue> cues) {
public void setCues(@Nullable List<Cue> cues) {
if (this.cues == cues) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment