fixed performance class check
This commit is contained in:
parent
43635df075
commit
2f2a9293bd
1 changed files with 5 additions and 2 deletions
|
@ -22,8 +22,11 @@ class DeviceHandler : MethodCallHandler {
|
|||
|
||||
private fun getPerformanceClass(@Suppress("UNUSED_PARAMETER") call: MethodCall, result: MethodChannel.Result) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
result.success(Build.VERSION.MEDIA_PERFORMANCE_CLASS)
|
||||
return
|
||||
val performanceClass = Build.VERSION.MEDIA_PERFORMANCE_CLASS
|
||||
if (performanceClass > 0) {
|
||||
result.success(performanceClass)
|
||||
return
|
||||
}
|
||||
}
|
||||
result.success(Build.VERSION.SDK_INT)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue