diff --git a/android/src/main/kotlin/de/mintware/barcode_scan/ActivityHelper.kt b/android/src/main/kotlin/de/mintware/barcode_scan/ActivityHelper.kt index 48adf82..bac5b00 100644 --- a/android/src/main/kotlin/de/mintware/barcode_scan/ActivityHelper.kt +++ b/android/src/main/kotlin/de/mintware/barcode_scan/ActivityHelper.kt @@ -69,8 +69,8 @@ class ActivityHelper(private var applicationContext: Context?, } override fun onRequestPermissionsResult(requestCode: Int, - permissions: Array?, - grantResults: IntArray? + permissions: Array, + grantResults: IntArray ): Boolean { if (!permissionResultMap.containsKey(requestCode)) { return false diff --git a/android/src/main/kotlin/de/mintware/barcode_scan/ChannelHandler.kt b/android/src/main/kotlin/de/mintware/barcode_scan/ChannelHandler.kt index c7d4661..a1c0608 100644 --- a/android/src/main/kotlin/de/mintware/barcode_scan/ChannelHandler.kt +++ b/android/src/main/kotlin/de/mintware/barcode_scan/ChannelHandler.kt @@ -56,7 +56,7 @@ class ChannelHandler(private val activityHelper: ActivityHelper result.success(activityHelper.requestCameraAccessIfNecessary(sink)) } - fun startListening(messenger: BinaryMessenger?) { + fun startListening(messenger: BinaryMessenger) { if (methodChannel != null) { stopListening() } diff --git a/android/src/main/kotlin/de/mintware/barcode_scan/RequestCameraPermissionHandler.kt b/android/src/main/kotlin/de/mintware/barcode_scan/RequestCameraPermissionHandler.kt index 53691c7..997df6d 100644 --- a/android/src/main/kotlin/de/mintware/barcode_scan/RequestCameraPermissionHandler.kt +++ b/android/src/main/kotlin/de/mintware/barcode_scan/RequestCameraPermissionHandler.kt @@ -9,8 +9,8 @@ class RequestCameraPermissionHandler(private val sink: EventChannel.EventSink? ) : PluginRegistry.RequestPermissionsResultListener { override fun onRequestPermissionsResult(requestCode: Int, - permissions: Array?, - grantResults: IntArray? + permissions: Array, + grantResults: IntArray ): Boolean { if (requestCode != REQ_CAMERA_PERMISSION) { return false @@ -30,7 +30,7 @@ class RequestCameraPermissionHandler(private val sink: EventChannel.EventSink? * @see onRequestPermissionsResult */ - private fun verifyPermissions(grantResults: IntArray?): Boolean { + private fun verifyPermissions(grantResults: IntArray): Boolean { if (grantResults == null) { return false }