chore(android): fix various warning (#3625)
This commit is contained in:
parent
e87c14a437
commit
d3cc0d0c5a
@ -6,6 +6,7 @@ import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.media3.common.util.Util;
|
||||
import androidx.media3.datasource.RawResourceDataSource;
|
||||
import androidx.media3.exoplayer.DefaultLoadControl;
|
||||
@ -15,7 +16,6 @@ import com.brentvatne.common.api.SubtitleStyle;
|
||||
import com.brentvatne.common.react.VideoEventEmitter;
|
||||
import com.brentvatne.common.toolbox.DebugLog;
|
||||
import com.brentvatne.common.toolbox.ReactBridgeUtils;
|
||||
import com.facebook.react.bridge.Dynamic;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.common.MapBuilder;
|
||||
@ -91,19 +91,21 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
private static final String PROP_SHUTTER_COLOR = "shutterColor";
|
||||
private static final String PROP_DEBUG = "debug";
|
||||
|
||||
private ReactExoplayerConfig config;
|
||||
private final ReactExoplayerConfig config;
|
||||
|
||||
public ReactExoplayerViewManager(ReactExoplayerConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getName() {
|
||||
return REACT_CLASS;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected ReactExoplayerView createViewInstance(ThemedReactContext themedReactContext) {
|
||||
protected ReactExoplayerView createViewInstance(@NonNull ThemedReactContext themedReactContext) {
|
||||
return new ReactExoplayerView(themedReactContext, config);
|
||||
}
|
||||
|
||||
@ -197,9 +199,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
|
||||
}
|
||||
if (identifier > 0) {
|
||||
Uri srcUri = RawResourceDataSource.buildRawResourceUri(identifier);
|
||||
if (srcUri != null) {
|
||||
videoView.setRawSrc(srcUri, extension);
|
||||
}
|
||||
videoView.setRawSrc(srcUri, extension);
|
||||
} else {
|
||||
videoView.clearSrc();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user