From a266828d74c6db2f673930756048f68300de111c Mon Sep 17 00:00:00 2001 From: YangJH Date: Sun, 30 Jun 2024 03:13:48 +0900 Subject: [PATCH] fix(android): fix lint error --- .../react/VideoDecoderPropertiesModule.kt | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/android/src/main/java/com/brentvatne/react/VideoDecoderPropertiesModule.kt b/android/src/main/java/com/brentvatne/react/VideoDecoderPropertiesModule.kt index 9e5bd8b15a..a006d3d479 100644 --- a/android/src/main/java/com/brentvatne/react/VideoDecoderPropertiesModule.kt +++ b/android/src/main/java/com/brentvatne/react/VideoDecoderPropertiesModule.kt @@ -1,17 +1,15 @@ -package com.brentvatne.react; +package com.brentvatne.react -import android.media.MediaCodecList; -import android.media.MediaDrm; -import android.media.MediaFormat; -import android.media.UnsupportedSchemeException; -import android.os.Build; - -import com.facebook.react.bridge.Promise; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactContextBaseJavaModule; -import com.facebook.react.bridge.ReactMethod; - -import java.util.UUID; +import android.media.MediaCodecList +import android.media.MediaDrm +import android.media.MediaFormat +import android.media.UnsupportedSchemeException +import android.os.Build +import com.facebook.react.bridge.Promise +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.bridge.ReactContextBaseJavaModule +import com.facebook.react.bridge.ReactMethod +import java.util.UUID class VideoDecoderPropertiesModule(reactContext: ReactApplicationContext?) : ReactContextBaseJavaModule(reactContext) { override fun getName(): String = REACT_CLASS @@ -23,8 +21,6 @@ class VideoDecoderPropertiesModule(reactContext: ReactApplicationContext?) : Rea p.resolve(widevineLevel) return } - val WIDEVINE_UUID = UUID(-0x121074568629b532L, -0x5c37d8232ae2de13L) - val SECURITY_LEVEL_PROPERTY = "securityLevel" try { val mediaDrm = MediaDrm(WIDEVINE_UUID) val securityProperty = mediaDrm.getPropertyString(SECURITY_LEVEL_PROPERTY) @@ -69,6 +65,8 @@ class VideoDecoderPropertiesModule(reactContext: ReactApplicationContext?) : Rea fun isHEVCSupported(p: Promise) = isCodecSupported("video/hevc", 1920, 1080, p) companion object { - private const val REACT_CLASS = "VideoDecoderProperties" + private val WIDEVINE_UUID = UUID(-0x121074568629b532L, -0x5c37d8232ae2de13L) + private const val SECURITY_LEVEL_PROPERTY = "securityLevel" + private const val REACT_CLASS = "VideoManager" } }