Skip to content

Commit 2d34233

Browse files
authored
fix(jni): update proguard rules (#3036)
* Update proguard rules * Update * Update CHANGELOG
1 parent 6ba4675 commit 2d34233

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### Unreleased
4+
5+
### Fixes
6+
7+
- Replay JNI usage with `SentryFlutterPlugin` ([#3036](https://github.com/getsentry/sentry-dart/pull/3036))
8+
39
## 9.3.0
410

511
### Breaking Change (Tooling)

flutter/android/proguard-rules.pro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
-keep class io.sentry.flutter.** { *; }
22

3+
# Keep replay integration classes used by JNI
4+
-keep class io.sentry.android.replay.** { *; }
5+
6+
# Keep bitmap classes used by JNI
7+
-keep class android.graphics.Bitmap { *; }
8+
-keep class android.graphics.Bitmap$Config { *; }
9+
310
# To ensure that stack traces is unambiguous
411
# https://developer.android.com/studio/build/shrink-code#decode-stack-trace
512
-keepattributes LineNumberTable,SourceFile

flutter/lib/src/native/java/android_replay_recorder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class _AndroidNativeReplayWorker {
140140
// Android Bitmap creation is a bit costly so we reuse it between captures.
141141
native.Bitmap? bitmap;
142142

143-
final _nativeReplay = native.SentryFlutterPlugin$Companion(null)
143+
final _nativeReplay = native.SentryFlutterPlugin.Companion
144144
.privateSentryGetReplayIntegration()!;
145145

146146
receivePort.listen((message) {

0 commit comments

Comments
 (0)