mirror of
https://github.com/androidx/media.git
synced 2025-05-08 16:10:38 +08:00
Fix crash on pre-api-21 devices.
The four-arg constructor didn't exist in ViewGroup for earlier API levels. I think it can probably be safely omitted, unless you know otherwise? Issue: #1820 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133156975
This commit is contained in:
parent
5512aae451
commit
ab49425e43
@ -97,7 +97,11 @@ public class PlaybackControlView extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PlaybackControlView(Context context, AttributeSet attrs) {
|
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();
|
currentWindow = new Timeline.Window();
|
||||||
formatBuilder = new StringBuilder();
|
formatBuilder = new StringBuilder();
|
||||||
|
@ -64,12 +64,7 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SimpleExoPlayerView(Context context, AttributeSet attrs, int defStyleAttr) {
|
public SimpleExoPlayerView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
this(context, attrs, defStyleAttr, 0);
|
super(context, attrs, defStyleAttr);
|
||||||
}
|
|
||||||
|
|
||||||
public SimpleExoPlayerView(Context context, AttributeSet attrs, int defStyleAttr,
|
|
||||||
int defStyleRes) {
|
|
||||||
super(context, attrs, defStyleAttr, defStyleRes);
|
|
||||||
|
|
||||||
boolean useTextureView = false;
|
boolean useTextureView = false;
|
||||||
if (attrs != null) {
|
if (attrs != null) {
|
||||||
@ -86,7 +81,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LayoutInflater.from(context).inflate(R.layout.exoplayer_video_view, this);
|
LayoutInflater.from(context).inflate(R.layout.exoplayer_video_view, this);
|
||||||
|
|
||||||
componentListener = new ComponentListener();
|
componentListener = new ComponentListener();
|
||||||
layout = (AspectRatioFrameLayout) findViewById(R.id.video_frame);
|
layout = (AspectRatioFrameLayout) findViewById(R.id.video_frame);
|
||||||
controller = (PlaybackControlView) findViewById(R.id.control);
|
controller = (PlaybackControlView) findViewById(R.id.control);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user