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
Enguerrand_ARMINJON_MAC_2
2023-10-18 21:32:16 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e404a51ab5d017cdbe15c3f822955b1e02f46b82
e404a51a
1 parent
690a331f
fix: Null exception when getting activity display on Android API >= 30
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
View file @
e404a51
...
...
@@ -182,7 +182,7 @@ class MobileScanner(
@Suppress("deprecation")
private fun getResolution(cameraResolution: Size): Size {
val rotation = if (Build.VERSION.SDK_INT >= 30) {
activity.
applicationContext.
display!!.rotation
activity.display!!.rotation
} else {
val windowManager = activity.applicationContext.getSystemService(Context.WINDOW_SERVICE) as WindowManager
...
...
Please
register
or
login
to post a comment