Showing
1 changed file
with
2 additions
and
2 deletions
| @@ -144,8 +144,8 @@ class MobileScannerHandler( | @@ -144,8 +144,8 @@ class MobileScannerHandler( | ||
| 144 | var barcodeScannerOptions: BarcodeScannerOptions? = null | 144 | var barcodeScannerOptions: BarcodeScannerOptions? = null |
| 145 | if (formats != null) { | 145 | if (formats != null) { |
| 146 | val formatsList: MutableList<Int> = mutableListOf() | 146 | val formatsList: MutableList<Int> = mutableListOf() |
| 147 | - for (index in formats) { | ||
| 148 | - formatsList.add(BarcodeFormats.values()[index].intValue) | 147 | + for (formatValue in formats) { |
| 148 | + formatsList.add(BarcodeFormats.fromRawValue(formatValue).intValue) | ||
| 149 | } | 149 | } |
| 150 | barcodeScannerOptions = if (formatsList.size == 1) { | 150 | barcodeScannerOptions = if (formatsList.size == 1) { |
| 151 | BarcodeScannerOptions.Builder().setBarcodeFormats(formatsList.first()) | 151 | BarcodeScannerOptions.Builder().setBarcodeFormats(formatsList.first()) |
-
Please register or login to post a comment