Skip to content

Commit

Permalink
[Health] Fixed issue #878 (added error handling)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmatteo committed Jan 26, 2024
1 parent cbb0261 commit 2dc2bf9
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,12 @@ class HealthPlugin(private var channel: MethodChannel? = null) :

var permList = mutableListOf<String>()
for ((i, typeKey) in types.withIndex()) {
val access = permissions[i]!!
if(!MapToHCType.containsKey(typeKey)) {
Log.w("FLUTTER_HEALTH::ERROR", "Datatype " + typeKey + " not found in HC")
result.success(false)
return
}
val access = permissions[i]
val dataType = MapToHCType[typeKey]!!
if (access == 0) {
permList.add(
Expand Down Expand Up @@ -1677,6 +1682,11 @@ class HealthPlugin(private var channel: MethodChannel? = null) :

var permList = mutableListOf<String>()
for ((i, typeKey) in types.withIndex()) {
if(!MapToHCType.containsKey(typeKey)) {
Log.w("FLUTTER_HEALTH::ERROR", "Datatype " + typeKey + " not found in HC")
result.success(false)
return
}
val access = permissions[i]!!
val dataType = MapToHCType[typeKey]!!
if (access == 0) {
Expand Down

0 comments on commit 2dc2bf9

Please sign in to comment.