fix(android): build warnings (#4058)

This commit is contained in:
Krzysztof Moch 2024-08-07 14:39:41 +02:00 committed by GitHub
parent 6c03d0a700
commit 899bb822a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,7 @@
package com.brentvatne.common.api package com.brentvatne.common.api
import androidx.annotation.IntDef import androidx.annotation.IntDef
import java.lang.annotation.Retention import kotlin.annotation.Retention
import java.lang.annotation.RetentionPolicy
internal object ResizeMode { internal object ResizeMode {
/** /**
@ -42,7 +41,7 @@ internal object ResizeMode {
else -> RESIZE_MODE_FIT else -> RESIZE_MODE_FIT
} }
@Retention(RetentionPolicy.SOURCE) @Retention(AnnotationRetention.SOURCE)
@IntDef( @IntDef(
RESIZE_MODE_FIT, RESIZE_MODE_FIT,
RESIZE_MODE_FIXED_WIDTH, RESIZE_MODE_FIXED_WIDTH,

View File

@ -209,7 +209,7 @@ class VideoEventEmitter {
putArray( putArray(
"metadata", "metadata",
Arguments.createArray().apply { Arguments.createArray().apply {
metadataArrayList.forEachIndexed { i, metadata -> metadataArrayList.forEachIndexed { _, metadata ->
pushMap( pushMap(
Arguments.createMap().apply { Arguments.createMap().apply {
putString("identifier", metadata.identifier) putString("identifier", metadata.identifier)
@ -303,7 +303,7 @@ class VideoEventEmitter {
private fun videoTracksToArray(videoTracks: java.util.ArrayList<VideoTrack>?): WritableArray = private fun videoTracksToArray(videoTracks: java.util.ArrayList<VideoTrack>?): WritableArray =
Arguments.createArray().apply { Arguments.createArray().apply {
videoTracks?.forEachIndexed { i, vTrack -> videoTracks?.forEachIndexed { _, vTrack ->
pushMap( pushMap(
Arguments.createMap().apply { Arguments.createMap().apply {
putInt("width", vTrack.width) putInt("width", vTrack.width)

View File

@ -42,6 +42,7 @@ class VideoManagerModule(reactContext: ReactApplicationContext?) : ReactContextB
} }
@ReactMethod @ReactMethod
@Suppress("UNUSED_PARAMETER") // codegen compatibility
fun seekCmd(reactTag: Int, time: Float, tolerance: Float) { fun seekCmd(reactTag: Int, time: Float, tolerance: Float) {
performOnPlayerView(reactTag) { performOnPlayerView(reactTag) {
it?.seekTo((time * 1000f).roundToInt().toLong()) it?.seekTo((time * 1000f).roundToInt().toLong())