Skip to content

Commit

Permalink
Update ScreenBrightnessAndroidPlugin.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
bugrevealingbme authored Dec 14, 2024
1 parent c40d595 commit c278248
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,11 @@ class ScreenBrightnessAndroidPlugin : FlutterPlugin, MethodCallHandler, Activity

private fun isSystemSettingPermissionGranted(result: MethodChannel.Result): Boolean {
val context = activity.applicationContext
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val canWrite = Settings.System.canWrite(context)
result.success(canWrite)
canWrite
} else {
result.success(true)
true
}
}

Expand Down

0 comments on commit c278248

Please sign in to comment.