Skip to content

Commit

Permalink
fix: add check to MLKitCameraView.kt in FDroid so we're sure to not i…
Browse files Browse the repository at this point in the history
…nstantiating it
  • Loading branch information
VaiTon committed Jun 19, 2022
1 parent 1b29931 commit 8d97da6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openfoodfacts.github.scrachx.openfood.features.scan
import android.view.ViewStub
import android.widget.FrameLayout
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import openfoodfacts.github.scrachx.openfood.BuildConfig

/**
* When on FDroid this class is just a stub.
Expand All @@ -16,6 +16,9 @@ class MLKitCameraView(
viewStub,
null
) {
init {
error("Could not create ${this::class.simpleName} in ${BuildConfig.BUILD_TYPE} build type.")
}

override fun onResume() = Unit
override fun stopCameraPreview() = Unit
Expand Down

0 comments on commit 8d97da6

Please sign in to comment.