Showing
1 changed file
with
3 additions
and
4 deletions
| 1 | package dev.steenbakker.mobile_scanner | 1 | package dev.steenbakker.mobile_scanner |
| 2 | 2 | ||
| 3 | import android.content.pm.PackageManager | 3 | import android.content.pm.PackageManager |
| 4 | +import dev.steenbakker.mobile_scanner.objects.MobileScannerErrorCodes | ||
| 4 | import io.flutter.plugin.common.PluginRegistry | 5 | import io.flutter.plugin.common.PluginRegistry |
| 5 | 6 | ||
| 6 | /** | 7 | /** |
| @@ -29,11 +30,9 @@ internal class MobileScannerPermissionsListener( | @@ -29,11 +30,9 @@ internal class MobileScannerPermissionsListener( | ||
| 29 | // grantResults could be empty if the permissions request with the user is interrupted | 30 | // grantResults could be empty if the permissions request with the user is interrupted |
| 30 | // https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[]) | 31 | // https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[]) |
| 31 | if (grantResults.isEmpty() || grantResults[0] != PackageManager.PERMISSION_GRANTED) { | 32 | if (grantResults.isEmpty() || grantResults[0] != PackageManager.PERMISSION_GRANTED) { |
| 32 | - resultCallback.onResult( | ||
| 33 | - MobileScannerPermissions.CAMERA_ACCESS_DENIED, | ||
| 34 | - MobileScannerPermissions.CAMERA_ACCESS_DENIED_MESSAGE) | 33 | + resultCallback.onResult(MobileScannerErrorCodes.CAMERA_ACCESS_DENIED) |
| 35 | } else { | 34 | } else { |
| 36 | - resultCallback.onResult(null, null) | 35 | + resultCallback.onResult(null) |
| 37 | } | 36 | } |
| 38 | 37 | ||
| 39 | return true | 38 | return true |
-
Please register or login to post a comment