Skip to content

Commit

Permalink
[flutter_local_notifications] Fix native stacktraces for Android (#2103)
Browse files Browse the repository at this point in the history
* Fix native stacktraces

* Pass stacktrace in details

* Google Java Format

* Update flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java

* Update flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java

---------

Co-authored-by: github-actions <>
  • Loading branch information
ueman committed Jan 22, 2024
1 parent e302b27 commit 884244f
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,10 @@ private void getActiveNotifications(Result result) {
}
result.success(activeNotificationsPayload);
} catch (Throwable e) {
result.error(UNSUPPORTED_OS_VERSION_ERROR_CODE, e.getMessage(), e.getStackTrace());
result.error(
UNSUPPORTED_OS_VERSION_ERROR_CODE,
e.getMessage(),
android.util.Log.getStackTraceString(e));
}
}

Expand Down Expand Up @@ -1963,7 +1966,9 @@ private void getActiveNotificationMessagingStyle(MethodCall call, Result result)
result.success(stylePayload);
} catch (Throwable e) {
result.error(
GET_ACTIVE_NOTIFICATION_MESSAGING_STYLE_ERROR_CODE, e.getMessage(), e.getStackTrace());
GET_ACTIVE_NOTIFICATION_MESSAGING_STYLE_ERROR_CODE,
e.getMessage(),
android.util.Log.getStackTraceString(e));
}
}

Expand Down Expand Up @@ -2024,7 +2029,10 @@ private void getNotificationChannels(Result result) {
}
result.success(channelsPayload);
} catch (Throwable e) {
result.error(GET_NOTIFICATION_CHANNELS_ERROR_CODE, e.getMessage(), e.getStackTrace());
result.error(
GET_NOTIFICATION_CHANNELS_ERROR_CODE,
e.getMessage(),
android.util.Log.getStackTraceString(e));
}
}

Expand Down

0 comments on commit 884244f

Please sign in to comment.