Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2024-08-08 12:54:09 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6b06c5dadc11cb4107898c8043cebc36fd6ec403
6b06c5da
1 parent
ee336cd0
let the dispose method delegate to stop() on Android
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
View file @
6b06c5d
...
...
@@ -170,16 +170,6 @@ class MobileScanner(
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true)
}
/**
* Create a barcode scanner from the given options.
*
* Can be overridden in tests.
*/
@VisibleForTesting
fun createBarcodeScanner(options: BarcodeScannerOptions?) : BarcodeScanner {
return if (options == null) BarcodeScanning.getClient() else BarcodeScanning.getClient(options)
}
// scales the scanWindow to the provided inputImage and checks if that scaled
// scanWindow contains the barcode
private fun isBarcodeInScanWindow(
...
...
@@ -512,7 +502,10 @@ class MobileScanner(
* Dispose of this scanner instance.
*/
fun dispose() {
scanner?.close()
scanner = null
if (isStopped()) {
return
}
stop() // Defer to the stop method, which disposes all resources anyway.
}
}
...
...
Please
register
or
login
to post a comment