Fix a few lint warnings
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=169830938
This commit is contained in:
parent
1f8a8dbfa3
commit
505d5cd0a4
@ -17,6 +17,7 @@ package com.google.android.exoplayer2.castdemo;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
@ -129,7 +130,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
@NonNull
|
||||
public View getView(int position, View convertView, @NonNull ViewGroup parent) {
|
||||
View view = super.getView(position, convertView, parent);
|
||||
view.setBackgroundColor(Color.WHITE);
|
||||
return view;
|
||||
|
@ -57,7 +57,6 @@ import com.google.android.gms.cast.framework.CastContext;
|
||||
|
||||
private final SimpleExoPlayerView exoPlayerView;
|
||||
private final PlaybackControlView castControlView;
|
||||
private final CastContext castContext;
|
||||
private final SimpleExoPlayer exoPlayer;
|
||||
private final CastPlayer castPlayer;
|
||||
|
||||
@ -73,14 +72,13 @@ import com.google.android.gms.cast.framework.CastContext;
|
||||
Context context) {
|
||||
this.exoPlayerView = exoPlayerView;
|
||||
this.castControlView = castControlView;
|
||||
castContext = CastContext.getSharedInstance(context);
|
||||
|
||||
DefaultTrackSelector trackSelector = new DefaultTrackSelector(BANDWIDTH_METER);
|
||||
RenderersFactory renderersFactory = new DefaultRenderersFactory(context, null);
|
||||
exoPlayer = ExoPlayerFactory.newSimpleInstance(renderersFactory, trackSelector);
|
||||
exoPlayerView.setPlayer(exoPlayer);
|
||||
|
||||
castPlayer = new CastPlayer(castContext);
|
||||
castPlayer = new CastPlayer(CastContext.getSharedInstance(context));
|
||||
castPlayer.setSessionAvailabilityListener(this);
|
||||
castControlView.setPlayer(castPlayer);
|
||||
|
||||
|
@ -109,7 +109,7 @@ import java.util.Arrays;
|
||||
private View buildView(Context context) {
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
View view = inflater.inflate(R.layout.track_selection_dialog, null);
|
||||
ViewGroup root = (ViewGroup) view.findViewById(R.id.root);
|
||||
ViewGroup root = view.findViewById(R.id.root);
|
||||
|
||||
TypedArray attributeArray = context.getTheme().obtainStyledAttributes(
|
||||
new int[] {android.R.attr.selectableItemBackground});
|
||||
|
Loading…
x
Reference in New Issue
Block a user