fix: Fix hot-reload crash caused by Frame Processor Runtime being initialized twice (#258)

* Fix Frame Processor Runtime being initialized twice causing a hot-reload to crash

* Remove unnecessary `HasRegisteredPlugins` singleton

* make non-optional

* `REACT_CLASS` -> `TAG`

* fix nullable
This commit is contained in:
Marc Rousavy
2021-07-07 15:00:32 +02:00
committed by GitHub
parent d3a8b49f9b
commit 2f889f5855
4 changed files with 24 additions and 31 deletions

View File

@@ -113,7 +113,7 @@ class CameraView(context: Context) : FrameLayout(context), LifecycleOwner {
private var maxZoom: Float = 1f
@DoNotStrip
private var mHybridData: HybridData?
private var mHybridData: HybridData
@Suppress("LiftReturnOrAssignment", "RedundantIf")
internal val fallbackToSnapshot: Boolean
@@ -185,7 +185,7 @@ class CameraView(context: Context) : FrameLayout(context), LifecycleOwner {
}
fun finalize() {
mHybridData?.resetNative()
mHybridData.resetNative()
}
private external fun initHybrid(): HybridData
@@ -478,7 +478,6 @@ class CameraView(context: Context) : FrameLayout(context), LifecycleOwner {
const val TAG_PERF = "CameraView.performance"
private val propsThatRequireSessionReconfiguration = arrayListOf("cameraId", "format", "fps", "hdr", "lowLightBoost", "photo", "video", "frameProcessorFps")
private val arrayListOfZoom = arrayListOf("zoom")
}
}