Merge pull request #1822 from google/dev-v2

Fix crash on pre-api-21 devices.
This commit is contained in:
ojw28 2016-09-14 20:19:39 +01:00 committed by GitHub
commit 7d991cef30
2 changed files with 6 additions and 8 deletions

View file

@ -97,7 +97,11 @@ public class PlaybackControlView extends FrameLayout {
}
public PlaybackControlView(Context context, AttributeSet attrs) {
super(context, attrs);
this(context, attrs, 0);
}
public PlaybackControlView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
currentWindow = new Timeline.Window();
formatBuilder = new StringBuilder();

View file

@ -64,12 +64,7 @@ public final class SimpleExoPlayerView extends FrameLayout {
}
public SimpleExoPlayerView(Context context, AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, 0);
}
public SimpleExoPlayerView(Context context, AttributeSet attrs, int defStyleAttr,
int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
super(context, attrs, defStyleAttr);
boolean useTextureView = false;
if (attrs != null) {
@ -86,7 +81,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
}
LayoutInflater.from(context).inflate(R.layout.exoplayer_video_view, this);
componentListener = new ComponentListener();
layout = (AspectRatioFrameLayout) findViewById(R.id.video_frame);
controller = (PlaybackControlView) findViewById(R.id.control);