Skip to content

Commit

Permalink
Fix: addBreadcrumb throws on Android API < 24 because of NewApi usage (
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Jul 4, 2022
1 parent 79144ff commit b38e03b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Unreleased

- [`sentry_dio`](https://pub.dev/packages/sentry_dio) is promoted to GA and not experimental anymore ([#914](https://github.com/getsentry/sentry-dart/pull/914))
* Fix: addBreadcrumb throws on Android API < 24 because of NewApi usage ([#923](https://github.com/getsentry/sentry-dart/pull/923))
* [`sentry_dio`](https://pub.dev/packages/sentry_dio) is promoted to GA and not experimental anymore ([#914](https://github.com/getsentry/sentry-dart/pull/914))

### Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class SentryFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
(user["ip_address"] as? String)?.let { userInstance.ipAddress = it }
(user["extras"] as? Map<String, Any?>)?.let { extras ->
val others = mutableMapOf<String, String>()
extras.forEach { key, value ->
for ((key, value) in extras.entries) {
if (value != null) {
others[key] = value.toString()
}
Expand Down Expand Up @@ -311,7 +311,7 @@ class SentryFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
}
}
(breadcrumb["data"] as? Map<String, Any?>)?.let { data ->
data.forEach { key, value ->
for ((key, value) in data.entries) {
breadcrumbInstance.data[key] = value
}
}
Expand Down

0 comments on commit b38e03b

Please sign in to comment.