diff --git a/CHANGELOG.md b/CHANGELOG.md index 927bf21f24..884fe275f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Enhancements + +- Refactor `captureReplay` and `setReplayConfig` to use FFI/JNI ([#3318](https://github.com/getsentry/sentry-dart/pull/3318)) + ## 9.8.0 ### Features diff --git a/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt b/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt index 4d47d974de..2226d64e83 100644 --- a/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt +++ b/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt @@ -61,8 +61,6 @@ class SentryFlutterPlugin : when (call.method) { "initNativeSdk" -> initNativeSdk(call, result) "closeNativeSdk" -> closeNativeSdk(result) - "setReplayConfig" -> setReplayConfig(call, result) - "captureReplay" -> captureReplay(result) else -> result.notImplemented() } } @@ -354,73 +352,4 @@ class SentryFlutterPlugin : } } } - - private fun setReplayConfig( - call: MethodCall, - result: Result, - ) { - // Since codec block size is 16, so we have to adjust the width and height to it, - // otherwise the codec might fail to configure on some devices, see - // https://cs.android.com/android/platform/superproject/+/master:frameworks/base/media/java/android/media/MediaCodecInfo.java;l=1999-2001 - val windowWidth = call.argument("windowWidth") as? Double ?: 0.0 - val windowHeight = call.argument("windowHeight") as? Double ?: 0.0 - - var width = call.argument("width") as? Double ?: 0.0 - var height = call.argument("height") as? Double ?: 0.0 - - val invalidConfig = - width == 0.0 || - height == 0.0 || - windowWidth == 0.0 || - windowHeight == 0.0 - - if (invalidConfig) { - result.error( - "5", - "Replay config is not valid: width: $width, height: $height, " + - "windowWidth: $windowWidth, windowHeight: $windowHeight", - null, - ) - return - } - - // First update the smaller dimension, as changing that will affect the screen ratio more. - if (width < height) { - val newWidth = width.adjustReplaySizeToBlockSize() - height = (height * (newWidth / width)).adjustReplaySizeToBlockSize() - width = newWidth - } else { - val newHeight = height.adjustReplaySizeToBlockSize() - width = (width * (newHeight / height)).adjustReplaySizeToBlockSize() - height = newHeight - } - - val replayConfig = - ScreenshotRecorderConfig( - recordingWidth = width.roundToInt(), - recordingHeight = height.roundToInt(), - scaleFactorX = width.toFloat() / windowWidth.toFloat(), - scaleFactorY = height.toFloat() / windowHeight.toFloat(), - frameRate = call.argument("frameRate") as? Int ?: 0, - bitRate = call.argument("bitRate") as? Int ?: 0, - ) - Log.i( - "Sentry", - "Configuring replay: %dx%d at %d FPS, %d BPS".format( - replayConfig.recordingWidth, - replayConfig.recordingHeight, - replayConfig.frameRate, - replayConfig.bitRate, - ), - ) - replay?.onConfigurationChanged(replayConfig) - result.success("") - } - - private fun captureReplay( - result: Result, - ) { - replay!!.captureReplay(isTerminating = false) - result.success(replay!!.getReplayId().toString()) - } } diff --git a/packages/flutter/example/integration_test/replay_test.dart b/packages/flutter/example/integration_test/replay_test.dart index d8eff357c2..3217a4a6f6 100644 --- a/packages/flutter/example/integration_test/replay_test.dart +++ b/packages/flutter/example/integration_test/replay_test.dart @@ -1,39 +1,217 @@ +// ignore_for_file: invalid_use_of_internal_member + +import 'dart:async'; import 'dart:io'; +import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; +import 'package:sentry_flutter_example/main.dart'; +import 'package:sentry_flutter/src/native/java/sentry_native_java.dart'; +import 'package:sentry_flutter/src/replay/replay_config.dart'; +import 'package:sentry_flutter/src/native/cocoa/sentry_native_cocoa.dart'; +import 'package:sentry_flutter/src/replay/scheduled_recorder_config.dart'; void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + IntegrationTestWidgetsFlutterBinding.instance.framePolicy = + LiveTestWidgetsFlutterBindingFramePolicy.fullyLive; + + const fakeDsn = 'https://abc@def.ingest.sentry.io/1234567'; + + tearDown(() async { + await Sentry.close(); + }); + + Future setupSentryAndApp(WidgetTester tester, {String? dsn}) async { + await setupSentry( + () async { + await tester.pumpWidget(SentryScreenshotWidget( + child: DefaultAssetBundle( + bundle: SentryAssetBundle(enableStructuredDataTracing: true), + child: const MyApp(), + ))); + }, + dsn ?? fakeDsn, + isIntegrationTest: true, + ); + } + group('Replay recording', () { - setUp(() async { - await SentryFlutter.init((options) { - // ignore: invalid_use_of_internal_member - options.automatedTestMode = true; - options.dsn = 'https://abc@def.ingest.sentry.io/1234567'; - options.debug = true; - options.replay.sessionSampleRate = 1.0; - }); + testWidgets('native binding is initialized', (tester) async { + await setupSentryAndApp(tester); + expect(SentryFlutter.native, isNotNull); }); - tearDown(() async { - await Sentry.close(); + testWidgets('supportsReplay matches platform', (tester) async { + await setupSentryAndApp(tester); + final supports = SentryFlutter.native?.supportsReplay ?? false; + expect(supports, Platform.isAndroid || Platform.isIOS ? isTrue : isFalse); }); - test('native binding is initialized', () async { - // ignore: invalid_use_of_internal_member - expect(SentryFlutter.native, isNotNull); + testWidgets('captureReplay returns a SentryId', (tester) async { + if (!(Platform.isAndroid || Platform.isIOS)) return; + await setupSentryAndApp(tester); + final id = await SentryFlutter.native?.captureReplay(); + expect(id, isA()); + if (Platform.isIOS) { + final current = SentryFlutter.native?.replayId; + expect(current?.toString(), equals(id?.toString())); + } + }); + + testWidgets('captureReplay sets native replay ID', (tester) async { + if (!(Platform.isAndroid || Platform.isIOS)) return; + await setupSentryAndApp(tester); + final id = await SentryFlutter.native?.captureReplay(); + expect(id, isA()); + expect(SentryFlutter.native?.replayId, isNotNull); + expect(SentryFlutter.native?.replayId, isNot(const SentryId.empty())); }); - test('session replay is captured', () async { - // TODO add when the beforeSend callback is implemented for replays. - }, skip: true); - - test('replay is captured on errors', () async { - // TODO we may need an HTTP server for this because Android sends replays - // in a separate envelope. - }, skip: true); - }, - skip: Platform.isAndroid - ? false - : "Replay recording is not supported on this platform"); + // We would like to add a test that ensures a native-initiated replay stop + // clears the replay ID from the scope. Currently we can't add that test + // because FFI/JNI cannot be mocked in this environment. + testWidgets('sets replay ID after capturing exception', (tester) async { + await setupSentryAndApp(tester); + + try { + throw Exception('boom'); + } catch (e, st) { + await Sentry.captureException(e, stackTrace: st); + } + + // After capture, ReplayEventProcessor should set scope.replayId + await Sentry.configureScope((scope) async { + expect( + scope.replayId == null || scope.replayId == const SentryId.empty(), + isFalse); + }); + + final current = SentryFlutter.native?.replayId; + await Sentry.configureScope((scope) async { + expect(current?.toString(), equals(scope.replayId?.toString())); + }); + }); + + testWidgets( + 'replay recorder start emits frame and stop silences frames on Android', + (tester) async { + await setupSentryAndApp(tester); + final native = SentryFlutter.native as SentryNativeJava?; + expect(native, isNotNull); + + await Future.delayed(const Duration(seconds: 2)); + final recorder = native!.testRecorder; + expect(recorder, isNotNull); + + await recorder! + .onConfigurationChanged(const ScheduledScreenshotRecorderConfig( + width: 800, + height: 600, + frameRate: 1, + )); + + var frameCount = 0; + final firstFrame = Completer(); + recorder.onScreenshotAddedForTest = () { + frameCount++; + if (!firstFrame.isCompleted) firstFrame.complete(); + }; + + await tester.pump(); + await firstFrame.future.timeout(const Duration(seconds: 5)); + + await recorder.stop(); + await tester.pump(); + final afterStopCount = frameCount; + await Future.delayed(const Duration(seconds: 2)); + expect(frameCount, equals(afterStopCount)); + }, skip: !Platform.isAndroid); + + testWidgets( + 'replay recorder pause silences and resume restarts frames on Android', + (tester) async { + await setupSentryAndApp(tester); + final native = SentryFlutter.native as SentryNativeJava?; + expect(native, isNotNull); + + await Future.delayed(const Duration(seconds: 2)); + final recorder = native!.testRecorder; + expect(recorder, isNotNull); + + await recorder! + .onConfigurationChanged(const ScheduledScreenshotRecorderConfig( + width: 800, + height: 600, + frameRate: 1, + )); + + var frameCount = 0; + final firstFrame = Completer(); + recorder.onScreenshotAddedForTest = () { + frameCount++; + if (!firstFrame.isCompleted) firstFrame.complete(); + }; + + await tester.pump(); + await firstFrame.future.timeout(const Duration(seconds: 5)); + + await recorder.pause(); + await tester.pump(); + final pausedCount = frameCount; + await Future.delayed(const Duration(seconds: 2)); + expect(frameCount, equals(pausedCount)); + + await recorder.resume(); + await tester.pump(); + final resumedBaseline = frameCount; + await Future.delayed(const Duration(seconds: 3)); + expect(frameCount, greaterThan(resumedBaseline)); + + await recorder.stop(); + await tester.pump(); + final afterStopCount = frameCount; + await Future.delayed(const Duration(seconds: 2)); + expect(frameCount, equals(afterStopCount)); + }, skip: !Platform.isAndroid); + + testWidgets('setReplayConfig applies without error on Android', + (tester) async { + await setupSentryAndApp(tester); + const config = ReplayConfig( + windowWidth: 1080, + windowHeight: 1920, + width: 800, + height: 600, + frameRate: 1, + ); + await Future.delayed(const Duration(seconds: 2)); + + // Should not throw + await SentryFlutter.native?.setReplayConfig(config); + }, skip: !Platform.isAndroid); + + testWidgets('capture screenshot via test recorder returns metadata on iOS', + (tester) async { + await setupSentryAndApp(tester); + final native = SentryFlutter.native as SentryNativeCocoa?; + expect(native, isNotNull); + + await Future.delayed(const Duration(seconds: 2)); + final json = await native!.testRecorder?.captureScreenshot(); + expect(json, isNotNull); + expect(json!['length'], isNotNull); + expect(json['address'], isNotNull); + expect(json['width'], isNotNull); + expect(json['height'], isNotNull); + expect((json['width'] as int) > 0, isTrue); + expect((json['height'] as int) > 0, isTrue); + + // Capture again to ensure subsequent captures still succeed + final json2 = await native.testRecorder?.captureScreenshot(); + expect(json2, isNotNull); + }, skip: !Platform.isIOS); + }); } diff --git a/packages/flutter/ffi-jni.yaml b/packages/flutter/ffi-jni.yaml index 203493f18d..a06d752da2 100644 --- a/packages/flutter/ffi-jni.yaml +++ b/packages/flutter/ffi-jni.yaml @@ -15,6 +15,7 @@ log_level: all classes: - io.sentry.android.core.InternalSentrySdk - io.sentry.android.replay.ReplayIntegration + - io.sentry.android.replay.ScreenshotRecorderConfig - io.sentry.flutter.SentryFlutterPlugin - io.sentry.Sentry - io.sentry.Breadcrumb @@ -22,4 +23,5 @@ classes: - io.sentry.Scope - io.sentry.ScopeCallback - io.sentry.protocol.User + - io.sentry.protocol.SentryId - android.graphics.Bitmap diff --git a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift index 50012639d9..723ec6397d 100644 --- a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift +++ b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift @@ -83,14 +83,6 @@ public class SentryFlutterPlugin: NSObject, FlutterPlugin { collectProfile(call, result) #endif - case "captureReplay": -#if canImport(UIKit) && !SENTRY_NO_UIKIT && (os(iOS) || os(tvOS)) - PrivateSentrySDKOnly.captureReplay() - result(PrivateSentrySDKOnly.getReplayId()) -#else - result(nil) -#endif - default: result(FlutterMethodNotImplemented) } @@ -274,6 +266,15 @@ public class SentryFlutterPlugin: NSObject, FlutterPlugin { // // Purpose: Called from the Flutter plugin's native bridge (FFI) - bindings are created from SentryFlutterPlugin.h + @objc public class func captureReplay() -> String? { + #if canImport(UIKit) && !SENTRY_NO_UIKIT && (os(iOS) || os(tvOS)) + PrivateSentrySDKOnly.captureReplay() + return PrivateSentrySDKOnly.getReplayId() + #else + return nil + #endif + } + #if os(iOS) // Taken from the Flutter engine: // https://github.com/flutter/engine/blob/main/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm#L150 diff --git a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterPlugin.h b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterPlugin.h index 6f2e25eb54..39ffdb81a0 100644 --- a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterPlugin.h +++ b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterPlugin.h @@ -8,5 +8,6 @@ + (nullable NSData *)fetchNativeAppStartAsBytes; + (nullable NSData *)loadContextsAsBytes; + (nullable NSData *)loadDebugImagesAsBytes:(NSSet *)instructionAddresses; ++ (nullable NSString *)captureReplay; @end #endif diff --git a/packages/flutter/lib/src/native/cocoa/binding.dart b/packages/flutter/lib/src/native/cocoa/binding.dart index 98b943ac70..b509202267 100644 --- a/packages/flutter/lib/src/native/cocoa/binding.dart +++ b/packages/flutter/lib/src/native/cocoa/binding.dart @@ -1510,6 +1510,7 @@ late final _sel_fetchNativeAppStartAsBytes = late final _sel_loadContextsAsBytes = objc.registerName("loadContextsAsBytes"); late final _sel_loadDebugImagesAsBytes_ = objc.registerName("loadDebugImagesAsBytes:"); +late final _sel_captureReplay = objc.registerName("captureReplay"); /// SentryFlutterPlugin class SentryFlutterPlugin extends objc.NSObject { @@ -1568,6 +1569,15 @@ class SentryFlutterPlugin extends objc.NSObject { : objc.NSData.castFromPointer(_ret, retain: true, release: true); } + /// captureReplay + static objc.NSString? captureReplay() { + final _ret = + _objc_msgSend_151sglz(_class_SentryFlutterPlugin, _sel_captureReplay); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + /// init SentryFlutterPlugin init() { objc.checkOsVersionInternal('SentryFlutterPlugin.init', diff --git a/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart b/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart index cdf0358389..ef11eaf06c 100644 --- a/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart +++ b/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart @@ -27,6 +27,9 @@ class SentryNativeCocoa extends SentryNativeChannel { @override SentryId? get replayId => _replayId; + @visibleForTesting + CocoaReplayRecorder? get testRecorder => _replayRecorder; + @override Future init(Hub hub) async { // We only need these when replay is enabled (session or error capture) @@ -67,13 +70,6 @@ class SentryNativeCocoa extends SentryNativeChannel { return super.init(hub); } - @override - FutureOr captureReplay() async { - final replayId = await super.captureReplay(); - _replayId = replayId; - return replayId; - } - @override Future close() async { await _envelopeSender?.close(); @@ -305,6 +301,21 @@ class SentryNativeCocoa extends SentryNativeChannel { scope.removeExtraForKey(key.toNSString()); })); }); + + @override + SentryId captureReplay() => + tryCatchSync('captureReplay', () { + final value = cocoa.SentryFlutterPlugin.captureReplay()?.toDartString(); + SentryId id; + if (value == null) { + id = SentryId.empty(); + } else { + id = SentryId.fromId(value); + } + _replayId = id; + return id; + }) ?? + SentryId.empty(); } // The default conversion does not handle bool so we will add it ourselves diff --git a/packages/flutter/lib/src/native/java/android_replay_recorder.dart b/packages/flutter/lib/src/native/java/android_replay_recorder.dart index 599ac2fd82..0a99968a82 100644 --- a/packages/flutter/lib/src/native/java/android_replay_recorder.dart +++ b/packages/flutter/lib/src/native/java/android_replay_recorder.dart @@ -24,6 +24,9 @@ class AndroidReplayRecorder extends ScheduledScreenshotRecorder { static AndroidReplayRecorder Function(SentryFlutterOptions) factory = AndroidReplayRecorder.new; + @visibleForTesting + void Function()? onScreenshotAddedForTest; + AndroidReplayRecorder(super.options, {SpawnWorkerFn? spawn}) : _config = WorkerConfig( debugName: 'SentryAndroidReplayRecorder', @@ -32,7 +35,10 @@ class AndroidReplayRecorder extends ScheduledScreenshotRecorder { automatedTestMode: options.automatedTestMode, ), _spawn = spawn ?? spawnWorker { - super.callback = _addReplayScreenshot; + super.callback = (screenshot, isNewlyCaptured) { + onScreenshotAddedForTest?.call(); + return _addReplayScreenshot(screenshot, isNewlyCaptured); + }; } @override diff --git a/packages/flutter/lib/src/native/java/binding.dart b/packages/flutter/lib/src/native/java/binding.dart index 949bb60638..ba81d18072 100644 --- a/packages/flutter/lib/src/native/java/binding.dart +++ b/packages/flutter/lib/src/native/java/binding.dart @@ -167,14 +167,14 @@ class InternalSentrySdk extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureEnvelope(byte[] bs, boolean z)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject? captureEnvelope( + static SentryId? captureEnvelope( jni$_.JByteArray bs, bool z, ) { final _$bs = bs.reference; return _captureEnvelope(_class.reference.pointer, _id_captureEnvelope as jni$_.JMethodIDPtr, _$bs.pointer, z ? 1 : 0) - .object(const jni$_.JObjectNullableType()); + .object(const $SentryId$NullableType()); } static final _id_getAppStartMeasurement = _class.staticMethodId( @@ -797,10 +797,10 @@ class ReplayIntegration extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId getReplayId()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getReplayId() { + SentryId getReplayId() { return _getReplayId( reference.pointer, _id_getReplayId as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_setBreadcrumbConverter = _class.instanceMethodId( @@ -1174,7 +1174,7 @@ class ReplayIntegration extends jni$_.JObject { /// from: `public final void onConfigurationChanged(io.sentry.android.replay.ScreenshotRecorderConfig screenshotRecorderConfig)` void onConfigurationChanged( - jni$_.JObject screenshotRecorderConfig, + ScreenshotRecorderConfig screenshotRecorderConfig, ) { final _$screenshotRecorderConfig = screenshotRecorderConfig.reference; _onConfigurationChanged( @@ -1261,198 +1261,65 @@ final class $ReplayIntegration$Type extends jni$_.JObjType { } } -/// from: `io.sentry.flutter.SentryFlutterPlugin$Companion` -class SentryFlutterPlugin$Companion extends jni$_.JObject { +/// from: `io.sentry.android.replay.ScreenshotRecorderConfig$Companion` +class ScreenshotRecorderConfig$Companion extends jni$_.JObject { @jni$_.internal @core$_.override - final jni$_.JObjType $type; + final jni$_.JObjType $type; @jni$_.internal - SentryFlutterPlugin$Companion.fromReference( + ScreenshotRecorderConfig$Companion.fromReference( jni$_.JReference reference, ) : $type = type, super.fromReference(reference); - static final _class = - jni$_.JClass.forName(r'io/sentry/flutter/SentryFlutterPlugin$Companion'); + static final _class = jni$_.JClass.forName( + r'io/sentry/android/replay/ScreenshotRecorderConfig$Companion'); /// The type which includes information such as the signature of this class. - static const nullableType = $SentryFlutterPlugin$Companion$NullableType(); - static const type = $SentryFlutterPlugin$Companion$Type(); - static final _id_privateSentryGetReplayIntegration = _class.instanceMethodId( - r'privateSentryGetReplayIntegration', - r'()Lio/sentry/android/replay/ReplayIntegration;', - ); - - static final _privateSentryGetReplayIntegration = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public final io.sentry.android.replay.ReplayIntegration privateSentryGetReplayIntegration()` - /// The returned object must be released after use, by calling the [release] method. - ReplayIntegration? privateSentryGetReplayIntegration() { - return _privateSentryGetReplayIntegration(reference.pointer, - _id_privateSentryGetReplayIntegration as jni$_.JMethodIDPtr) - .object(const $ReplayIntegration$NullableType()); - } - - static final _id_crash = _class.instanceMethodId( - r'crash', - r'()V', - ); - - static final _crash = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public final void crash()` - void crash() { - _crash(reference.pointer, _id_crash as jni$_.JMethodIDPtr).check(); - } - - static final _id_getDisplayRefreshRate = _class.instanceMethodId( - r'getDisplayRefreshRate', - r'()Ljava/lang/Integer;', - ); - - static final _getDisplayRefreshRate = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public final java.lang.Integer getDisplayRefreshRate()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JInteger? getDisplayRefreshRate() { - return _getDisplayRefreshRate( - reference.pointer, _id_getDisplayRefreshRate as jni$_.JMethodIDPtr) - .object(const jni$_.JIntegerNullableType()); - } - - static final _id_fetchNativeAppStartAsBytes = _class.instanceMethodId( - r'fetchNativeAppStartAsBytes', - r'()[B', - ); - - static final _fetchNativeAppStartAsBytes = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public final byte[] fetchNativeAppStartAsBytes()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JByteArray? fetchNativeAppStartAsBytes() { - return _fetchNativeAppStartAsBytes(reference.pointer, - _id_fetchNativeAppStartAsBytes as jni$_.JMethodIDPtr) - .object(const jni$_.JByteArrayNullableType()); - } - - static final _id_getApplicationContext = _class.instanceMethodId( - r'getApplicationContext', - r'()Landroid/content/Context;', - ); - - static final _getApplicationContext = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public final android.content.Context getApplicationContext()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getApplicationContext() { - return _getApplicationContext( - reference.pointer, _id_getApplicationContext as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); - } - - static final _id_loadContextsAsBytes = _class.instanceMethodId( - r'loadContextsAsBytes', - r'()[B', + static const nullableType = + $ScreenshotRecorderConfig$Companion$NullableType(); + static const type = $ScreenshotRecorderConfig$Companion$Type(); + static final _id_fromSize = _class.instanceMethodId( + r'fromSize', + r'(Landroid/content/Context;Lio/sentry/SentryReplayOptions;II)Lio/sentry/android/replay/ScreenshotRecorderConfig;', ); - static final _loadContextsAsBytes = jni$_.ProtectedJniExtensions.lookup< + static final _fromSize = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public final byte[] loadContextsAsBytes()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JByteArray? loadContextsAsBytes() { - return _loadContextsAsBytes( - reference.pointer, _id_loadContextsAsBytes as jni$_.JMethodIDPtr) - .object(const jni$_.JByteArrayNullableType()); - } - - static final _id_loadDebugImagesAsBytes = _class.instanceMethodId( - r'loadDebugImagesAsBytes', - r'(Ljava/util/Set;)[B', - ); - - static final _loadDebugImagesAsBytes = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + int, + int)>(); - /// from: `public final byte[] loadDebugImagesAsBytes(java.util.Set set)` + /// from: `public final io.sentry.android.replay.ScreenshotRecorderConfig fromSize(android.content.Context context, io.sentry.SentryReplayOptions sentryReplayOptions, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JByteArray? loadDebugImagesAsBytes( - jni$_.JSet set, + ScreenshotRecorderConfig fromSize( + jni$_.JObject context, + jni$_.JObject sentryReplayOptions, + int i, + int i1, ) { - final _$set = set.reference; - return _loadDebugImagesAsBytes(reference.pointer, - _id_loadDebugImagesAsBytes as jni$_.JMethodIDPtr, _$set.pointer) - .object(const jni$_.JByteArrayNullableType()); + final _$context = context.reference; + final _$sentryReplayOptions = sentryReplayOptions.reference; + return _fromSize(reference.pointer, _id_fromSize as jni$_.JMethodIDPtr, + _$context.pointer, _$sentryReplayOptions.pointer, i, i1) + .object( + const $ScreenshotRecorderConfig$Type()); } static final _id_new$ = _class.constructorId( @@ -1472,12 +1339,12 @@ class SentryFlutterPlugin$Companion extends jni$_.JObject { /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. - factory SentryFlutterPlugin$Companion( + factory ScreenshotRecorderConfig$Companion( jni$_.JObject? defaultConstructorMarker, ) { final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; - return SentryFlutterPlugin$Companion.fromReference(_new$( + return ScreenshotRecorderConfig$Companion.fromReference(_new$( _class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr, _$defaultConstructorMarker.pointer) @@ -1485,21 +1352,23 @@ class SentryFlutterPlugin$Companion extends jni$_.JObject { } } -final class $SentryFlutterPlugin$Companion$NullableType - extends jni$_.JObjType { +final class $ScreenshotRecorderConfig$Companion$NullableType + extends jni$_.JObjType { @jni$_.internal - const $SentryFlutterPlugin$Companion$NullableType(); + const $ScreenshotRecorderConfig$Companion$NullableType(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin$Companion;'; + String get signature => + r'Lio/sentry/android/replay/ScreenshotRecorderConfig$Companion;'; @jni$_.internal @core$_.override - SentryFlutterPlugin$Companion? fromReference(jni$_.JReference reference) => + ScreenshotRecorderConfig$Companion? fromReference( + jni$_.JReference reference) => reference.isNull ? null - : SentryFlutterPlugin$Companion.fromReference( + : ScreenshotRecorderConfig$Companion.fromReference( reference, ); @jni$_.internal @@ -1508,35 +1377,39 @@ final class $SentryFlutterPlugin$Companion$NullableType @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => this; + jni$_.JObjType get nullableType => this; @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($SentryFlutterPlugin$Companion$NullableType).hashCode; + int get hashCode => + ($ScreenshotRecorderConfig$Companion$NullableType).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($SentryFlutterPlugin$Companion$NullableType) && - other is $SentryFlutterPlugin$Companion$NullableType; + return other.runtimeType == + ($ScreenshotRecorderConfig$Companion$NullableType) && + other is $ScreenshotRecorderConfig$Companion$NullableType; } } -final class $SentryFlutterPlugin$Companion$Type - extends jni$_.JObjType { +final class $ScreenshotRecorderConfig$Companion$Type + extends jni$_.JObjType { @jni$_.internal - const $SentryFlutterPlugin$Companion$Type(); + const $ScreenshotRecorderConfig$Companion$Type(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin$Companion;'; + String get signature => + r'Lio/sentry/android/replay/ScreenshotRecorderConfig$Companion;'; @jni$_.internal @core$_.override - SentryFlutterPlugin$Companion fromReference(jni$_.JReference reference) => - SentryFlutterPlugin$Companion.fromReference( + ScreenshotRecorderConfig$Companion fromReference( + jni$_.JReference reference) => + ScreenshotRecorderConfig$Companion.fromReference( reference, ); @jni$_.internal @@ -1545,568 +1418,1440 @@ final class $SentryFlutterPlugin$Companion$Type @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => - const $SentryFlutterPlugin$Companion$NullableType(); + jni$_.JObjType get nullableType => + const $ScreenshotRecorderConfig$Companion$NullableType(); @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($SentryFlutterPlugin$Companion$Type).hashCode; + int get hashCode => ($ScreenshotRecorderConfig$Companion$Type).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($SentryFlutterPlugin$Companion$Type) && - other is $SentryFlutterPlugin$Companion$Type; + return other.runtimeType == ($ScreenshotRecorderConfig$Companion$Type) && + other is $ScreenshotRecorderConfig$Companion$Type; } } -/// from: `io.sentry.flutter.SentryFlutterPlugin` -class SentryFlutterPlugin extends jni$_.JObject { +/// from: `io.sentry.android.replay.ScreenshotRecorderConfig` +class ScreenshotRecorderConfig extends jni$_.JObject { @jni$_.internal @core$_.override - final jni$_.JObjType $type; + final jni$_.JObjType $type; @jni$_.internal - SentryFlutterPlugin.fromReference( + ScreenshotRecorderConfig.fromReference( jni$_.JReference reference, ) : $type = type, super.fromReference(reference); - static final _class = - jni$_.JClass.forName(r'io/sentry/flutter/SentryFlutterPlugin'); + static final _class = jni$_.JClass.forName( + r'io/sentry/android/replay/ScreenshotRecorderConfig'); /// The type which includes information such as the signature of this class. - static const nullableType = $SentryFlutterPlugin$NullableType(); - static const type = $SentryFlutterPlugin$Type(); + static const nullableType = $ScreenshotRecorderConfig$NullableType(); + static const type = $ScreenshotRecorderConfig$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', - r'Lio/sentry/flutter/SentryFlutterPlugin$Companion;', + r'Lio/sentry/android/replay/ScreenshotRecorderConfig$Companion;', ); - /// from: `static public final io.sentry.flutter.SentryFlutterPlugin$Companion Companion` + /// from: `static public final io.sentry.android.replay.ScreenshotRecorderConfig$Companion Companion` /// The returned object must be released after use, by calling the [release] method. - static SentryFlutterPlugin$Companion get Companion => - _id_Companion.get(_class, const $SentryFlutterPlugin$Companion$Type()); + static ScreenshotRecorderConfig$Companion get Companion => _id_Companion.get( + _class, const $ScreenshotRecorderConfig$Companion$Type()); static final _id_new$ = _class.constructorId( - r'()V', + r'(IIFFII)V', ); static final _new$ = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_NewObject') + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int32, + jni$_.Int32, + jni$_.Double, + jni$_.Double, + jni$_.Int32, + jni$_.Int32 + )>)>>('globalEnv_NewObject') .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, int, int, double, double, int, int)>(); - /// from: `public void ()` + /// from: `public void (int i, int i1, float f, float f1, int i2, int i3)` /// The returned object must be released after use, by calling the [release] method. - factory SentryFlutterPlugin() { - return SentryFlutterPlugin.fromReference( - _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) - .reference); - } - - static final _id_onAttachedToEngine = _class.instanceMethodId( - r'onAttachedToEngine', - r'(Lio/flutter/embedding/engine/plugins/FlutterPlugin$FlutterPluginBinding;)V', - ); - - static final _onAttachedToEngine = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void onAttachedToEngine(io.flutter.embedding.engine.plugins.FlutterPlugin$FlutterPluginBinding flutterPluginBinding)` - void onAttachedToEngine( - jni$_.JObject flutterPluginBinding, + factory ScreenshotRecorderConfig( + int i, + int i1, + double f, + double f1, + int i2, + int i3, ) { - final _$flutterPluginBinding = flutterPluginBinding.reference; - _onAttachedToEngine( - reference.pointer, - _id_onAttachedToEngine as jni$_.JMethodIDPtr, - _$flutterPluginBinding.pointer) - .check(); + return ScreenshotRecorderConfig.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + i, + i1, + f, + f1, + i2, + i3) + .reference); } - static final _id_onMethodCall = _class.instanceMethodId( - r'onMethodCall', - r'(Lio/flutter/plugin/common/MethodCall;Lio/flutter/plugin/common/MethodChannel$Result;)V', + static final _id_getRecordingWidth = _class.instanceMethodId( + r'getRecordingWidth', + r'()I', ); - static final _onMethodCall = jni$_.ProtectedJniExtensions.lookup< + static final _getRecordingWidth = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void onMethodCall(io.flutter.plugin.common.MethodCall methodCall, io.flutter.plugin.common.MethodChannel$Result result)` - void onMethodCall( - jni$_.JObject methodCall, - jni$_.JObject result, - ) { - final _$methodCall = methodCall.reference; - final _$result = result.reference; - _onMethodCall(reference.pointer, _id_onMethodCall as jni$_.JMethodIDPtr, - _$methodCall.pointer, _$result.pointer) - .check(); + /// from: `public final int getRecordingWidth()` + int getRecordingWidth() { + return _getRecordingWidth( + reference.pointer, _id_getRecordingWidth as jni$_.JMethodIDPtr) + .integer; } - static final _id_onDetachedFromEngine = _class.instanceMethodId( - r'onDetachedFromEngine', - r'(Lio/flutter/embedding/engine/plugins/FlutterPlugin$FlutterPluginBinding;)V', + static final _id_getRecordingHeight = _class.instanceMethodId( + r'getRecordingHeight', + r'()I', ); - static final _onDetachedFromEngine = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _getRecordingHeight = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void onDetachedFromEngine(io.flutter.embedding.engine.plugins.FlutterPlugin$FlutterPluginBinding flutterPluginBinding)` - void onDetachedFromEngine( - jni$_.JObject flutterPluginBinding, - ) { - final _$flutterPluginBinding = flutterPluginBinding.reference; - _onDetachedFromEngine( - reference.pointer, - _id_onDetachedFromEngine as jni$_.JMethodIDPtr, - _$flutterPluginBinding.pointer) - .check(); + /// from: `public final int getRecordingHeight()` + int getRecordingHeight() { + return _getRecordingHeight( + reference.pointer, _id_getRecordingHeight as jni$_.JMethodIDPtr) + .integer; } - static final _id_onAttachedToActivity = _class.instanceMethodId( - r'onAttachedToActivity', - r'(Lio/flutter/embedding/engine/plugins/activity/ActivityPluginBinding;)V', + static final _id_getScaleFactorX = _class.instanceMethodId( + r'getScaleFactorX', + r'()F', ); - static final _onAttachedToActivity = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _getScaleFactorX = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallFloatMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void onAttachedToActivity(io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding activityPluginBinding)` - void onAttachedToActivity( - jni$_.JObject activityPluginBinding, - ) { - final _$activityPluginBinding = activityPluginBinding.reference; - _onAttachedToActivity( - reference.pointer, - _id_onAttachedToActivity as jni$_.JMethodIDPtr, - _$activityPluginBinding.pointer) - .check(); + /// from: `public final float getScaleFactorX()` + double getScaleFactorX() { + return _getScaleFactorX( + reference.pointer, _id_getScaleFactorX as jni$_.JMethodIDPtr) + .float; } - static final _id_onDetachedFromActivity = _class.instanceMethodId( - r'onDetachedFromActivity', - r'()V', + static final _id_getScaleFactorY = _class.instanceMethodId( + r'getScaleFactorY', + r'()F', ); - static final _onDetachedFromActivity = jni$_.ProtectedJniExtensions.lookup< + static final _getScaleFactorY = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') + )>>('globalEnv_CallFloatMethod') .asFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `public void onDetachedFromActivity()` - void onDetachedFromActivity() { - _onDetachedFromActivity( - reference.pointer, _id_onDetachedFromActivity as jni$_.JMethodIDPtr) - .check(); + /// from: `public final float getScaleFactorY()` + double getScaleFactorY() { + return _getScaleFactorY( + reference.pointer, _id_getScaleFactorY as jni$_.JMethodIDPtr) + .float; } - static final _id_onReattachedToActivityForConfigChanges = - _class.instanceMethodId( - r'onReattachedToActivityForConfigChanges', - r'(Lio/flutter/embedding/engine/plugins/activity/ActivityPluginBinding;)V', + static final _id_getFrameRate = _class.instanceMethodId( + r'getFrameRate', + r'()I', ); - static final _onReattachedToActivityForConfigChanges = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + static final _getFrameRate = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void onReattachedToActivityForConfigChanges(io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding activityPluginBinding)` - void onReattachedToActivityForConfigChanges( - jni$_.JObject activityPluginBinding, - ) { - final _$activityPluginBinding = activityPluginBinding.reference; - _onReattachedToActivityForConfigChanges( - reference.pointer, - _id_onReattachedToActivityForConfigChanges as jni$_.JMethodIDPtr, - _$activityPluginBinding.pointer) - .check(); + /// from: `public final int getFrameRate()` + int getFrameRate() { + return _getFrameRate( + reference.pointer, _id_getFrameRate as jni$_.JMethodIDPtr) + .integer; } - static final _id_onDetachedFromActivityForConfigChanges = - _class.instanceMethodId( - r'onDetachedFromActivityForConfigChanges', - r'()V', + static final _id_getBitRate = _class.instanceMethodId( + r'getBitRate', + r'()I', ); - static final _onDetachedFromActivityForConfigChanges = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( + static final _getBitRate = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>(); + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void onDetachedFromActivityForConfigChanges()` - void onDetachedFromActivityForConfigChanges() { - _onDetachedFromActivityForConfigChanges(reference.pointer, - _id_onDetachedFromActivityForConfigChanges as jni$_.JMethodIDPtr) - .check(); + /// from: `public final int getBitRate()` + int getBitRate() { + return _getBitRate(reference.pointer, _id_getBitRate as jni$_.JMethodIDPtr) + .integer; } - static final _id_privateSentryGetReplayIntegration = _class.staticMethodId( - r'privateSentryGetReplayIntegration', - r'()Lio/sentry/android/replay/ReplayIntegration;', + static final _id_new$1 = _class.constructorId( + r'(FF)V', ); - static final _privateSentryGetReplayIntegration = - jni$_.ProtectedJniExtensions.lookup< + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double, jni$_.Double)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, double, double)>(); - /// from: `static public final io.sentry.android.replay.ReplayIntegration privateSentryGetReplayIntegration()` + /// from: `public void (float f, float f1)` /// The returned object must be released after use, by calling the [release] method. - static ReplayIntegration? privateSentryGetReplayIntegration() { - return _privateSentryGetReplayIntegration(_class.reference.pointer, - _id_privateSentryGetReplayIntegration as jni$_.JMethodIDPtr) - .object(const $ReplayIntegration$NullableType()); + factory ScreenshotRecorderConfig.new$1( + double f, + double f1, + ) { + return ScreenshotRecorderConfig.fromReference( + _new$1(_class.reference.pointer, _id_new$1 as jni$_.JMethodIDPtr, f, f1) + .reference); } - static final _id_crash = _class.staticMethodId( - r'crash', - r'()V', + static final _id_component1 = _class.instanceMethodId( + r'component1', + r'()I', ); - static final _crash = jni$_.ProtectedJniExtensions.lookup< + static final _component1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallStaticVoidMethod') + )>>('globalEnv_CallIntMethod') .asFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `static public final void crash()` - static void crash() { - _crash(_class.reference.pointer, _id_crash as jni$_.JMethodIDPtr).check(); + /// from: `public final int component1()` + int component1() { + return _component1(reference.pointer, _id_component1 as jni$_.JMethodIDPtr) + .integer; } - static final _id_getDisplayRefreshRate = _class.staticMethodId( - r'getDisplayRefreshRate', - r'()Ljava/lang/Integer;', + static final _id_component2 = _class.instanceMethodId( + r'component2', + r'()I', ); - static final _getDisplayRefreshRate = jni$_.ProtectedJniExtensions.lookup< + static final _component2 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallStaticObjectMethod') + )>>('globalEnv_CallIntMethod') .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `static public final java.lang.Integer getDisplayRefreshRate()` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JInteger? getDisplayRefreshRate() { - return _getDisplayRefreshRate(_class.reference.pointer, - _id_getDisplayRefreshRate as jni$_.JMethodIDPtr) - .object(const jni$_.JIntegerNullableType()); + /// from: `public final int component2()` + int component2() { + return _component2(reference.pointer, _id_component2 as jni$_.JMethodIDPtr) + .integer; } - static final _id_fetchNativeAppStartAsBytes = _class.staticMethodId( - r'fetchNativeAppStartAsBytes', - r'()[B', + static final _id_component3 = _class.instanceMethodId( + r'component3', + r'()F', ); - static final _fetchNativeAppStartAsBytes = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallStaticObjectMethod') - .asFunction< + static final _component3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>(); + )>>('globalEnv_CallFloatMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `static public final byte[] fetchNativeAppStartAsBytes()` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JByteArray? fetchNativeAppStartAsBytes() { - return _fetchNativeAppStartAsBytes(_class.reference.pointer, - _id_fetchNativeAppStartAsBytes as jni$_.JMethodIDPtr) - .object(const jni$_.JByteArrayNullableType()); + /// from: `public final float component3()` + double component3() { + return _component3(reference.pointer, _id_component3 as jni$_.JMethodIDPtr) + .float; } - static final _id_getApplicationContext = _class.staticMethodId( - r'getApplicationContext', - r'()Landroid/content/Context;', + static final _id_component4 = _class.instanceMethodId( + r'component4', + r'()F', ); - static final _getApplicationContext = jni$_.ProtectedJniExtensions.lookup< + static final _component4 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallStaticObjectMethod') + )>>('globalEnv_CallFloatMethod') .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `static public final android.content.Context getApplicationContext()` + /// from: `public final float component4()` + double component4() { + return _component4(reference.pointer, _id_component4 as jni$_.JMethodIDPtr) + .float; + } + + static final _id_component5 = _class.instanceMethodId( + r'component5', + r'()I', + ); + + static final _component5 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int component5()` + int component5() { + return _component5(reference.pointer, _id_component5 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_component6 = _class.instanceMethodId( + r'component6', + r'()I', + ); + + static final _component6 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int component6()` + int component6() { + return _component6(reference.pointer, _id_component6 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_copy = _class.instanceMethodId( + r'copy', + r'(IIFFII)Lio/sentry/android/replay/ScreenshotRecorderConfig;', + ); + + static final _copy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int32, + jni$_.Int32, + jni$_.Double, + jni$_.Double, + jni$_.Int32, + jni$_.Int32 + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, int, int, double, double, int, int)>(); + + /// from: `public final io.sentry.android.replay.ScreenshotRecorderConfig copy(int i, int i1, float f, float f1, int i2, int i3)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject? getApplicationContext() { - return _getApplicationContext(_class.reference.pointer, - _id_getApplicationContext as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); + ScreenshotRecorderConfig copy( + int i, + int i1, + double f, + double f1, + int i2, + int i3, + ) { + return _copy(reference.pointer, _id_copy as jni$_.JMethodIDPtr, i, i1, f, + f1, i2, i3) + .object( + const $ScreenshotRecorderConfig$Type()); } - static final _id_loadContextsAsBytes = _class.staticMethodId( - r'loadContextsAsBytes', - r'()[B', + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', ); - static final _loadContextsAsBytes = jni$_.ProtectedJniExtensions.lookup< + static final _toString$1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallStaticObjectMethod') + )>>('globalEnv_CallObjectMethod') .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `static public final byte[] loadContextsAsBytes()` + /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JByteArray? loadContextsAsBytes() { - return _loadContextsAsBytes(_class.reference.pointer, - _id_loadContextsAsBytes as jni$_.JMethodIDPtr) - .object(const jni$_.JByteArrayNullableType()); + jni$_.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); } - static final _id_loadDebugImagesAsBytes = _class.staticMethodId( - r'loadDebugImagesAsBytes', - r'(Ljava/util/Set;)[B', + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', ); - static final _loadDebugImagesAsBytes = jni$_.ProtectedJniExtensions.lookup< + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallStaticObjectMethod') + 'globalEnv_CallBooleanMethod') .asFunction< jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `static public final byte[] loadDebugImagesAsBytes(java.util.Set set)` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JByteArray? loadDebugImagesAsBytes( - jni$_.JSet set, + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, ) { - final _$set = set.reference; - return _loadDebugImagesAsBytes(_class.reference.pointer, - _id_loadDebugImagesAsBytes as jni$_.JMethodIDPtr, _$set.pointer) - .object(const jni$_.JByteArrayNullableType()); + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; } } -final class $SentryFlutterPlugin$NullableType - extends jni$_.JObjType { +final class $ScreenshotRecorderConfig$NullableType + extends jni$_.JObjType { @jni$_.internal - const $SentryFlutterPlugin$NullableType(); + const $ScreenshotRecorderConfig$NullableType(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin;'; + String get signature => + r'Lio/sentry/android/replay/ScreenshotRecorderConfig;'; @jni$_.internal @core$_.override - SentryFlutterPlugin? fromReference(jni$_.JReference reference) => + ScreenshotRecorderConfig? fromReference(jni$_.JReference reference) => reference.isNull ? null - : SentryFlutterPlugin.fromReference( + : ScreenshotRecorderConfig.fromReference( reference, ); @jni$_.internal @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + jni$_.JObjType get superType => const jni$_.JObjectType(); @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => this; + jni$_.JObjType get nullableType => this; @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($SentryFlutterPlugin$NullableType).hashCode; + int get hashCode => ($ScreenshotRecorderConfig$NullableType).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($SentryFlutterPlugin$NullableType) && - other is $SentryFlutterPlugin$NullableType; + return other.runtimeType == ($ScreenshotRecorderConfig$NullableType) && + other is $ScreenshotRecorderConfig$NullableType; } } -final class $SentryFlutterPlugin$Type - extends jni$_.JObjType { +final class $ScreenshotRecorderConfig$Type + extends jni$_.JObjType { @jni$_.internal - const $SentryFlutterPlugin$Type(); + const $ScreenshotRecorderConfig$Type(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin;'; + String get signature => + r'Lio/sentry/android/replay/ScreenshotRecorderConfig;'; @jni$_.internal @core$_.override - SentryFlutterPlugin fromReference(jni$_.JReference reference) => - SentryFlutterPlugin.fromReference( + ScreenshotRecorderConfig fromReference(jni$_.JReference reference) => + ScreenshotRecorderConfig.fromReference( reference, ); @jni$_.internal @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + jni$_.JObjType get superType => const jni$_.JObjectType(); @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => - const $SentryFlutterPlugin$NullableType(); + jni$_.JObjType get nullableType => + const $ScreenshotRecorderConfig$NullableType(); @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($SentryFlutterPlugin$Type).hashCode; + int get hashCode => ($ScreenshotRecorderConfig$Type).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($SentryFlutterPlugin$Type) && - other is $SentryFlutterPlugin$Type; + return other.runtimeType == ($ScreenshotRecorderConfig$Type) && + other is $ScreenshotRecorderConfig$Type; } } -/// from: `io.sentry.Sentry$OptionsConfiguration` -class Sentry$OptionsConfiguration<$T extends jni$_.JObject?> - extends jni$_.JObject { +/// from: `io.sentry.flutter.SentryFlutterPlugin$Companion` +class SentryFlutterPlugin$Companion extends jni$_.JObject { @jni$_.internal @core$_.override - final jni$_.JObjType> $type; - - @jni$_.internal - final jni$_.JObjType<$T> T; + final jni$_.JObjType $type; @jni$_.internal - Sentry$OptionsConfiguration.fromReference( - this.T, + SentryFlutterPlugin$Companion.fromReference( jni$_.JReference reference, - ) : $type = type<$T>(T), + ) : $type = type, super.fromReference(reference); static final _class = - jni$_.JClass.forName(r'io/sentry/Sentry$OptionsConfiguration'); + jni$_.JClass.forName(r'io/sentry/flutter/SentryFlutterPlugin$Companion'); /// The type which includes information such as the signature of this class. - static $Sentry$OptionsConfiguration$NullableType<$T> - nullableType<$T extends jni$_.JObject?>( - jni$_.JObjType<$T> T, - ) { - return $Sentry$OptionsConfiguration$NullableType<$T>( - T, - ); - } + static const nullableType = $SentryFlutterPlugin$Companion$NullableType(); + static const type = $SentryFlutterPlugin$Companion$Type(); + static final _id_privateSentryGetReplayIntegration = _class.instanceMethodId( + r'privateSentryGetReplayIntegration', + r'()Lio/sentry/android/replay/ReplayIntegration;', + ); - static $Sentry$OptionsConfiguration$Type<$T> type<$T extends jni$_.JObject?>( - jni$_.JObjType<$T> T, - ) { - return $Sentry$OptionsConfiguration$Type<$T>( - T, - ); + static final _privateSentryGetReplayIntegration = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final io.sentry.android.replay.ReplayIntegration privateSentryGetReplayIntegration()` + /// The returned object must be released after use, by calling the [release] method. + ReplayIntegration? privateSentryGetReplayIntegration() { + return _privateSentryGetReplayIntegration(reference.pointer, + _id_privateSentryGetReplayIntegration as jni$_.JMethodIDPtr) + .object(const $ReplayIntegration$NullableType()); } - static final _id_configure = _class.instanceMethodId( - r'configure', - r'(Lio/sentry/SentryOptions;)V', + static final _id_crash = _class.instanceMethodId( + r'crash', + r'()V', + ); + + static final _crash = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final void crash()` + void crash() { + _crash(reference.pointer, _id_crash as jni$_.JMethodIDPtr).check(); + } + + static final _id_getDisplayRefreshRate = _class.instanceMethodId( + r'getDisplayRefreshRate', + r'()Ljava/lang/Integer;', + ); + + static final _getDisplayRefreshRate = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Integer getDisplayRefreshRate()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JInteger? getDisplayRefreshRate() { + return _getDisplayRefreshRate( + reference.pointer, _id_getDisplayRefreshRate as jni$_.JMethodIDPtr) + .object(const jni$_.JIntegerNullableType()); + } + + static final _id_fetchNativeAppStartAsBytes = _class.instanceMethodId( + r'fetchNativeAppStartAsBytes', + r'()[B', + ); + + static final _fetchNativeAppStartAsBytes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] fetchNativeAppStartAsBytes()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? fetchNativeAppStartAsBytes() { + return _fetchNativeAppStartAsBytes(reference.pointer, + _id_fetchNativeAppStartAsBytes as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_getApplicationContext = _class.instanceMethodId( + r'getApplicationContext', + r'()Landroid/content/Context;', + ); + + static final _getApplicationContext = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final android.content.Context getApplicationContext()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getApplicationContext() { + return _getApplicationContext( + reference.pointer, _id_getApplicationContext as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_loadContextsAsBytes = _class.instanceMethodId( + r'loadContextsAsBytes', + r'()[B', + ); + + static final _loadContextsAsBytes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] loadContextsAsBytes()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? loadContextsAsBytes() { + return _loadContextsAsBytes( + reference.pointer, _id_loadContextsAsBytes as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_loadDebugImagesAsBytes = _class.instanceMethodId( + r'loadDebugImagesAsBytes', + r'(Ljava/util/Set;)[B', + ); + + static final _loadDebugImagesAsBytes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final byte[] loadDebugImagesAsBytes(java.util.Set set)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? loadDebugImagesAsBytes( + jni$_.JSet set, + ) { + final _$set = set.reference; + return _loadDebugImagesAsBytes(reference.pointer, + _id_loadDebugImagesAsBytes as jni$_.JMethodIDPtr, _$set.pointer) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory SentryFlutterPlugin$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return SentryFlutterPlugin$Companion.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $SentryFlutterPlugin$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $SentryFlutterPlugin$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin$Companion;'; + + @jni$_.internal + @core$_.override + SentryFlutterPlugin$Companion? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : SentryFlutterPlugin$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($SentryFlutterPlugin$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($SentryFlutterPlugin$Companion$NullableType) && + other is $SentryFlutterPlugin$Companion$NullableType; + } +} + +final class $SentryFlutterPlugin$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $SentryFlutterPlugin$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin$Companion;'; + + @jni$_.internal + @core$_.override + SentryFlutterPlugin$Companion fromReference(jni$_.JReference reference) => + SentryFlutterPlugin$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $SentryFlutterPlugin$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($SentryFlutterPlugin$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($SentryFlutterPlugin$Companion$Type) && + other is $SentryFlutterPlugin$Companion$Type; + } +} + +/// from: `io.sentry.flutter.SentryFlutterPlugin` +class SentryFlutterPlugin extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + SentryFlutterPlugin.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'io/sentry/flutter/SentryFlutterPlugin'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $SentryFlutterPlugin$NullableType(); + static const type = $SentryFlutterPlugin$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lio/sentry/flutter/SentryFlutterPlugin$Companion;', + ); + + /// from: `static public final io.sentry.flutter.SentryFlutterPlugin$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static SentryFlutterPlugin$Companion get Companion => + _id_Companion.get(_class, const $SentryFlutterPlugin$Companion$Type()); + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory SentryFlutterPlugin() { + return SentryFlutterPlugin.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); + } + + static final _id_onAttachedToEngine = _class.instanceMethodId( + r'onAttachedToEngine', + r'(Lio/flutter/embedding/engine/plugins/FlutterPlugin$FlutterPluginBinding;)V', + ); + + static final _onAttachedToEngine = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void onAttachedToEngine(io.flutter.embedding.engine.plugins.FlutterPlugin$FlutterPluginBinding flutterPluginBinding)` + void onAttachedToEngine( + jni$_.JObject flutterPluginBinding, + ) { + final _$flutterPluginBinding = flutterPluginBinding.reference; + _onAttachedToEngine( + reference.pointer, + _id_onAttachedToEngine as jni$_.JMethodIDPtr, + _$flutterPluginBinding.pointer) + .check(); + } + + static final _id_onMethodCall = _class.instanceMethodId( + r'onMethodCall', + r'(Lio/flutter/plugin/common/MethodCall;Lio/flutter/plugin/common/MethodChannel$Result;)V', + ); + + static final _onMethodCall = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void onMethodCall(io.flutter.plugin.common.MethodCall methodCall, io.flutter.plugin.common.MethodChannel$Result result)` + void onMethodCall( + jni$_.JObject methodCall, + jni$_.JObject result, + ) { + final _$methodCall = methodCall.reference; + final _$result = result.reference; + _onMethodCall(reference.pointer, _id_onMethodCall as jni$_.JMethodIDPtr, + _$methodCall.pointer, _$result.pointer) + .check(); + } + + static final _id_onDetachedFromEngine = _class.instanceMethodId( + r'onDetachedFromEngine', + r'(Lio/flutter/embedding/engine/plugins/FlutterPlugin$FlutterPluginBinding;)V', + ); + + static final _onDetachedFromEngine = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void onDetachedFromEngine(io.flutter.embedding.engine.plugins.FlutterPlugin$FlutterPluginBinding flutterPluginBinding)` + void onDetachedFromEngine( + jni$_.JObject flutterPluginBinding, + ) { + final _$flutterPluginBinding = flutterPluginBinding.reference; + _onDetachedFromEngine( + reference.pointer, + _id_onDetachedFromEngine as jni$_.JMethodIDPtr, + _$flutterPluginBinding.pointer) + .check(); + } + + static final _id_onAttachedToActivity = _class.instanceMethodId( + r'onAttachedToActivity', + r'(Lio/flutter/embedding/engine/plugins/activity/ActivityPluginBinding;)V', + ); + + static final _onAttachedToActivity = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void onAttachedToActivity(io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding activityPluginBinding)` + void onAttachedToActivity( + jni$_.JObject activityPluginBinding, + ) { + final _$activityPluginBinding = activityPluginBinding.reference; + _onAttachedToActivity( + reference.pointer, + _id_onAttachedToActivity as jni$_.JMethodIDPtr, + _$activityPluginBinding.pointer) + .check(); + } + + static final _id_onDetachedFromActivity = _class.instanceMethodId( + r'onDetachedFromActivity', + r'()V', + ); + + static final _onDetachedFromActivity = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void onDetachedFromActivity()` + void onDetachedFromActivity() { + _onDetachedFromActivity( + reference.pointer, _id_onDetachedFromActivity as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_onReattachedToActivityForConfigChanges = + _class.instanceMethodId( + r'onReattachedToActivityForConfigChanges', + r'(Lio/flutter/embedding/engine/plugins/activity/ActivityPluginBinding;)V', + ); + + static final _onReattachedToActivityForConfigChanges = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void onReattachedToActivityForConfigChanges(io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding activityPluginBinding)` + void onReattachedToActivityForConfigChanges( + jni$_.JObject activityPluginBinding, + ) { + final _$activityPluginBinding = activityPluginBinding.reference; + _onReattachedToActivityForConfigChanges( + reference.pointer, + _id_onReattachedToActivityForConfigChanges as jni$_.JMethodIDPtr, + _$activityPluginBinding.pointer) + .check(); + } + + static final _id_onDetachedFromActivityForConfigChanges = + _class.instanceMethodId( + r'onDetachedFromActivityForConfigChanges', + r'()V', + ); + + static final _onDetachedFromActivityForConfigChanges = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void onDetachedFromActivityForConfigChanges()` + void onDetachedFromActivityForConfigChanges() { + _onDetachedFromActivityForConfigChanges(reference.pointer, + _id_onDetachedFromActivityForConfigChanges as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_privateSentryGetReplayIntegration = _class.staticMethodId( + r'privateSentryGetReplayIntegration', + r'()Lio/sentry/android/replay/ReplayIntegration;', + ); + + static final _privateSentryGetReplayIntegration = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public final io.sentry.android.replay.ReplayIntegration privateSentryGetReplayIntegration()` + /// The returned object must be released after use, by calling the [release] method. + static ReplayIntegration? privateSentryGetReplayIntegration() { + return _privateSentryGetReplayIntegration(_class.reference.pointer, + _id_privateSentryGetReplayIntegration as jni$_.JMethodIDPtr) + .object(const $ReplayIntegration$NullableType()); + } + + static final _id_crash = _class.staticMethodId( + r'crash', + r'()V', + ); + + static final _crash = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public final void crash()` + static void crash() { + _crash(_class.reference.pointer, _id_crash as jni$_.JMethodIDPtr).check(); + } + + static final _id_getDisplayRefreshRate = _class.staticMethodId( + r'getDisplayRefreshRate', + r'()Ljava/lang/Integer;', + ); + + static final _getDisplayRefreshRate = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public final java.lang.Integer getDisplayRefreshRate()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JInteger? getDisplayRefreshRate() { + return _getDisplayRefreshRate(_class.reference.pointer, + _id_getDisplayRefreshRate as jni$_.JMethodIDPtr) + .object(const jni$_.JIntegerNullableType()); + } + + static final _id_fetchNativeAppStartAsBytes = _class.staticMethodId( + r'fetchNativeAppStartAsBytes', + r'()[B', + ); + + static final _fetchNativeAppStartAsBytes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public final byte[] fetchNativeAppStartAsBytes()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JByteArray? fetchNativeAppStartAsBytes() { + return _fetchNativeAppStartAsBytes(_class.reference.pointer, + _id_fetchNativeAppStartAsBytes as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_getApplicationContext = _class.staticMethodId( + r'getApplicationContext', + r'()Landroid/content/Context;', + ); + + static final _getApplicationContext = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public final android.content.Context getApplicationContext()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject? getApplicationContext() { + return _getApplicationContext(_class.reference.pointer, + _id_getApplicationContext as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_loadContextsAsBytes = _class.staticMethodId( + r'loadContextsAsBytes', + r'()[B', + ); + + static final _loadContextsAsBytes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public final byte[] loadContextsAsBytes()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JByteArray? loadContextsAsBytes() { + return _loadContextsAsBytes(_class.reference.pointer, + _id_loadContextsAsBytes as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_loadDebugImagesAsBytes = _class.staticMethodId( + r'loadDebugImagesAsBytes', + r'(Ljava/util/Set;)[B', + ); + + static final _loadDebugImagesAsBytes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public final byte[] loadDebugImagesAsBytes(java.util.Set set)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JByteArray? loadDebugImagesAsBytes( + jni$_.JSet set, + ) { + final _$set = set.reference; + return _loadDebugImagesAsBytes(_class.reference.pointer, + _id_loadDebugImagesAsBytes as jni$_.JMethodIDPtr, _$set.pointer) + .object(const jni$_.JByteArrayNullableType()); + } +} + +final class $SentryFlutterPlugin$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $SentryFlutterPlugin$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin;'; + + @jni$_.internal + @core$_.override + SentryFlutterPlugin? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : SentryFlutterPlugin.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($SentryFlutterPlugin$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($SentryFlutterPlugin$NullableType) && + other is $SentryFlutterPlugin$NullableType; + } +} + +final class $SentryFlutterPlugin$Type + extends jni$_.JObjType { + @jni$_.internal + const $SentryFlutterPlugin$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/flutter/SentryFlutterPlugin;'; + + @jni$_.internal + @core$_.override + SentryFlutterPlugin fromReference(jni$_.JReference reference) => + SentryFlutterPlugin.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $SentryFlutterPlugin$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($SentryFlutterPlugin$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($SentryFlutterPlugin$Type) && + other is $SentryFlutterPlugin$Type; + } +} + +/// from: `io.sentry.Sentry$OptionsConfiguration` +class Sentry$OptionsConfiguration<$T extends jni$_.JObject?> + extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType> $type; + + @jni$_.internal + final jni$_.JObjType<$T> T; + + @jni$_.internal + Sentry$OptionsConfiguration.fromReference( + this.T, + jni$_.JReference reference, + ) : $type = type<$T>(T), + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'io/sentry/Sentry$OptionsConfiguration'); + + /// The type which includes information such as the signature of this class. + static $Sentry$OptionsConfiguration$NullableType<$T> + nullableType<$T extends jni$_.JObject?>( + jni$_.JObjType<$T> T, + ) { + return $Sentry$OptionsConfiguration$NullableType<$T>( + T, + ); + } + + static $Sentry$OptionsConfiguration$Type<$T> type<$T extends jni$_.JObject?>( + jni$_.JObjType<$T> T, + ) { + return $Sentry$OptionsConfiguration$Type<$T>( + T, + ); + } + + static final _id_configure = _class.instanceMethodId( + r'configure', + r'(Lio/sentry/SentryOptions;)V', ); static final _configure = jni$_.ProtectedJniExtensions.lookup< @@ -2853,13 +3598,13 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureEvent( + static SentryId captureEvent( jni$_.JObject sentryEvent, ) { final _$sentryEvent = sentryEvent.reference; return _captureEvent(_class.reference.pointer, _id_captureEvent as jni$_.JMethodIDPtr, _$sentryEvent.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureEvent$1 = _class.staticMethodId( @@ -2886,7 +3631,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureEvent$1( + static SentryId captureEvent$1( jni$_.JObject sentryEvent, ScopeCallback scopeCallback, ) { @@ -2897,7 +3642,7 @@ class Sentry extends jni$_.JObject { _id_captureEvent$1 as jni$_.JMethodIDPtr, _$sentryEvent.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureEvent$2 = _class.staticMethodId( @@ -2924,7 +3669,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureEvent$2( + static SentryId captureEvent$2( jni$_.JObject sentryEvent, jni$_.JObject? hint, ) { @@ -2935,7 +3680,7 @@ class Sentry extends jni$_.JObject { _id_captureEvent$2 as jni$_.JMethodIDPtr, _$sentryEvent.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureEvent$3 = _class.staticMethodId( @@ -2964,7 +3709,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureEvent$3( + static SentryId captureEvent$3( jni$_.JObject sentryEvent, jni$_.JObject? hint, ScopeCallback scopeCallback, @@ -2978,7 +3723,7 @@ class Sentry extends jni$_.JObject { _$sentryEvent.pointer, _$hint.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureMessage = _class.staticMethodId( @@ -2999,13 +3744,13 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureMessage( + static SentryId captureMessage( jni$_.JString string, ) { final _$string = string.reference; return _captureMessage(_class.reference.pointer, _id_captureMessage as jni$_.JMethodIDPtr, _$string.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureMessage$1 = _class.staticMethodId( @@ -3032,7 +3777,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureMessage$1( + static SentryId captureMessage$1( jni$_.JString string, ScopeCallback scopeCallback, ) { @@ -3043,7 +3788,7 @@ class Sentry extends jni$_.JObject { _id_captureMessage$1 as jni$_.JMethodIDPtr, _$string.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureMessage$2 = _class.staticMethodId( @@ -3070,7 +3815,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureMessage$2( + static SentryId captureMessage$2( jni$_.JString string, jni$_.JObject sentryLevel, ) { @@ -3081,7 +3826,7 @@ class Sentry extends jni$_.JObject { _id_captureMessage$2 as jni$_.JMethodIDPtr, _$string.pointer, _$sentryLevel.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureMessage$3 = _class.staticMethodId( @@ -3110,7 +3855,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureMessage$3( + static SentryId captureMessage$3( jni$_.JString string, jni$_.JObject sentryLevel, ScopeCallback scopeCallback, @@ -3124,7 +3869,7 @@ class Sentry extends jni$_.JObject { _$string.pointer, _$sentryLevel.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureFeedback = _class.staticMethodId( @@ -3145,13 +3890,13 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureFeedback( + static SentryId captureFeedback( jni$_.JObject feedback, ) { final _$feedback = feedback.reference; return _captureFeedback(_class.reference.pointer, _id_captureFeedback as jni$_.JMethodIDPtr, _$feedback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureFeedback$1 = _class.staticMethodId( @@ -3178,7 +3923,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureFeedback$1( + static SentryId captureFeedback$1( jni$_.JObject feedback, jni$_.JObject? hint, ) { @@ -3189,7 +3934,7 @@ class Sentry extends jni$_.JObject { _id_captureFeedback$1 as jni$_.JMethodIDPtr, _$feedback.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureFeedback$2 = _class.staticMethodId( @@ -3218,7 +3963,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureFeedback$2( + static SentryId captureFeedback$2( jni$_.JObject feedback, jni$_.JObject? hint, ScopeCallback? scopeCallback, @@ -3232,7 +3977,7 @@ class Sentry extends jni$_.JObject { _$feedback.pointer, _$hint.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureException = _class.staticMethodId( @@ -3253,13 +3998,13 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureException( + static SentryId captureException( jni$_.JObject throwable, ) { final _$throwable = throwable.reference; return _captureException(_class.reference.pointer, _id_captureException as jni$_.JMethodIDPtr, _$throwable.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureException$1 = _class.staticMethodId( @@ -3286,7 +4031,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureException$1( + static SentryId captureException$1( jni$_.JObject throwable, ScopeCallback scopeCallback, ) { @@ -3297,7 +4042,7 @@ class Sentry extends jni$_.JObject { _id_captureException$1 as jni$_.JMethodIDPtr, _$throwable.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureException$2 = _class.staticMethodId( @@ -3324,7 +4069,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureException$2( + static SentryId captureException$2( jni$_.JObject throwable, jni$_.JObject? hint, ) { @@ -3335,7 +4080,7 @@ class Sentry extends jni$_.JObject { _id_captureException$2 as jni$_.JMethodIDPtr, _$throwable.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureException$3 = _class.staticMethodId( @@ -3364,7 +4109,7 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureException$3( + static SentryId captureException$3( jni$_.JObject throwable, jni$_.JObject? hint, ScopeCallback scopeCallback, @@ -3378,7 +4123,7 @@ class Sentry extends jni$_.JObject { _$throwable.pointer, _$hint.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureUserFeedback = _class.staticMethodId( @@ -3802,10 +4547,10 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId getLastEventId()` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject getLastEventId() { + static SentryId getLastEventId() { return _getLastEventId( _class.reference.pointer, _id_getLastEventId as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_pushScope = _class.staticMethodId( @@ -4540,13 +5285,13 @@ class Sentry extends jni$_.JObject { /// from: `static public io.sentry.protocol.SentryId captureCheckIn(io.sentry.CheckIn checkIn)` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JObject captureCheckIn( + static SentryId captureCheckIn( jni$_.JObject checkIn, ) { final _$checkIn = checkIn.reference; return _captureCheckIn(_class.reference.pointer, _id_captureCheckIn as jni$_.JMethodIDPtr, _$checkIn.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_logger = _class.staticMethodId( @@ -4674,7 +5419,7 @@ class Sentry extends jni$_.JObject { /// from: `static public void showUserFeedbackDialog(io.sentry.protocol.SentryId sentryId, io.sentry.SentryFeedbackOptions$OptionsConfigurator optionsConfigurator)` static void showUserFeedbackDialog$2( - jni$_.JObject? sentryId, + SentryId? sentryId, jni$_.JObject? optionsConfigurator, ) { final _$sentryId = sentryId?.reference ?? jni$_.jNullReference; @@ -6588,7 +7333,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureEvent( + SentryId captureEvent( jni$_.JObject sentryEvent, jni$_.JObject? hint, ) { @@ -6599,7 +7344,7 @@ class ScopesAdapter extends jni$_.JObject { _id_captureEvent as jni$_.JMethodIDPtr, _$sentryEvent.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureEvent$1 = _class.instanceMethodId( @@ -6628,7 +7373,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureEvent$1( + SentryId captureEvent$1( jni$_.JObject sentryEvent, jni$_.JObject? hint, ScopeCallback scopeCallback, @@ -6642,7 +7387,7 @@ class ScopesAdapter extends jni$_.JObject { _$sentryEvent.pointer, _$hint.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureMessage = _class.instanceMethodId( @@ -6669,7 +7414,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureMessage( + SentryId captureMessage( jni$_.JString string, jni$_.JObject sentryLevel, ) { @@ -6680,7 +7425,7 @@ class ScopesAdapter extends jni$_.JObject { _id_captureMessage as jni$_.JMethodIDPtr, _$string.pointer, _$sentryLevel.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureMessage$1 = _class.instanceMethodId( @@ -6709,7 +7454,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureMessage$1( + SentryId captureMessage$1( jni$_.JString string, jni$_.JObject sentryLevel, ScopeCallback scopeCallback, @@ -6723,7 +7468,7 @@ class ScopesAdapter extends jni$_.JObject { _$string.pointer, _$sentryLevel.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureFeedback = _class.instanceMethodId( @@ -6744,13 +7489,13 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureFeedback( + SentryId captureFeedback( jni$_.JObject feedback, ) { final _$feedback = feedback.reference; return _captureFeedback(reference.pointer, _id_captureFeedback as jni$_.JMethodIDPtr, _$feedback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureFeedback$1 = _class.instanceMethodId( @@ -6777,7 +7522,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureFeedback$1( + SentryId captureFeedback$1( jni$_.JObject feedback, jni$_.JObject? hint, ) { @@ -6788,7 +7533,7 @@ class ScopesAdapter extends jni$_.JObject { _id_captureFeedback$1 as jni$_.JMethodIDPtr, _$feedback.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureFeedback$2 = _class.instanceMethodId( @@ -6817,7 +7562,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureFeedback$2( + SentryId captureFeedback$2( jni$_.JObject feedback, jni$_.JObject? hint, ScopeCallback? scopeCallback, @@ -6831,7 +7576,7 @@ class ScopesAdapter extends jni$_.JObject { _$feedback.pointer, _$hint.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureEnvelope = _class.instanceMethodId( @@ -6858,7 +7603,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureEnvelope(io.sentry.SentryEnvelope sentryEnvelope, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureEnvelope( + SentryId captureEnvelope( jni$_.JObject sentryEnvelope, jni$_.JObject? hint, ) { @@ -6869,7 +7614,7 @@ class ScopesAdapter extends jni$_.JObject { _id_captureEnvelope as jni$_.JMethodIDPtr, _$sentryEnvelope.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureException = _class.instanceMethodId( @@ -6896,7 +7641,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureException( + SentryId captureException( jni$_.JObject throwable, jni$_.JObject? hint, ) { @@ -6907,7 +7652,7 @@ class ScopesAdapter extends jni$_.JObject { _id_captureException as jni$_.JMethodIDPtr, _$throwable.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureException$1 = _class.instanceMethodId( @@ -6936,7 +7681,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureException$1( + SentryId captureException$1( jni$_.JObject throwable, jni$_.JObject? hint, ScopeCallback scopeCallback, @@ -6950,7 +7695,7 @@ class ScopesAdapter extends jni$_.JObject { _$throwable.pointer, _$hint.pointer, _$scopeCallback.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureUserFeedback = _class.instanceMethodId( @@ -7399,10 +8144,10 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId getLastEventId()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getLastEventId() { + SentryId getLastEventId() { return _getLastEventId( reference.pointer, _id_getLastEventId as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_pushScope = _class.instanceMethodId( @@ -7918,7 +8663,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureTransaction(io.sentry.protocol.SentryTransaction sentryTransaction, io.sentry.TraceContext traceContext, io.sentry.Hint hint, io.sentry.ProfilingTraceData profilingTraceData)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureTransaction( + SentryId captureTransaction( jni$_.JObject sentryTransaction, jni$_.JObject? traceContext, jni$_.JObject? hint, @@ -7936,7 +8681,7 @@ class ScopesAdapter extends jni$_.JObject { _$traceContext.pointer, _$hint.pointer, _$profilingTraceData.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_captureProfileChunk = _class.instanceMethodId( @@ -7957,7 +8702,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureProfileChunk(io.sentry.ProfileChunk profileChunk)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureProfileChunk( + SentryId captureProfileChunk( jni$_.JObject profileChunk, ) { final _$profileChunk = profileChunk.reference; @@ -7965,7 +8710,7 @@ class ScopesAdapter extends jni$_.JObject { reference.pointer, _id_captureProfileChunk as jni$_.JMethodIDPtr, _$profileChunk.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_startTransaction = _class.instanceMethodId( @@ -8343,13 +9088,13 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureCheckIn(io.sentry.CheckIn checkIn)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureCheckIn( + SentryId captureCheckIn( jni$_.JObject checkIn, ) { final _$checkIn = checkIn.reference; return _captureCheckIn(reference.pointer, _id_captureCheckIn as jni$_.JMethodIDPtr, _$checkIn.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_getRateLimiter = _class.instanceMethodId( @@ -8401,7 +9146,7 @@ class ScopesAdapter extends jni$_.JObject { /// from: `public io.sentry.protocol.SentryId captureReplay(io.sentry.SentryReplayEvent sentryReplayEvent, io.sentry.Hint hint)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject captureReplay( + SentryId captureReplay( jni$_.JObject sentryReplayEvent, jni$_.JObject? hint, ) { @@ -8412,7 +9157,7 @@ class ScopesAdapter extends jni$_.JObject { _id_captureReplay as jni$_.JMethodIDPtr, _$sentryReplayEvent.pointer, _$hint.pointer) - .object(const jni$_.JObjectType()); + .object(const $SentryId$Type()); } static final _id_logger = _class.instanceMethodId( @@ -8620,64 +9365,289 @@ class Scope$IWithPropagationContext extends jni$_.JObject { $p, _$invokePointer, [ - if ($impl.accept$async) r'accept(Lio/sentry/PropagationContext;)V', + if ($impl.accept$async) r'accept(Lio/sentry/PropagationContext;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory Scope$IWithPropagationContext.implement( + $Scope$IWithPropagationContext $impl, + ) { + final $i = jni$_.JImplementer(); + implementIn($i, $impl); + return Scope$IWithPropagationContext.fromReference( + $i.implementReference(), + ); + } +} + +abstract base mixin class $Scope$IWithPropagationContext { + factory $Scope$IWithPropagationContext({ + required void Function(jni$_.JObject propagationContext) accept, + bool accept$async, + }) = _$Scope$IWithPropagationContext; + + void accept(jni$_.JObject propagationContext); + bool get accept$async => false; +} + +final class _$Scope$IWithPropagationContext + with $Scope$IWithPropagationContext { + _$Scope$IWithPropagationContext({ + required void Function(jni$_.JObject propagationContext) accept, + this.accept$async = false, + }) : _accept = accept; + + final void Function(jni$_.JObject propagationContext) _accept; + final bool accept$async; + + void accept(jni$_.JObject propagationContext) { + return _accept(propagationContext); + } +} + +final class $Scope$IWithPropagationContext$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $Scope$IWithPropagationContext$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Scope$IWithPropagationContext;'; + + @jni$_.internal + @core$_.override + Scope$IWithPropagationContext? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : Scope$IWithPropagationContext.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Scope$IWithPropagationContext$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Scope$IWithPropagationContext$NullableType) && + other is $Scope$IWithPropagationContext$NullableType; + } +} + +final class $Scope$IWithPropagationContext$Type + extends jni$_.JObjType { + @jni$_.internal + const $Scope$IWithPropagationContext$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Scope$IWithPropagationContext;'; + + @jni$_.internal + @core$_.override + Scope$IWithPropagationContext fromReference(jni$_.JReference reference) => + Scope$IWithPropagationContext.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $Scope$IWithPropagationContext$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Scope$IWithPropagationContext$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Scope$IWithPropagationContext$Type) && + other is $Scope$IWithPropagationContext$Type; + } +} + +/// from: `io.sentry.Scope$IWithTransaction` +class Scope$IWithTransaction extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Scope$IWithTransaction.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'io/sentry/Scope$IWithTransaction'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Scope$IWithTransaction$NullableType(); + static const type = $Scope$IWithTransaction$Type(); + static final _id_accept = _class.instanceMethodId( + r'accept', + r'(Lio/sentry/ITransaction;)V', + ); + + static final _accept = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract void accept(io.sentry.ITransaction iTransaction)` + void accept( + jni$_.JObject? iTransaction, + ) { + final _$iTransaction = iTransaction?.reference ?? jni$_.jNullReference; + _accept(reference.pointer, _id_accept as jni$_.JMethodIDPtr, + _$iTransaction.pointer) + .check(); + } + + /// Maps a specific port to the implemented interface. + static final core$_.Map _$impls = {}; + static jni$_.JObjectPtr _$invoke( + int port, + jni$_.JObjectPtr descriptor, + jni$_.JObjectPtr args, + ) { + return _$invokeMethod( + port, + jni$_.MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final jni$_.Pointer< + jni$_.NativeFunction< + jni$_.JObjectPtr Function( + jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)>> + _$invokePointer = jni$_.Pointer.fromFunction(_$invoke); + + static jni$_.Pointer _$invokeMethod( + int $p, + jni$_.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'accept(Lio/sentry/ITransaction;)V') { + _$impls[$p]!.accept( + $a![0]?.as(const jni$_.JObjectType(), releaseOriginal: true), + ); + return jni$_.nullptr; + } + } catch (e) { + return jni$_.ProtectedJniExtensions.newDartException(e); + } + return jni$_.nullptr; + } + + static void implementIn( + jni$_.JImplementer implementer, + $Scope$IWithTransaction $impl, + ) { + late final jni$_.RawReceivePort $p; + $p = jni$_.RawReceivePort(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = jni$_.MethodInvocation.fromMessage($m); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + jni$_.ProtectedJniExtensions.returnResult($i.result, $r); + }); + implementer.add( + r'io.sentry.Scope$IWithTransaction', + $p, + _$invokePointer, + [ + if ($impl.accept$async) r'accept(Lio/sentry/ITransaction;)V', ], ); final $a = $p.sendPort.nativePort; _$impls[$a] = $impl; } - factory Scope$IWithPropagationContext.implement( - $Scope$IWithPropagationContext $impl, + factory Scope$IWithTransaction.implement( + $Scope$IWithTransaction $impl, ) { final $i = jni$_.JImplementer(); implementIn($i, $impl); - return Scope$IWithPropagationContext.fromReference( + return Scope$IWithTransaction.fromReference( $i.implementReference(), ); } } -abstract base mixin class $Scope$IWithPropagationContext { - factory $Scope$IWithPropagationContext({ - required void Function(jni$_.JObject propagationContext) accept, +abstract base mixin class $Scope$IWithTransaction { + factory $Scope$IWithTransaction({ + required void Function(jni$_.JObject? iTransaction) accept, bool accept$async, - }) = _$Scope$IWithPropagationContext; + }) = _$Scope$IWithTransaction; - void accept(jni$_.JObject propagationContext); + void accept(jni$_.JObject? iTransaction); bool get accept$async => false; } -final class _$Scope$IWithPropagationContext - with $Scope$IWithPropagationContext { - _$Scope$IWithPropagationContext({ - required void Function(jni$_.JObject propagationContext) accept, +final class _$Scope$IWithTransaction with $Scope$IWithTransaction { + _$Scope$IWithTransaction({ + required void Function(jni$_.JObject? iTransaction) accept, this.accept$async = false, }) : _accept = accept; - final void Function(jni$_.JObject propagationContext) _accept; + final void Function(jni$_.JObject? iTransaction) _accept; final bool accept$async; - void accept(jni$_.JObject propagationContext) { - return _accept(propagationContext); + void accept(jni$_.JObject? iTransaction) { + return _accept(iTransaction); } } -final class $Scope$IWithPropagationContext$NullableType - extends jni$_.JObjType { +final class $Scope$IWithTransaction$NullableType + extends jni$_.JObjType { @jni$_.internal - const $Scope$IWithPropagationContext$NullableType(); + const $Scope$IWithTransaction$NullableType(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/Scope$IWithPropagationContext;'; + String get signature => r'Lio/sentry/Scope$IWithTransaction;'; @jni$_.internal @core$_.override - Scope$IWithPropagationContext? fromReference(jni$_.JReference reference) => + Scope$IWithTransaction? fromReference(jni$_.JReference reference) => reference.isNull ? null - : Scope$IWithPropagationContext.fromReference( + : Scope$IWithTransaction.fromReference( reference, ); @jni$_.internal @@ -8686,35 +9656,35 @@ final class $Scope$IWithPropagationContext$NullableType @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => this; + jni$_.JObjType get nullableType => this; @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($Scope$IWithPropagationContext$NullableType).hashCode; + int get hashCode => ($Scope$IWithTransaction$NullableType).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($Scope$IWithPropagationContext$NullableType) && - other is $Scope$IWithPropagationContext$NullableType; + return other.runtimeType == ($Scope$IWithTransaction$NullableType) && + other is $Scope$IWithTransaction$NullableType; } } -final class $Scope$IWithPropagationContext$Type - extends jni$_.JObjType { +final class $Scope$IWithTransaction$Type + extends jni$_.JObjType { @jni$_.internal - const $Scope$IWithPropagationContext$Type(); + const $Scope$IWithTransaction$Type(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/Scope$IWithPropagationContext;'; + String get signature => r'Lio/sentry/Scope$IWithTransaction;'; @jni$_.internal @core$_.override - Scope$IWithPropagationContext fromReference(jni$_.JReference reference) => - Scope$IWithPropagationContext.fromReference( + Scope$IWithTransaction fromReference(jni$_.JReference reference) => + Scope$IWithTransaction.fromReference( reference, ); @jni$_.internal @@ -8723,47 +9693,223 @@ final class $Scope$IWithPropagationContext$Type @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => - const $Scope$IWithPropagationContext$NullableType(); + jni$_.JObjType get nullableType => + const $Scope$IWithTransaction$NullableType(); @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($Scope$IWithPropagationContext$Type).hashCode; + int get hashCode => ($Scope$IWithTransaction$Type).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($Scope$IWithPropagationContext$Type) && - other is $Scope$IWithPropagationContext$Type; + return other.runtimeType == ($Scope$IWithTransaction$Type) && + other is $Scope$IWithTransaction$Type; } } -/// from: `io.sentry.Scope$IWithTransaction` -class Scope$IWithTransaction extends jni$_.JObject { +/// from: `io.sentry.Scope` +class Scope extends jni$_.JObject { @jni$_.internal @core$_.override - final jni$_.JObjType $type; + final jni$_.JObjType $type; @jni$_.internal - Scope$IWithTransaction.fromReference( + Scope.fromReference( jni$_.JReference reference, ) : $type = type, super.fromReference(reference); - static final _class = - jni$_.JClass.forName(r'io/sentry/Scope$IWithTransaction'); + static final _class = jni$_.JClass.forName(r'io/sentry/Scope'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Scope$NullableType(); + static const type = $Scope$Type(); + static final _id_new$ = _class.constructorId( + r'(Lio/sentry/SentryOptions;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void (io.sentry.SentryOptions sentryOptions)` + /// The returned object must be released after use, by calling the [release] method. + factory Scope( + jni$_.JObject sentryOptions, + ) { + final _$sentryOptions = sentryOptions.reference; + return Scope.fromReference(_new$(_class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, _$sentryOptions.pointer) + .reference); + } + + static final _id_getLevel = _class.instanceMethodId( + r'getLevel', + r'()Lio/sentry/SentryLevel;', + ); + + static final _getLevel = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.SentryLevel getLevel()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getLevel() { + return _getLevel(reference.pointer, _id_getLevel as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_setLevel = _class.instanceMethodId( + r'setLevel', + r'(Lio/sentry/SentryLevel;)V', + ); + + static final _setLevel = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setLevel(io.sentry.SentryLevel sentryLevel)` + void setLevel( + jni$_.JObject? sentryLevel, + ) { + final _$sentryLevel = sentryLevel?.reference ?? jni$_.jNullReference; + _setLevel(reference.pointer, _id_setLevel as jni$_.JMethodIDPtr, + _$sentryLevel.pointer) + .check(); + } + + static final _id_getTransactionName = _class.instanceMethodId( + r'getTransactionName', + r'()Ljava/lang/String;', + ); + + static final _getTransactionName = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getTransactionName()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getTransactionName() { + return _getTransactionName( + reference.pointer, _id_getTransactionName as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_setTransaction = _class.instanceMethodId( + r'setTransaction', + r'(Ljava/lang/String;)V', + ); + + static final _setTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setTransaction(java.lang.String string)` + void setTransaction( + jni$_.JString string, + ) { + final _$string = string.reference; + _setTransaction(reference.pointer, _id_setTransaction as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getSpan = _class.instanceMethodId( + r'getSpan', + r'()Lio/sentry/ISpan;', + ); + + static final _getSpan = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.ISpan getSpan()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getSpan() { + return _getSpan(reference.pointer, _id_getSpan as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_setActiveSpan = _class.instanceMethodId( + r'setActiveSpan', + r'(Lio/sentry/ISpan;)V', + ); + + static final _setActiveSpan = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setActiveSpan(io.sentry.ISpan iSpan)` + void setActiveSpan( + jni$_.JObject? iSpan, + ) { + final _$iSpan = iSpan?.reference ?? jni$_.jNullReference; + _setActiveSpan(reference.pointer, _id_setActiveSpan as jni$_.JMethodIDPtr, + _$iSpan.pointer) + .check(); + } - /// The type which includes information such as the signature of this class. - static const nullableType = $Scope$IWithTransaction$NullableType(); - static const type = $Scope$IWithTransaction$Type(); - static final _id_accept = _class.instanceMethodId( - r'accept', + static final _id_setTransaction$1 = _class.instanceMethodId( + r'setTransaction', r'(Lio/sentry/ITransaction;)V', ); - static final _accept = jni$_.ProtectedJniExtensions.lookup< + static final _setTransaction$1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -8774,246 +9920,275 @@ class Scope$IWithTransaction extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public abstract void accept(io.sentry.ITransaction iTransaction)` - void accept( + /// from: `public void setTransaction(io.sentry.ITransaction iTransaction)` + void setTransaction$1( jni$_.JObject? iTransaction, ) { final _$iTransaction = iTransaction?.reference ?? jni$_.jNullReference; - _accept(reference.pointer, _id_accept as jni$_.JMethodIDPtr, - _$iTransaction.pointer) + _setTransaction$1(reference.pointer, + _id_setTransaction$1 as jni$_.JMethodIDPtr, _$iTransaction.pointer) .check(); } - /// Maps a specific port to the implemented interface. - static final core$_.Map _$impls = {}; - static jni$_.JObjectPtr _$invoke( - int port, - jni$_.JObjectPtr descriptor, - jni$_.JObjectPtr args, - ) { - return _$invokeMethod( - port, - jni$_.MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } + static final _id_getUser = _class.instanceMethodId( + r'getUser', + r'()Lio/sentry/protocol/User;', + ); - static final jni$_.Pointer< + static final _getUser = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JObjectPtr Function( - jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)>> - _$invokePointer = jni$_.Pointer.fromFunction(_$invoke); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - static jni$_.Pointer _$invokeMethod( - int $p, - jni$_.MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == r'accept(Lio/sentry/ITransaction;)V') { - _$impls[$p]!.accept( - $a![0]?.as(const jni$_.JObjectType(), releaseOriginal: true), - ); - return jni$_.nullptr; - } - } catch (e) { - return jni$_.ProtectedJniExtensions.newDartException(e); - } - return jni$_.nullptr; + /// from: `public io.sentry.protocol.User getUser()` + /// The returned object must be released after use, by calling the [release] method. + User? getUser() { + return _getUser(reference.pointer, _id_getUser as jni$_.JMethodIDPtr) + .object(const $User$NullableType()); } - static void implementIn( - jni$_.JImplementer implementer, - $Scope$IWithTransaction $impl, - ) { - late final jni$_.RawReceivePort $p; - $p = jni$_.RawReceivePort(($m) { - if ($m == null) { - _$impls.remove($p.sendPort.nativePort); - $p.close(); - return; - } - final $i = jni$_.MethodInvocation.fromMessage($m); - final $r = _$invokeMethod($p.sendPort.nativePort, $i); - jni$_.ProtectedJniExtensions.returnResult($i.result, $r); - }); - implementer.add( - r'io.sentry.Scope$IWithTransaction', - $p, - _$invokePointer, - [ - if ($impl.accept$async) r'accept(Lio/sentry/ITransaction;)V', - ], - ); - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - } + static final _id_setUser = _class.instanceMethodId( + r'setUser', + r'(Lio/sentry/protocol/User;)V', + ); - factory Scope$IWithTransaction.implement( - $Scope$IWithTransaction $impl, + static final _setUser = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setUser(io.sentry.protocol.User user)` + void setUser( + User? user, ) { - final $i = jni$_.JImplementer(); - implementIn($i, $impl); - return Scope$IWithTransaction.fromReference( - $i.implementReference(), - ); + final _$user = user?.reference ?? jni$_.jNullReference; + _setUser(reference.pointer, _id_setUser as jni$_.JMethodIDPtr, + _$user.pointer) + .check(); } -} -abstract base mixin class $Scope$IWithTransaction { - factory $Scope$IWithTransaction({ - required void Function(jni$_.JObject? iTransaction) accept, - bool accept$async, - }) = _$Scope$IWithTransaction; + static final _id_getScreen = _class.instanceMethodId( + r'getScreen', + r'()Ljava/lang/String;', + ); - void accept(jni$_.JObject? iTransaction); - bool get accept$async => false; -} + static final _getScreen = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); -final class _$Scope$IWithTransaction with $Scope$IWithTransaction { - _$Scope$IWithTransaction({ - required void Function(jni$_.JObject? iTransaction) accept, - this.accept$async = false, - }) : _accept = accept; + /// from: `public java.lang.String getScreen()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getScreen() { + return _getScreen(reference.pointer, _id_getScreen as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } - final void Function(jni$_.JObject? iTransaction) _accept; - final bool accept$async; + static final _id_setScreen = _class.instanceMethodId( + r'setScreen', + r'(Ljava/lang/String;)V', + ); - void accept(jni$_.JObject? iTransaction) { - return _accept(iTransaction); - } -} + static final _setScreen = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); -final class $Scope$IWithTransaction$NullableType - extends jni$_.JObjType { - @jni$_.internal - const $Scope$IWithTransaction$NullableType(); + /// from: `public void setScreen(java.lang.String string)` + void setScreen( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setScreen(reference.pointer, _id_setScreen as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } - @jni$_.internal - @core$_.override - String get signature => r'Lio/sentry/Scope$IWithTransaction;'; + static final _id_getReplayId = _class.instanceMethodId( + r'getReplayId', + r'()Lio/sentry/protocol/SentryId;', + ); - @jni$_.internal - @core$_.override - Scope$IWithTransaction? fromReference(jni$_.JReference reference) => - reference.isNull - ? null - : Scope$IWithTransaction.fromReference( - reference, - ); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + static final _getReplayId = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => this; + /// from: `public io.sentry.protocol.SentryId getReplayId()` + /// The returned object must be released after use, by calling the [release] method. + SentryId getReplayId() { + return _getReplayId( + reference.pointer, _id_getReplayId as jni$_.JMethodIDPtr) + .object(const $SentryId$Type()); + } - @jni$_.internal - @core$_.override - final superCount = 1; + static final _id_setReplayId = _class.instanceMethodId( + r'setReplayId', + r'(Lio/sentry/protocol/SentryId;)V', + ); - @core$_.override - int get hashCode => ($Scope$IWithTransaction$NullableType).hashCode; + static final _setReplayId = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Scope$IWithTransaction$NullableType) && - other is $Scope$IWithTransaction$NullableType; + /// from: `public void setReplayId(io.sentry.protocol.SentryId sentryId)` + void setReplayId( + SentryId sentryId, + ) { + final _$sentryId = sentryId.reference; + _setReplayId(reference.pointer, _id_setReplayId as jni$_.JMethodIDPtr, + _$sentryId.pointer) + .check(); } -} - -final class $Scope$IWithTransaction$Type - extends jni$_.JObjType { - @jni$_.internal - const $Scope$IWithTransaction$Type(); - @jni$_.internal - @core$_.override - String get signature => r'Lio/sentry/Scope$IWithTransaction;'; + static final _id_getRequest = _class.instanceMethodId( + r'getRequest', + r'()Lio/sentry/protocol/Request;', + ); - @jni$_.internal - @core$_.override - Scope$IWithTransaction fromReference(jni$_.JReference reference) => - Scope$IWithTransaction.fromReference( - reference, - ); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + static final _getRequest = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => - const $Scope$IWithTransaction$NullableType(); + /// from: `public io.sentry.protocol.Request getRequest()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getRequest() { + return _getRequest(reference.pointer, _id_getRequest as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } - @jni$_.internal - @core$_.override - final superCount = 1; + static final _id_setRequest = _class.instanceMethodId( + r'setRequest', + r'(Lio/sentry/protocol/Request;)V', + ); - @core$_.override - int get hashCode => ($Scope$IWithTransaction$Type).hashCode; + static final _setRequest = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($Scope$IWithTransaction$Type) && - other is $Scope$IWithTransaction$Type; + /// from: `public void setRequest(io.sentry.protocol.Request request)` + void setRequest( + jni$_.JObject? request, + ) { + final _$request = request?.reference ?? jni$_.jNullReference; + _setRequest(reference.pointer, _id_setRequest as jni$_.JMethodIDPtr, + _$request.pointer) + .check(); } -} -/// from: `io.sentry.Scope` -class Scope extends jni$_.JObject { - @jni$_.internal - @core$_.override - final jni$_.JObjType $type; + static final _id_getFingerprint = _class.instanceMethodId( + r'getFingerprint', + r'()Ljava/util/List;', + ); - @jni$_.internal - Scope.fromReference( - jni$_.JReference reference, - ) : $type = type, - super.fromReference(reference); + static final _getFingerprint = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - static final _class = jni$_.JClass.forName(r'io/sentry/Scope'); + /// from: `public java.util.List getFingerprint()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getFingerprint() { + return _getFingerprint( + reference.pointer, _id_getFingerprint as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JStringNullableType())); + } - /// The type which includes information such as the signature of this class. - static const nullableType = $Scope$NullableType(); - static const type = $Scope$Type(); - static final _id_new$ = _class.constructorId( - r'(Lio/sentry/SentryOptions;)V', + static final _id_setFingerprint = _class.instanceMethodId( + r'setFingerprint', + r'(Ljava/util/List;)V', ); - static final _new$ = jni$_.ProtectedJniExtensions.lookup< + static final _setFingerprint = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JniResult Function( + jni$_.JThrowablePtr Function( jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_NewObject') + 'globalEnv_CallVoidMethod') .asFunction< - jni$_.JniResult Function(jni$_.Pointer, + jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void (io.sentry.SentryOptions sentryOptions)` - /// The returned object must be released after use, by calling the [release] method. - factory Scope( - jni$_.JObject sentryOptions, + /// from: `public void setFingerprint(java.util.List list)` + void setFingerprint( + jni$_.JList list, ) { - final _$sentryOptions = sentryOptions.reference; - return Scope.fromReference(_new$(_class.reference.pointer, - _id_new$ as jni$_.JMethodIDPtr, _$sentryOptions.pointer) - .reference); + final _$list = list.reference; + _setFingerprint(reference.pointer, _id_setFingerprint as jni$_.JMethodIDPtr, + _$list.pointer) + .check(); } - static final _id_getLevel = _class.instanceMethodId( - r'getLevel', - r'()Lio/sentry/SentryLevel;', + static final _id_getBreadcrumbs = _class.instanceMethodId( + r'getBreadcrumbs', + r'()Ljava/util/Queue;', ); - static final _getLevel = jni$_.ProtectedJniExtensions.lookup< + static final _getBreadcrumbs = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9025,19 +10200,54 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public io.sentry.SentryLevel getLevel()` + /// from: `public java.util.Queue getBreadcrumbs()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getLevel() { - return _getLevel(reference.pointer, _id_getLevel as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); + jni$_.JObject getBreadcrumbs() { + return _getBreadcrumbs( + reference.pointer, _id_getBreadcrumbs as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); } - static final _id_setLevel = _class.instanceMethodId( - r'setLevel', - r'(Lio/sentry/SentryLevel;)V', + static final _id_addBreadcrumb = _class.instanceMethodId( + r'addBreadcrumb', + r'(Lio/sentry/Breadcrumb;Lio/sentry/Hint;)V', ); - static final _setLevel = jni$_.ProtectedJniExtensions.lookup< + static final _addBreadcrumb = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb, io.sentry.Hint hint)` + void addBreadcrumb( + Breadcrumb breadcrumb, + jni$_.JObject? hint, + ) { + final _$breadcrumb = breadcrumb.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + _addBreadcrumb(reference.pointer, _id_addBreadcrumb as jni$_.JMethodIDPtr, + _$breadcrumb.pointer, _$hint.pointer) + .check(); + } + + static final _id_addBreadcrumb$1 = _class.instanceMethodId( + r'addBreadcrumb', + r'(Lio/sentry/Breadcrumb;)V', + ); + + static final _addBreadcrumb$1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -9045,25 +10255,73 @@ class Scope extends jni$_.JObject { jni$_.VarArgs<(jni$_.Pointer,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb)` + void addBreadcrumb$1( + Breadcrumb breadcrumb, + ) { + final _$breadcrumb = breadcrumb.reference; + _addBreadcrumb$1(reference.pointer, + _id_addBreadcrumb$1 as jni$_.JMethodIDPtr, _$breadcrumb.pointer) + .check(); + } + + static final _id_clearBreadcrumbs = _class.instanceMethodId( + r'clearBreadcrumbs', + r'()V', + ); + + static final _clearBreadcrumbs = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void clearBreadcrumbs()` + void clearBreadcrumbs() { + _clearBreadcrumbs( + reference.pointer, _id_clearBreadcrumbs as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_clearTransaction = _class.instanceMethodId( + r'clearTransaction', + r'()V', + ); + + static final _clearTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void setLevel(io.sentry.SentryLevel sentryLevel)` - void setLevel( - jni$_.JObject? sentryLevel, - ) { - final _$sentryLevel = sentryLevel?.reference ?? jni$_.jNullReference; - _setLevel(reference.pointer, _id_setLevel as jni$_.JMethodIDPtr, - _$sentryLevel.pointer) + /// from: `public void clearTransaction()` + void clearTransaction() { + _clearTransaction( + reference.pointer, _id_clearTransaction as jni$_.JMethodIDPtr) .check(); } - static final _id_getTransactionName = _class.instanceMethodId( - r'getTransactionName', - r'()Ljava/lang/String;', + static final _id_getTransaction = _class.instanceMethodId( + r'getTransaction', + r'()Lio/sentry/ITransaction;', ); - static final _getTransactionName = jni$_.ProtectedJniExtensions.lookup< + static final _getTransaction = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9075,46 +10333,42 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public java.lang.String getTransactionName()` + /// from: `public io.sentry.ITransaction getTransaction()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getTransactionName() { - return _getTransactionName( - reference.pointer, _id_getTransactionName as jni$_.JMethodIDPtr) - .object(const jni$_.JStringNullableType()); + jni$_.JObject? getTransaction() { + return _getTransaction( + reference.pointer, _id_getTransaction as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); } - static final _id_setTransaction = _class.instanceMethodId( - r'setTransaction', - r'(Ljava/lang/String;)V', + static final _id_clear = _class.instanceMethodId( + r'clear', + r'()V', ); - static final _setTransaction = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _clear = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void setTransaction(java.lang.String string)` - void setTransaction( - jni$_.JString string, - ) { - final _$string = string.reference; - _setTransaction(reference.pointer, _id_setTransaction as jni$_.JMethodIDPtr, - _$string.pointer) - .check(); + /// from: `public void clear()` + void clear() { + _clear(reference.pointer, _id_clear as jni$_.JMethodIDPtr).check(); } - static final _id_getSpan = _class.instanceMethodId( - r'getSpan', - r'()Lio/sentry/ISpan;', + static final _id_getTags = _class.instanceMethodId( + r'getTags', + r'()Ljava/util/Map;', ); - static final _getSpan = jni$_.ProtectedJniExtensions.lookup< + static final _getTags = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9126,45 +10380,55 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public io.sentry.ISpan getSpan()` + /// from: `public java.util.Map getTags()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getSpan() { - return _getSpan(reference.pointer, _id_getSpan as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); + jni$_.JMap getTags() { + return _getTags(reference.pointer, _id_getTags as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); } - static final _id_setActiveSpan = _class.instanceMethodId( - r'setActiveSpan', - r'(Lio/sentry/ISpan;)V', + static final _id_setTag = _class.instanceMethodId( + r'setTag', + r'(Ljava/lang/String;Ljava/lang/String;)V', ); - static final _setActiveSpan = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _setTag = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public void setActiveSpan(io.sentry.ISpan iSpan)` - void setActiveSpan( - jni$_.JObject? iSpan, + /// from: `public void setTag(java.lang.String string, java.lang.String string1)` + void setTag( + jni$_.JString? string, + jni$_.JString? string1, ) { - final _$iSpan = iSpan?.reference ?? jni$_.jNullReference; - _setActiveSpan(reference.pointer, _id_setActiveSpan as jni$_.JMethodIDPtr, - _$iSpan.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + _setTag(reference.pointer, _id_setTag as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) .check(); } - static final _id_setTransaction$1 = _class.instanceMethodId( - r'setTransaction', - r'(Lio/sentry/ITransaction;)V', + static final _id_removeTag = _class.instanceMethodId( + r'removeTag', + r'(Ljava/lang/String;)V', ); - static final _setTransaction$1 = jni$_.ProtectedJniExtensions.lookup< + static final _removeTag = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -9175,22 +10439,22 @@ class Scope extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void setTransaction(io.sentry.ITransaction iTransaction)` - void setTransaction$1( - jni$_.JObject? iTransaction, + /// from: `public void removeTag(java.lang.String string)` + void removeTag( + jni$_.JString? string, ) { - final _$iTransaction = iTransaction?.reference ?? jni$_.jNullReference; - _setTransaction$1(reference.pointer, - _id_setTransaction$1 as jni$_.JMethodIDPtr, _$iTransaction.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + _removeTag(reference.pointer, _id_removeTag as jni$_.JMethodIDPtr, + _$string.pointer) .check(); } - static final _id_getUser = _class.instanceMethodId( - r'getUser', - r'()Lio/sentry/protocol/User;', + static final _id_getExtras = _class.instanceMethodId( + r'getExtras', + r'()Ljava/util/Map;', ); - static final _getUser = jni$_.ProtectedJniExtensions.lookup< + static final _getExtras = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9202,69 +10466,55 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public io.sentry.protocol.User getUser()` + /// from: `public java.util.Map getExtras()` /// The returned object must be released after use, by calling the [release] method. - User? getUser() { - return _getUser(reference.pointer, _id_getUser as jni$_.JMethodIDPtr) - .object(const $User$NullableType()); + jni$_.JMap getExtras() { + return _getExtras(reference.pointer, _id_getExtras as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JStringNullableType(), jni$_.JObjectNullableType())); } - static final _id_setUser = _class.instanceMethodId( - r'setUser', - r'(Lio/sentry/protocol/User;)V', + static final _id_setExtra = _class.instanceMethodId( + r'setExtra', + r'(Ljava/lang/String;Ljava/lang/String;)V', ); - static final _setUser = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _setExtra = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public void setUser(io.sentry.protocol.User user)` - void setUser( - User? user, + /// from: `public void setExtra(java.lang.String string, java.lang.String string1)` + void setExtra( + jni$_.JString? string, + jni$_.JString? string1, ) { - final _$user = user?.reference ?? jni$_.jNullReference; - _setUser(reference.pointer, _id_setUser as jni$_.JMethodIDPtr, - _$user.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + _setExtra(reference.pointer, _id_setExtra as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) .check(); } - static final _id_getScreen = _class.instanceMethodId( - r'getScreen', - r'()Ljava/lang/String;', - ); - - static final _getScreen = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public java.lang.String getScreen()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getScreen() { - return _getScreen(reference.pointer, _id_getScreen as jni$_.JMethodIDPtr) - .object(const jni$_.JStringNullableType()); - } - - static final _id_setScreen = _class.instanceMethodId( - r'setScreen', + static final _id_removeExtra = _class.instanceMethodId( + r'removeExtra', r'(Ljava/lang/String;)V', ); - static final _setScreen = jni$_.ProtectedJniExtensions.lookup< + static final _removeExtra = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -9275,22 +10525,22 @@ class Scope extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void setScreen(java.lang.String string)` - void setScreen( + /// from: `public void removeExtra(java.lang.String string)` + void removeExtra( jni$_.JString? string, ) { final _$string = string?.reference ?? jni$_.jNullReference; - _setScreen(reference.pointer, _id_setScreen as jni$_.JMethodIDPtr, + _removeExtra(reference.pointer, _id_removeExtra as jni$_.JMethodIDPtr, _$string.pointer) .check(); } - static final _id_getReplayId = _class.instanceMethodId( - r'getReplayId', - r'()Lio/sentry/protocol/SentryId;', + static final _id_getContexts = _class.instanceMethodId( + r'getContexts', + r'()Lio/sentry/protocol/Contexts;', ); - static final _getReplayId = jni$_.ProtectedJniExtensions.lookup< + static final _getContexts = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9302,173 +10552,224 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public io.sentry.protocol.SentryId getReplayId()` + /// from: `public io.sentry.protocol.Contexts getContexts()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getReplayId() { - return _getReplayId( - reference.pointer, _id_getReplayId as jni$_.JMethodIDPtr) + jni$_.JObject getContexts() { + return _getContexts( + reference.pointer, _id_getContexts as jni$_.JMethodIDPtr) .object(const jni$_.JObjectType()); } - static final _id_setReplayId = _class.instanceMethodId( - r'setReplayId', - r'(Lio/sentry/protocol/SentryId;)V', + static final _id_setContexts = _class.instanceMethodId( + r'setContexts', + r'(Ljava/lang/String;Ljava/lang/Object;)V', ); - static final _setReplayId = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _setContexts = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public void setReplayId(io.sentry.protocol.SentryId sentryId)` - void setReplayId( - jni$_.JObject sentryId, + /// from: `public void setContexts(java.lang.String string, java.lang.Object object)` + void setContexts( + jni$_.JString? string, + jni$_.JObject? object, ) { - final _$sentryId = sentryId.reference; - _setReplayId(reference.pointer, _id_setReplayId as jni$_.JMethodIDPtr, - _$sentryId.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + _setContexts(reference.pointer, _id_setContexts as jni$_.JMethodIDPtr, + _$string.pointer, _$object.pointer) .check(); } - static final _id_getRequest = _class.instanceMethodId( - r'getRequest', - r'()Lio/sentry/protocol/Request;', + static final _id_setContexts$1 = _class.instanceMethodId( + r'setContexts', + r'(Ljava/lang/String;Ljava/lang/Boolean;)V', ); - static final _getRequest = jni$_.ProtectedJniExtensions.lookup< + static final _setContexts$1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public io.sentry.protocol.Request getRequest()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getRequest() { - return _getRequest(reference.pointer, _id_getRequest as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); + /// from: `public void setContexts(java.lang.String string, java.lang.Boolean boolean)` + void setContexts$1( + jni$_.JString? string, + jni$_.JBoolean? boolean, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + _setContexts$1(reference.pointer, _id_setContexts$1 as jni$_.JMethodIDPtr, + _$string.pointer, _$boolean.pointer) + .check(); } - static final _id_setRequest = _class.instanceMethodId( - r'setRequest', - r'(Lio/sentry/protocol/Request;)V', + static final _id_setContexts$2 = _class.instanceMethodId( + r'setContexts', + r'(Ljava/lang/String;Ljava/lang/String;)V', ); - static final _setRequest = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _setContexts$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public void setRequest(io.sentry.protocol.Request request)` - void setRequest( - jni$_.JObject? request, + /// from: `public void setContexts(java.lang.String string, java.lang.String string1)` + void setContexts$2( + jni$_.JString? string, + jni$_.JString? string1, ) { - final _$request = request?.reference ?? jni$_.jNullReference; - _setRequest(reference.pointer, _id_setRequest as jni$_.JMethodIDPtr, - _$request.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + _setContexts$2(reference.pointer, _id_setContexts$2 as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) .check(); } - static final _id_getFingerprint = _class.instanceMethodId( - r'getFingerprint', - r'()Ljava/util/List;', + static final _id_setContexts$3 = _class.instanceMethodId( + r'setContexts', + r'(Ljava/lang/String;Ljava/lang/Number;)V', ); - static final _getFingerprint = jni$_.ProtectedJniExtensions.lookup< + static final _setContexts$3 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public java.util.List getFingerprint()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JList getFingerprint() { - return _getFingerprint( - reference.pointer, _id_getFingerprint as jni$_.JMethodIDPtr) - .object>( - const jni$_.JListType(jni$_.JStringNullableType())); + /// from: `public void setContexts(java.lang.String string, java.lang.Number number)` + void setContexts$3( + jni$_.JString? string, + jni$_.JNumber? number, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$number = number?.reference ?? jni$_.jNullReference; + _setContexts$3(reference.pointer, _id_setContexts$3 as jni$_.JMethodIDPtr, + _$string.pointer, _$number.pointer) + .check(); } - static final _id_setFingerprint = _class.instanceMethodId( - r'setFingerprint', - r'(Ljava/util/List;)V', + static final _id_setContexts$4 = _class.instanceMethodId( + r'setContexts', + r'(Ljava/lang/String;Ljava/util/Collection;)V', ); - static final _setFingerprint = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + static final _setContexts$4 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public void setFingerprint(java.util.List list)` - void setFingerprint( - jni$_.JList list, + /// from: `public void setContexts(java.lang.String string, java.util.Collection collection)` + void setContexts$4( + jni$_.JString? string, + jni$_.JObject? collection, ) { - final _$list = list.reference; - _setFingerprint(reference.pointer, _id_setFingerprint as jni$_.JMethodIDPtr, - _$list.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + final _$collection = collection?.reference ?? jni$_.jNullReference; + _setContexts$4(reference.pointer, _id_setContexts$4 as jni$_.JMethodIDPtr, + _$string.pointer, _$collection.pointer) .check(); } - static final _id_getBreadcrumbs = _class.instanceMethodId( - r'getBreadcrumbs', - r'()Ljava/util/Queue;', + static final _id_setContexts$5 = _class.instanceMethodId( + r'setContexts', + r'(Ljava/lang/String;[Ljava/lang/Object;)V', ); - static final _getBreadcrumbs = jni$_.ProtectedJniExtensions.lookup< + static final _setContexts$5 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public java.util.Queue getBreadcrumbs()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getBreadcrumbs() { - return _getBreadcrumbs( - reference.pointer, _id_getBreadcrumbs as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); + /// from: `public void setContexts(java.lang.String string, java.lang.Object[] objects)` + void setContexts$5( + jni$_.JString? string, + jni$_.JArray? objects, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$objects = objects?.reference ?? jni$_.jNullReference; + _setContexts$5(reference.pointer, _id_setContexts$5 as jni$_.JMethodIDPtr, + _$string.pointer, _$objects.pointer) + .check(); } - static final _id_addBreadcrumb = _class.instanceMethodId( - r'addBreadcrumb', - r'(Lio/sentry/Breadcrumb;Lio/sentry/Hint;)V', + static final _id_setContexts$6 = _class.instanceMethodId( + r'setContexts', + r'(Ljava/lang/String;Ljava/lang/Character;)V', ); - static final _addBreadcrumb = jni$_.ProtectedJniExtensions.lookup< + static final _setContexts$6 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -9485,24 +10786,24 @@ class Scope extends jni$_.JObject { jni$_.Pointer, jni$_.Pointer)>(); - /// from: `public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb, io.sentry.Hint hint)` - void addBreadcrumb( - Breadcrumb breadcrumb, - jni$_.JObject? hint, + /// from: `public void setContexts(java.lang.String string, java.lang.Character character)` + void setContexts$6( + jni$_.JString? string, + jni$_.JCharacter? character, ) { - final _$breadcrumb = breadcrumb.reference; - final _$hint = hint?.reference ?? jni$_.jNullReference; - _addBreadcrumb(reference.pointer, _id_addBreadcrumb as jni$_.JMethodIDPtr, - _$breadcrumb.pointer, _$hint.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + final _$character = character?.reference ?? jni$_.jNullReference; + _setContexts$6(reference.pointer, _id_setContexts$6 as jni$_.JMethodIDPtr, + _$string.pointer, _$character.pointer) .check(); } - static final _id_addBreadcrumb$1 = _class.instanceMethodId( - r'addBreadcrumb', - r'(Lio/sentry/Breadcrumb;)V', + static final _id_removeContexts = _class.instanceMethodId( + r'removeContexts', + r'(Ljava/lang/String;)V', ); - static final _addBreadcrumb$1 = jni$_.ProtectedJniExtensions.lookup< + static final _removeContexts = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -9513,46 +10814,74 @@ class Scope extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb)` - void addBreadcrumb$1( - Breadcrumb breadcrumb, + /// from: `public void removeContexts(java.lang.String string)` + void removeContexts( + jni$_.JString? string, ) { - final _$breadcrumb = breadcrumb.reference; - _addBreadcrumb$1(reference.pointer, - _id_addBreadcrumb$1 as jni$_.JMethodIDPtr, _$breadcrumb.pointer) + final _$string = string?.reference ?? jni$_.jNullReference; + _removeContexts(reference.pointer, _id_removeContexts as jni$_.JMethodIDPtr, + _$string.pointer) .check(); } - static final _id_clearBreadcrumbs = _class.instanceMethodId( - r'clearBreadcrumbs', - r'()V', + static final _id_getAttachments = _class.instanceMethodId( + r'getAttachments', + r'()Ljava/util/List;', ); - static final _clearBreadcrumbs = jni$_.ProtectedJniExtensions.lookup< + static final _getAttachments = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') + )>>('globalEnv_CallObjectMethod') .asFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `public void clearBreadcrumbs()` - void clearBreadcrumbs() { - _clearBreadcrumbs( - reference.pointer, _id_clearBreadcrumbs as jni$_.JMethodIDPtr) + /// from: `public java.util.List getAttachments()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getAttachments() { + return _getAttachments( + reference.pointer, _id_getAttachments as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_addAttachment = _class.instanceMethodId( + r'addAttachment', + r'(Lio/sentry/Attachment;)V', + ); + + static final _addAttachment = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void addAttachment(io.sentry.Attachment attachment)` + void addAttachment( + jni$_.JObject attachment, + ) { + final _$attachment = attachment.reference; + _addAttachment(reference.pointer, _id_addAttachment as jni$_.JMethodIDPtr, + _$attachment.pointer) .check(); } - static final _id_clearTransaction = _class.instanceMethodId( - r'clearTransaction', + static final _id_clearAttachments = _class.instanceMethodId( + r'clearAttachments', r'()V', ); - static final _clearTransaction = jni$_.ProtectedJniExtensions.lookup< + static final _clearAttachments = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -9564,19 +10893,19 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public void clearTransaction()` - void clearTransaction() { - _clearTransaction( - reference.pointer, _id_clearTransaction as jni$_.JMethodIDPtr) + /// from: `public void clearAttachments()` + void clearAttachments() { + _clearAttachments( + reference.pointer, _id_clearAttachments as jni$_.JMethodIDPtr) .check(); } - static final _id_getTransaction = _class.instanceMethodId( - r'getTransaction', - r'()Lio/sentry/ITransaction;', + static final _id_getEventProcessors = _class.instanceMethodId( + r'getEventProcessors', + r'()Ljava/util/List;', ); - static final _getTransaction = jni$_.ProtectedJniExtensions.lookup< + static final _getEventProcessors = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9588,128 +10917,103 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public io.sentry.ITransaction getTransaction()` + /// from: `public java.util.List getEventProcessors()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getTransaction() { - return _getTransaction( - reference.pointer, _id_getTransaction as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); - } - - static final _id_clear = _class.instanceMethodId( - r'clear', - r'()V', - ); - - static final _clear = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public void clear()` - void clear() { - _clear(reference.pointer, _id_clear as jni$_.JMethodIDPtr).check(); + jni$_.JList getEventProcessors() { + return _getEventProcessors( + reference.pointer, _id_getEventProcessors as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); } - static final _id_getTags = _class.instanceMethodId( - r'getTags', - r'()Ljava/util/Map;', + static final _id_getEventProcessorsWithOrder = _class.instanceMethodId( + r'getEventProcessorsWithOrder', + r'()Ljava/util/List;', ); - static final _getTags = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< + static final _getEventProcessorsWithOrder = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + )>(); - /// from: `public java.util.Map getTags()` + /// from: `public java.util.List getEventProcessorsWithOrder()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JMap getTags() { - return _getTags(reference.pointer, _id_getTags as jni$_.JMethodIDPtr) - .object>( - const jni$_.JMapType( - jni$_.JStringNullableType(), jni$_.JStringNullableType())); + jni$_.JList getEventProcessorsWithOrder() { + return _getEventProcessorsWithOrder(reference.pointer, + _id_getEventProcessorsWithOrder as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); } - static final _id_setTag = _class.instanceMethodId( - r'setTag', - r'(Ljava/lang/String;Ljava/lang/String;)V', + static final _id_addEventProcessor = _class.instanceMethodId( + r'addEventProcessor', + r'(Lio/sentry/EventProcessor;)V', ); - static final _setTag = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') + static final _addEventProcessor = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void setTag(java.lang.String string, java.lang.String string1)` - void setTag( - jni$_.JString? string, - jni$_.JString? string1, + /// from: `public void addEventProcessor(io.sentry.EventProcessor eventProcessor)` + void addEventProcessor( + jni$_.JObject eventProcessor, ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - _setTag(reference.pointer, _id_setTag as jni$_.JMethodIDPtr, - _$string.pointer, _$string1.pointer) + final _$eventProcessor = eventProcessor.reference; + _addEventProcessor( + reference.pointer, + _id_addEventProcessor as jni$_.JMethodIDPtr, + _$eventProcessor.pointer) .check(); } - static final _id_removeTag = _class.instanceMethodId( - r'removeTag', - r'(Ljava/lang/String;)V', + static final _id_withSession = _class.instanceMethodId( + r'withSession', + r'(Lio/sentry/Scope$IWithSession;)Lio/sentry/Session;', ); - static final _removeTag = jni$_.ProtectedJniExtensions.lookup< + static final _withSession = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + 'globalEnv_CallObjectMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void removeTag(java.lang.String string)` - void removeTag( - jni$_.JString? string, + /// from: `public io.sentry.Session withSession(io.sentry.Scope$IWithSession iWithSession)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? withSession( + jni$_.JObject iWithSession, ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _removeTag(reference.pointer, _id_removeTag as jni$_.JMethodIDPtr, - _$string.pointer) - .check(); + final _$iWithSession = iWithSession.reference; + return _withSession(reference.pointer, + _id_withSession as jni$_.JMethodIDPtr, _$iWithSession.pointer) + .object(const jni$_.JObjectNullableType()); } - static final _id_getExtras = _class.instanceMethodId( - r'getExtras', - r'()Ljava/util/Map;', + static final _id_startSession = _class.instanceMethodId( + r'startSession', + r'()Lio/sentry/Scope$SessionPair;', ); - static final _getExtras = jni$_.ProtectedJniExtensions.lookup< + static final _startSession = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9721,55 +11025,44 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public java.util.Map getExtras()` + /// from: `public io.sentry.Scope$SessionPair startSession()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JMap getExtras() { - return _getExtras(reference.pointer, _id_getExtras as jni$_.JMethodIDPtr) - .object>( - const jni$_.JMapType( - jni$_.JStringNullableType(), jni$_.JObjectNullableType())); + jni$_.JObject? startSession() { + return _startSession( + reference.pointer, _id_startSession as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); } - static final _id_setExtra = _class.instanceMethodId( - r'setExtra', - r'(Ljava/lang/String;Ljava/lang/String;)V', + static final _id_endSession = _class.instanceMethodId( + r'endSession', + r'()Lio/sentry/Session;', ); - static final _setExtra = jni$_.ProtectedJniExtensions.lookup< + static final _endSession = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void setExtra(java.lang.String string, java.lang.String string1)` - void setExtra( - jni$_.JString? string, - jni$_.JString? string1, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - _setExtra(reference.pointer, _id_setExtra as jni$_.JMethodIDPtr, - _$string.pointer, _$string1.pointer) - .check(); + /// from: `public io.sentry.Session endSession()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? endSession() { + return _endSession(reference.pointer, _id_endSession as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); } - static final _id_removeExtra = _class.instanceMethodId( - r'removeExtra', - r'(Ljava/lang/String;)V', + static final _id_withTransaction = _class.instanceMethodId( + r'withTransaction', + r'(Lio/sentry/Scope$IWithTransaction;)V', ); - static final _removeExtra = jni$_.ProtectedJniExtensions.lookup< + static final _withTransaction = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -9780,22 +11073,24 @@ class Scope extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void removeExtra(java.lang.String string)` - void removeExtra( - jni$_.JString? string, + /// from: `public void withTransaction(io.sentry.Scope$IWithTransaction iWithTransaction)` + void withTransaction( + Scope$IWithTransaction iWithTransaction, ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _removeExtra(reference.pointer, _id_removeExtra as jni$_.JMethodIDPtr, - _$string.pointer) + final _$iWithTransaction = iWithTransaction.reference; + _withTransaction( + reference.pointer, + _id_withTransaction as jni$_.JMethodIDPtr, + _$iWithTransaction.pointer) .check(); } - static final _id_getContexts = _class.instanceMethodId( - r'getContexts', - r'()Lio/sentry/protocol/Contexts;', + static final _id_getOptions = _class.instanceMethodId( + r'getOptions', + r'()Lio/sentry/SentryOptions;', ); - static final _getContexts = jni$_.ProtectedJniExtensions.lookup< + static final _getOptions = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -9807,284 +11102,148 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public io.sentry.protocol.Contexts getContexts()` + /// from: `public io.sentry.SentryOptions getOptions()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getContexts() { - return _getContexts( - reference.pointer, _id_getContexts as jni$_.JMethodIDPtr) + jni$_.JObject getOptions() { + return _getOptions(reference.pointer, _id_getOptions as jni$_.JMethodIDPtr) .object(const jni$_.JObjectType()); } - static final _id_setContexts = _class.instanceMethodId( - r'setContexts', - r'(Ljava/lang/String;Ljava/lang/Object;)V', - ); - - static final _setContexts = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); - - /// from: `public void setContexts(java.lang.String string, java.lang.Object object)` - void setContexts( - jni$_.JString? string, - jni$_.JObject? object, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$object = object?.reference ?? jni$_.jNullReference; - _setContexts(reference.pointer, _id_setContexts as jni$_.JMethodIDPtr, - _$string.pointer, _$object.pointer) - .check(); - } - - static final _id_setContexts$1 = _class.instanceMethodId( - r'setContexts', - r'(Ljava/lang/String;Ljava/lang/Boolean;)V', - ); - - static final _setContexts$1 = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); - - /// from: `public void setContexts(java.lang.String string, java.lang.Boolean boolean)` - void setContexts$1( - jni$_.JString? string, - jni$_.JBoolean? boolean, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$boolean = boolean?.reference ?? jni$_.jNullReference; - _setContexts$1(reference.pointer, _id_setContexts$1 as jni$_.JMethodIDPtr, - _$string.pointer, _$boolean.pointer) - .check(); - } - - static final _id_setContexts$2 = _class.instanceMethodId( - r'setContexts', - r'(Ljava/lang/String;Ljava/lang/String;)V', - ); - - static final _setContexts$2 = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); - - /// from: `public void setContexts(java.lang.String string, java.lang.String string1)` - void setContexts$2( - jni$_.JString? string, - jni$_.JString? string1, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - _setContexts$2(reference.pointer, _id_setContexts$2 as jni$_.JMethodIDPtr, - _$string.pointer, _$string1.pointer) - .check(); - } - - static final _id_setContexts$3 = _class.instanceMethodId( - r'setContexts', - r'(Ljava/lang/String;Ljava/lang/Number;)V', + static final _id_getSession = _class.instanceMethodId( + r'getSession', + r'()Lio/sentry/Session;', ); - static final _setContexts$3 = jni$_.ProtectedJniExtensions.lookup< + static final _getSession = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void setContexts(java.lang.String string, java.lang.Number number)` - void setContexts$3( - jni$_.JString? string, - jni$_.JNumber? number, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$number = number?.reference ?? jni$_.jNullReference; - _setContexts$3(reference.pointer, _id_setContexts$3 as jni$_.JMethodIDPtr, - _$string.pointer, _$number.pointer) - .check(); + /// from: `public io.sentry.Session getSession()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getSession() { + return _getSession(reference.pointer, _id_getSession as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); } - static final _id_setContexts$4 = _class.instanceMethodId( - r'setContexts', - r'(Ljava/lang/String;Ljava/util/Collection;)V', + static final _id_clearSession = _class.instanceMethodId( + r'clearSession', + r'()V', ); - static final _setContexts$4 = jni$_.ProtectedJniExtensions.lookup< + static final _clearSession = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') .asFunction< jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void setContexts(java.lang.String string, java.util.Collection collection)` - void setContexts$4( - jni$_.JString? string, - jni$_.JObject? collection, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$collection = collection?.reference ?? jni$_.jNullReference; - _setContexts$4(reference.pointer, _id_setContexts$4 as jni$_.JMethodIDPtr, - _$string.pointer, _$collection.pointer) + /// from: `public void clearSession()` + void clearSession() { + _clearSession(reference.pointer, _id_clearSession as jni$_.JMethodIDPtr) .check(); } - static final _id_setContexts$5 = _class.instanceMethodId( - r'setContexts', - r'(Ljava/lang/String;[Ljava/lang/Object;)V', + static final _id_setPropagationContext = _class.instanceMethodId( + r'setPropagationContext', + r'(Lio/sentry/PropagationContext;)V', ); - static final _setContexts$5 = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') + static final _setPropagationContext = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void setContexts(java.lang.String string, java.lang.Object[] objects)` - void setContexts$5( - jni$_.JString? string, - jni$_.JArray? objects, + /// from: `public void setPropagationContext(io.sentry.PropagationContext propagationContext)` + void setPropagationContext( + jni$_.JObject propagationContext, ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$objects = objects?.reference ?? jni$_.jNullReference; - _setContexts$5(reference.pointer, _id_setContexts$5 as jni$_.JMethodIDPtr, - _$string.pointer, _$objects.pointer) + final _$propagationContext = propagationContext.reference; + _setPropagationContext( + reference.pointer, + _id_setPropagationContext as jni$_.JMethodIDPtr, + _$propagationContext.pointer) .check(); } - static final _id_setContexts$6 = _class.instanceMethodId( - r'setContexts', - r'(Ljava/lang/String;Ljava/lang/Character;)V', + static final _id_getPropagationContext = _class.instanceMethodId( + r'getPropagationContext', + r'()Lio/sentry/PropagationContext;', ); - static final _setContexts$6 = jni$_.ProtectedJniExtensions.lookup< + static final _getPropagationContext = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - /// from: `public void setContexts(java.lang.String string, java.lang.Character character)` - void setContexts$6( - jni$_.JString? string, - jni$_.JCharacter? character, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$character = character?.reference ?? jni$_.jNullReference; - _setContexts$6(reference.pointer, _id_setContexts$6 as jni$_.JMethodIDPtr, - _$string.pointer, _$character.pointer) - .check(); + /// from: `public io.sentry.PropagationContext getPropagationContext()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getPropagationContext() { + return _getPropagationContext( + reference.pointer, _id_getPropagationContext as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); } - static final _id_removeContexts = _class.instanceMethodId( - r'removeContexts', - r'(Ljava/lang/String;)V', + static final _id_withPropagationContext = _class.instanceMethodId( + r'withPropagationContext', + r'(Lio/sentry/Scope$IWithPropagationContext;)Lio/sentry/PropagationContext;', ); - static final _removeContexts = jni$_.ProtectedJniExtensions.lookup< + static final _withPropagationContext = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + 'globalEnv_CallObjectMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void removeContexts(java.lang.String string)` - void removeContexts( - jni$_.JString? string, + /// from: `public io.sentry.PropagationContext withPropagationContext(io.sentry.Scope$IWithPropagationContext iWithPropagationContext)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject withPropagationContext( + Scope$IWithPropagationContext iWithPropagationContext, ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _removeContexts(reference.pointer, _id_removeContexts as jni$_.JMethodIDPtr, - _$string.pointer) - .check(); + final _$iWithPropagationContext = iWithPropagationContext.reference; + return _withPropagationContext( + reference.pointer, + _id_withPropagationContext as jni$_.JMethodIDPtr, + _$iWithPropagationContext.pointer) + .object(const jni$_.JObjectType()); } - static final _id_getAttachments = _class.instanceMethodId( - r'getAttachments', - r'()Ljava/util/List;', + static final _id_clone = _class.instanceMethodId( + r'clone', + r'()Lio/sentry/IScope;', ); - static final _getAttachments = jni$_.ProtectedJniExtensions.lookup< + static final _clone = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -10096,21 +11255,19 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public java.util.List getAttachments()` + /// from: `public io.sentry.IScope clone()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JList getAttachments() { - return _getAttachments( - reference.pointer, _id_getAttachments as jni$_.JMethodIDPtr) - .object>( - const jni$_.JListType(jni$_.JObjectNullableType())); + jni$_.JObject clone() { + return _clone(reference.pointer, _id_clone as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); } - static final _id_addAttachment = _class.instanceMethodId( - r'addAttachment', - r'(Lio/sentry/Attachment;)V', + static final _id_setLastEventId = _class.instanceMethodId( + r'setLastEventId', + r'(Lio/sentry/protocol/SentryId;)V', ); - static final _addAttachment = jni$_.ProtectedJniExtensions.lookup< + static final _setLastEventId = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -10121,46 +11278,73 @@ class Scope extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void addAttachment(io.sentry.Attachment attachment)` - void addAttachment( - jni$_.JObject attachment, + /// from: `public void setLastEventId(io.sentry.protocol.SentryId sentryId)` + void setLastEventId( + SentryId sentryId, ) { - final _$attachment = attachment.reference; - _addAttachment(reference.pointer, _id_addAttachment as jni$_.JMethodIDPtr, - _$attachment.pointer) + final _$sentryId = sentryId.reference; + _setLastEventId(reference.pointer, _id_setLastEventId as jni$_.JMethodIDPtr, + _$sentryId.pointer) .check(); } - static final _id_clearAttachments = _class.instanceMethodId( - r'clearAttachments', - r'()V', + static final _id_getLastEventId = _class.instanceMethodId( + r'getLastEventId', + r'()Lio/sentry/protocol/SentryId;', ); - static final _clearAttachments = jni$_.ProtectedJniExtensions.lookup< + static final _getLastEventId = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') + )>>('globalEnv_CallObjectMethod') .asFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `public void clearAttachments()` - void clearAttachments() { - _clearAttachments( - reference.pointer, _id_clearAttachments as jni$_.JMethodIDPtr) + /// from: `public io.sentry.protocol.SentryId getLastEventId()` + /// The returned object must be released after use, by calling the [release] method. + SentryId getLastEventId() { + return _getLastEventId( + reference.pointer, _id_getLastEventId as jni$_.JMethodIDPtr) + .object(const $SentryId$Type()); + } + + static final _id_bindClient = _class.instanceMethodId( + r'bindClient', + r'(Lio/sentry/ISentryClient;)V', + ); + + static final _bindClient = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void bindClient(io.sentry.ISentryClient iSentryClient)` + void bindClient( + jni$_.JObject iSentryClient, + ) { + final _$iSentryClient = iSentryClient.reference; + _bindClient(reference.pointer, _id_bindClient as jni$_.JMethodIDPtr, + _$iSentryClient.pointer) .check(); } - static final _id_getEventProcessors = _class.instanceMethodId( - r'getEventProcessors', - r'()Ljava/util/List;', + static final _id_getClient = _class.instanceMethodId( + r'getClient', + r'()Lio/sentry/ISentryClient;', ); - static final _getEventProcessors = jni$_.ProtectedJniExtensions.lookup< + static final _getClient = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -10172,48 +11356,19 @@ class Scope extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public java.util.List getEventProcessors()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JList getEventProcessors() { - return _getEventProcessors( - reference.pointer, _id_getEventProcessors as jni$_.JMethodIDPtr) - .object>( - const jni$_.JListType(jni$_.JObjectNullableType())); - } - - static final _id_getEventProcessorsWithOrder = _class.instanceMethodId( - r'getEventProcessorsWithOrder', - r'()Ljava/util/List;', - ); - - static final _getEventProcessorsWithOrder = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public java.util.List getEventProcessorsWithOrder()` + /// from: `public io.sentry.ISentryClient getClient()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JList getEventProcessorsWithOrder() { - return _getEventProcessorsWithOrder(reference.pointer, - _id_getEventProcessorsWithOrder as jni$_.JMethodIDPtr) - .object>( - const jni$_.JListType(jni$_.JObjectNullableType())); + jni$_.JObject getClient() { + return _getClient(reference.pointer, _id_getClient as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); } - static final _id_addEventProcessor = _class.instanceMethodId( - r'addEventProcessor', - r'(Lio/sentry/EventProcessor;)V', + static final _id_assignTraceContext = _class.instanceMethodId( + r'assignTraceContext', + r'(Lio/sentry/SentryEvent;)V', ); - static final _addEventProcessor = jni$_.ProtectedJniExtensions.lookup< + static final _assignTraceContext = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -10224,100 +11379,175 @@ class Scope extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void addEventProcessor(io.sentry.EventProcessor eventProcessor)` - void addEventProcessor( - jni$_.JObject eventProcessor, + /// from: `public void assignTraceContext(io.sentry.SentryEvent sentryEvent)` + void assignTraceContext( + jni$_.JObject sentryEvent, ) { - final _$eventProcessor = eventProcessor.reference; - _addEventProcessor( - reference.pointer, - _id_addEventProcessor as jni$_.JMethodIDPtr, - _$eventProcessor.pointer) + final _$sentryEvent = sentryEvent.reference; + _assignTraceContext(reference.pointer, + _id_assignTraceContext as jni$_.JMethodIDPtr, _$sentryEvent.pointer) .check(); } - static final _id_withSession = _class.instanceMethodId( - r'withSession', - r'(Lio/sentry/Scope$IWithSession;)Lio/sentry/Session;', + static final _id_setSpanContext = _class.instanceMethodId( + r'setSpanContext', + r'(Ljava/lang/Throwable;Lio/sentry/ISpan;Ljava/lang/String;)V', ); - static final _withSession = jni$_.ProtectedJniExtensions.lookup< + static final _setSpanContext = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void setSpanContext(java.lang.Throwable throwable, io.sentry.ISpan iSpan, java.lang.String string)` + void setSpanContext( + jni$_.JObject throwable, + jni$_.JObject iSpan, + jni$_.JString string, + ) { + final _$throwable = throwable.reference; + final _$iSpan = iSpan.reference; + final _$string = string.reference; + _setSpanContext(reference.pointer, _id_setSpanContext as jni$_.JMethodIDPtr, + _$throwable.pointer, _$iSpan.pointer, _$string.pointer) + .check(); + } + + static final _id_replaceOptions = _class.instanceMethodId( + r'replaceOptions', + r'(Lio/sentry/SentryOptions;)V', + ); + + static final _replaceOptions = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JniResult Function( + jni$_.JThrowablePtr Function( jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallObjectMethod') + 'globalEnv_CallVoidMethod') .asFunction< - jni$_.JniResult Function(jni$_.Pointer, + jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public io.sentry.Session withSession(io.sentry.Scope$IWithSession iWithSession)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? withSession( - jni$_.JObject iWithSession, + /// from: `public void replaceOptions(io.sentry.SentryOptions sentryOptions)` + void replaceOptions( + jni$_.JObject sentryOptions, ) { - final _$iWithSession = iWithSession.reference; - return _withSession(reference.pointer, - _id_withSession as jni$_.JMethodIDPtr, _$iWithSession.pointer) - .object(const jni$_.JObjectNullableType()); + final _$sentryOptions = sentryOptions.reference; + _replaceOptions(reference.pointer, _id_replaceOptions as jni$_.JMethodIDPtr, + _$sentryOptions.pointer) + .check(); } +} - static final _id_startSession = _class.instanceMethodId( - r'startSession', - r'()Lio/sentry/Scope$SessionPair;', - ); +final class $Scope$NullableType extends jni$_.JObjType { + @jni$_.internal + const $Scope$NullableType(); - static final _startSession = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Scope;'; - /// from: `public io.sentry.Scope$SessionPair startSession()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? startSession() { - return _startSession( - reference.pointer, _id_startSession as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); + @jni$_.internal + @core$_.override + Scope? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : Scope.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Scope$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Scope$NullableType) && + other is $Scope$NullableType; } +} - static final _id_endSession = _class.instanceMethodId( - r'endSession', - r'()Lio/sentry/Session;', - ); +final class $Scope$Type extends jni$_.JObjType { + @jni$_.internal + const $Scope$Type(); - static final _endSession = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Scope;'; + + @jni$_.internal + @core$_.override + Scope fromReference(jni$_.JReference reference) => Scope.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => const $Scope$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Scope$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Scope$Type) && other is $Scope$Type; + } +} + +/// from: `io.sentry.ScopeCallback` +class ScopeCallback extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + ScopeCallback.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); - /// from: `public io.sentry.Session endSession()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? endSession() { - return _endSession(reference.pointer, _id_endSession as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); - } + static final _class = jni$_.JClass.forName(r'io/sentry/ScopeCallback'); - static final _id_withTransaction = _class.instanceMethodId( - r'withTransaction', - r'(Lio/sentry/Scope$IWithTransaction;)V', + /// The type which includes information such as the signature of this class. + static const nullableType = $ScopeCallback$NullableType(); + static const type = $ScopeCallback$Type(); + static final _id_run = _class.instanceMethodId( + r'run', + r'(Lio/sentry/IScope;)V', ); - static final _withTransaction = jni$_.ProtectedJniExtensions.lookup< + static final _run = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JThrowablePtr Function( jni$_.Pointer, @@ -10328,435 +11558,325 @@ class Scope extends jni$_.JObject { jni$_.JThrowablePtr Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void withTransaction(io.sentry.Scope$IWithTransaction iWithTransaction)` - void withTransaction( - Scope$IWithTransaction iWithTransaction, + /// from: `public abstract void run(io.sentry.IScope iScope)` + void run( + jni$_.JObject iScope, ) { - final _$iWithTransaction = iWithTransaction.reference; - _withTransaction( - reference.pointer, - _id_withTransaction as jni$_.JMethodIDPtr, - _$iWithTransaction.pointer) + final _$iScope = iScope.reference; + _run(reference.pointer, _id_run as jni$_.JMethodIDPtr, _$iScope.pointer) .check(); } - static final _id_getOptions = _class.instanceMethodId( - r'getOptions', - r'()Lio/sentry/SentryOptions;', - ); - - static final _getOptions = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public io.sentry.SentryOptions getOptions()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getOptions() { - return _getOptions(reference.pointer, _id_getOptions as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); + /// Maps a specific port to the implemented interface. + static final core$_.Map _$impls = {}; + static jni$_.JObjectPtr _$invoke( + int port, + jni$_.JObjectPtr descriptor, + jni$_.JObjectPtr args, + ) { + return _$invokeMethod( + port, + jni$_.MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); } - static final _id_getSession = _class.instanceMethodId( - r'getSession', - r'()Lio/sentry/Session;', - ); - - static final _getSession = jni$_.ProtectedJniExtensions.lookup< + static final jni$_.Pointer< jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + jni$_.JObjectPtr Function( + jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)>> + _$invokePointer = jni$_.Pointer.fromFunction(_$invoke); - /// from: `public io.sentry.Session getSession()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getSession() { - return _getSession(reference.pointer, _id_getSession as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); + static jni$_.Pointer _$invokeMethod( + int $p, + jni$_.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'run(Lio/sentry/IScope;)V') { + _$impls[$p]!.run( + $a![0]!.as(const jni$_.JObjectType(), releaseOriginal: true), + ); + return jni$_.nullptr; + } + } catch (e) { + return jni$_.ProtectedJniExtensions.newDartException(e); + } + return jni$_.nullptr; } - static final _id_clearSession = _class.instanceMethodId( - r'clearSession', - r'()V', - ); - - static final _clearSession = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public void clearSession()` - void clearSession() { - _clearSession(reference.pointer, _id_clearSession as jni$_.JMethodIDPtr) - .check(); + static void implementIn( + jni$_.JImplementer implementer, + $ScopeCallback $impl, + ) { + late final jni$_.RawReceivePort $p; + $p = jni$_.RawReceivePort(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = jni$_.MethodInvocation.fromMessage($m); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + jni$_.ProtectedJniExtensions.returnResult($i.result, $r); + }); + implementer.add( + r'io.sentry.ScopeCallback', + $p, + _$invokePointer, + [ + if ($impl.run$async) r'run(Lio/sentry/IScope;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; } - static final _id_setPropagationContext = _class.instanceMethodId( - r'setPropagationContext', - r'(Lio/sentry/PropagationContext;)V', - ); - - static final _setPropagationContext = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void setPropagationContext(io.sentry.PropagationContext propagationContext)` - void setPropagationContext( - jni$_.JObject propagationContext, + factory ScopeCallback.implement( + $ScopeCallback $impl, ) { - final _$propagationContext = propagationContext.reference; - _setPropagationContext( - reference.pointer, - _id_setPropagationContext as jni$_.JMethodIDPtr, - _$propagationContext.pointer) - .check(); + final $i = jni$_.JImplementer(); + implementIn($i, $impl); + return ScopeCallback.fromReference( + $i.implementReference(), + ); } +} - static final _id_getPropagationContext = _class.instanceMethodId( - r'getPropagationContext', - r'()Lio/sentry/PropagationContext;', - ); +abstract base mixin class $ScopeCallback { + factory $ScopeCallback({ + required void Function(jni$_.JObject iScope) run, + bool run$async, + }) = _$ScopeCallback; - static final _getPropagationContext = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + void run(jni$_.JObject iScope); + bool get run$async => false; +} - /// from: `public io.sentry.PropagationContext getPropagationContext()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getPropagationContext() { - return _getPropagationContext( - reference.pointer, _id_getPropagationContext as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); +final class _$ScopeCallback with $ScopeCallback { + _$ScopeCallback({ + required void Function(jni$_.JObject iScope) run, + this.run$async = false, + }) : _run = run; + + final void Function(jni$_.JObject iScope) _run; + final bool run$async; + + void run(jni$_.JObject iScope) { + return _run(iScope); } +} - static final _id_withPropagationContext = _class.instanceMethodId( - r'withPropagationContext', - r'(Lio/sentry/Scope$IWithPropagationContext;)Lio/sentry/PropagationContext;', - ); +final class $ScopeCallback$NullableType extends jni$_.JObjType { + @jni$_.internal + const $ScopeCallback$NullableType(); - static final _withPropagationContext = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/ScopeCallback;'; + + @jni$_.internal + @core$_.override + ScopeCallback? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : ScopeCallback.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - /// from: `public io.sentry.PropagationContext withPropagationContext(io.sentry.Scope$IWithPropagationContext iWithPropagationContext)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject withPropagationContext( - Scope$IWithPropagationContext iWithPropagationContext, - ) { - final _$iWithPropagationContext = iWithPropagationContext.reference; - return _withPropagationContext( - reference.pointer, - _id_withPropagationContext as jni$_.JMethodIDPtr, - _$iWithPropagationContext.pointer) - .object(const jni$_.JObjectType()); - } + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; - static final _id_clone = _class.instanceMethodId( - r'clone', - r'()Lio/sentry/IScope;', - ); + @jni$_.internal + @core$_.override + final superCount = 1; - static final _clone = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + @core$_.override + int get hashCode => ($ScopeCallback$NullableType).hashCode; - /// from: `public io.sentry.IScope clone()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject clone() { - return _clone(reference.pointer, _id_clone as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($ScopeCallback$NullableType) && + other is $ScopeCallback$NullableType; } +} - static final _id_setLastEventId = _class.instanceMethodId( - r'setLastEventId', - r'(Lio/sentry/protocol/SentryId;)V', - ); +final class $ScopeCallback$Type extends jni$_.JObjType { + @jni$_.internal + const $ScopeCallback$Type(); - static final _setLastEventId = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/ScopeCallback;'; - /// from: `public void setLastEventId(io.sentry.protocol.SentryId sentryId)` - void setLastEventId( - jni$_.JObject sentryId, - ) { - final _$sentryId = sentryId.reference; - _setLastEventId(reference.pointer, _id_setLastEventId as jni$_.JMethodIDPtr, - _$sentryId.pointer) - .check(); - } + @jni$_.internal + @core$_.override + ScopeCallback fromReference(jni$_.JReference reference) => + ScopeCallback.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - static final _id_getLastEventId = _class.instanceMethodId( - r'getLastEventId', - r'()Lio/sentry/protocol/SentryId;', - ); + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $ScopeCallback$NullableType(); - static final _getLastEventId = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + @jni$_.internal + @core$_.override + final superCount = 1; - /// from: `public io.sentry.protocol.SentryId getLastEventId()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getLastEventId() { - return _getLastEventId( - reference.pointer, _id_getLastEventId as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); + @core$_.override + int get hashCode => ($ScopeCallback$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($ScopeCallback$Type) && + other is $ScopeCallback$Type; } +} - static final _id_bindClient = _class.instanceMethodId( - r'bindClient', - r'(Lio/sentry/ISentryClient;)V', - ); +/// from: `io.sentry.protocol.User$Deserializer` +class User$Deserializer extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; - static final _bindClient = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + @jni$_.internal + User$Deserializer.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); - /// from: `public void bindClient(io.sentry.ISentryClient iSentryClient)` - void bindClient( - jni$_.JObject iSentryClient, - ) { - final _$iSentryClient = iSentryClient.reference; - _bindClient(reference.pointer, _id_bindClient as jni$_.JMethodIDPtr, - _$iSentryClient.pointer) - .check(); - } + static final _class = + jni$_.JClass.forName(r'io/sentry/protocol/User$Deserializer'); - static final _id_getClient = _class.instanceMethodId( - r'getClient', - r'()Lio/sentry/ISentryClient;', + /// The type which includes information such as the signature of this class. + static const nullableType = $User$Deserializer$NullableType(); + static const type = $User$Deserializer$Type(); + static final _id_new$ = _class.constructorId( + r'()V', ); - static final _getClient = jni$_.ProtectedJniExtensions.lookup< + static final _new$ = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + )>>('globalEnv_NewObject') .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `public io.sentry.ISentryClient getClient()` + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject getClient() { - return _getClient(reference.pointer, _id_getClient as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectType()); - } - - static final _id_assignTraceContext = _class.instanceMethodId( - r'assignTraceContext', - r'(Lio/sentry/SentryEvent;)V', - ); - - static final _assignTraceContext = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void assignTraceContext(io.sentry.SentryEvent sentryEvent)` - void assignTraceContext( - jni$_.JObject sentryEvent, - ) { - final _$sentryEvent = sentryEvent.reference; - _assignTraceContext(reference.pointer, - _id_assignTraceContext as jni$_.JMethodIDPtr, _$sentryEvent.pointer) - .check(); + factory User$Deserializer() { + return User$Deserializer.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); } - static final _id_setSpanContext = _class.instanceMethodId( - r'setSpanContext', - r'(Ljava/lang/Throwable;Lio/sentry/ISpan;Ljava/lang/String;)V', + static final _id_deserialize = _class.instanceMethodId( + r'deserialize', + r'(Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Lio/sentry/protocol/User;', ); - static final _setSpanContext = jni$_.ProtectedJniExtensions.lookup< + static final _deserialize = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer)>(); - - /// from: `public void setSpanContext(java.lang.Throwable throwable, io.sentry.ISpan iSpan, java.lang.String string)` - void setSpanContext( - jni$_.JObject throwable, - jni$_.JObject iSpan, - jni$_.JString string, - ) { - final _$throwable = throwable.reference; - final _$iSpan = iSpan.reference; - final _$string = string.reference; - _setSpanContext(reference.pointer, _id_setSpanContext as jni$_.JMethodIDPtr, - _$throwable.pointer, _$iSpan.pointer, _$string.pointer) - .check(); - } - - static final _id_replaceOptions = _class.instanceMethodId( - r'replaceOptions', - r'(Lio/sentry/SentryOptions;)V', - ); - - static final _replaceOptions = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); - /// from: `public void replaceOptions(io.sentry.SentryOptions sentryOptions)` - void replaceOptions( - jni$_.JObject sentryOptions, + /// from: `public io.sentry.protocol.User deserialize(io.sentry.ObjectReader objectReader, io.sentry.ILogger iLogger)` + /// The returned object must be released after use, by calling the [release] method. + User deserialize( + jni$_.JObject objectReader, + jni$_.JObject iLogger, ) { - final _$sentryOptions = sentryOptions.reference; - _replaceOptions(reference.pointer, _id_replaceOptions as jni$_.JMethodIDPtr, - _$sentryOptions.pointer) - .check(); + final _$objectReader = objectReader.reference; + final _$iLogger = iLogger.reference; + return _deserialize( + reference.pointer, + _id_deserialize as jni$_.JMethodIDPtr, + _$objectReader.pointer, + _$iLogger.pointer) + .object(const $User$Type()); } } -final class $Scope$NullableType extends jni$_.JObjType { +final class $User$Deserializer$NullableType + extends jni$_.JObjType { @jni$_.internal - const $Scope$NullableType(); + const $User$Deserializer$NullableType(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/Scope;'; + String get signature => r'Lio/sentry/protocol/User$Deserializer;'; @jni$_.internal @core$_.override - Scope? fromReference(jni$_.JReference reference) => reference.isNull - ? null - : Scope.fromReference( - reference, - ); + User$Deserializer? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : User$Deserializer.fromReference( + reference, + ); @jni$_.internal @core$_.override jni$_.JObjType get superType => const jni$_.JObjectNullableType(); @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => this; + jni$_.JObjType get nullableType => this; @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($Scope$NullableType).hashCode; + int get hashCode => ($User$Deserializer$NullableType).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($Scope$NullableType) && - other is $Scope$NullableType; + return other.runtimeType == ($User$Deserializer$NullableType) && + other is $User$Deserializer$NullableType; } } -final class $Scope$Type extends jni$_.JObjType { +final class $User$Deserializer$Type extends jni$_.JObjType { @jni$_.internal - const $Scope$Type(); + const $User$Deserializer$Type(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/Scope;'; + String get signature => r'Lio/sentry/protocol/User$Deserializer;'; @jni$_.internal @core$_.override - Scope fromReference(jni$_.JReference reference) => Scope.fromReference( + User$Deserializer fromReference(jni$_.JReference reference) => + User$Deserializer.fromReference( reference, ); @jni$_.internal @@ -10765,180 +11885,149 @@ final class $Scope$Type extends jni$_.JObjType { @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => const $Scope$NullableType(); + jni$_.JObjType get nullableType => + const $User$Deserializer$NullableType(); @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($Scope$Type).hashCode; + int get hashCode => ($User$Deserializer$Type).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($Scope$Type) && other is $Scope$Type; + return other.runtimeType == ($User$Deserializer$Type) && + other is $User$Deserializer$Type; } } -/// from: `io.sentry.ScopeCallback` -class ScopeCallback extends jni$_.JObject { +/// from: `io.sentry.protocol.User$JsonKeys` +class User$JsonKeys extends jni$_.JObject { @jni$_.internal @core$_.override - final jni$_.JObjType $type; + final jni$_.JObjType $type; @jni$_.internal - ScopeCallback.fromReference( + User$JsonKeys.fromReference( jni$_.JReference reference, ) : $type = type, super.fromReference(reference); - static final _class = jni$_.JClass.forName(r'io/sentry/ScopeCallback'); + static final _class = + jni$_.JClass.forName(r'io/sentry/protocol/User$JsonKeys'); /// The type which includes information such as the signature of this class. - static const nullableType = $ScopeCallback$NullableType(); - static const type = $ScopeCallback$Type(); - static final _id_run = _class.instanceMethodId( - r'run', - r'(Lio/sentry/IScope;)V', + static const nullableType = $User$JsonKeys$NullableType(); + static const type = $User$JsonKeys$Type(); + static final _id_EMAIL = _class.staticFieldId( + r'EMAIL', + r'Ljava/lang/String;', ); - static final _run = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + /// from: `static public final java.lang.String EMAIL` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get EMAIL => + _id_EMAIL.get(_class, const jni$_.JStringNullableType()); - /// from: `public abstract void run(io.sentry.IScope iScope)` - void run( - jni$_.JObject iScope, - ) { - final _$iScope = iScope.reference; - _run(reference.pointer, _id_run as jni$_.JMethodIDPtr, _$iScope.pointer) - .check(); - } + static final _id_ID = _class.staticFieldId( + r'ID', + r'Ljava/lang/String;', + ); - /// Maps a specific port to the implemented interface. - static final core$_.Map _$impls = {}; - static jni$_.JObjectPtr _$invoke( - int port, - jni$_.JObjectPtr descriptor, - jni$_.JObjectPtr args, - ) { - return _$invokeMethod( - port, - jni$_.MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } + /// from: `static public final java.lang.String ID` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get ID => + _id_ID.get(_class, const jni$_.JStringNullableType()); - static final jni$_.Pointer< - jni$_.NativeFunction< - jni$_.JObjectPtr Function( - jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)>> - _$invokePointer = jni$_.Pointer.fromFunction(_$invoke); + static final _id_USERNAME = _class.staticFieldId( + r'USERNAME', + r'Ljava/lang/String;', + ); - static jni$_.Pointer _$invokeMethod( - int $p, - jni$_.MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == r'run(Lio/sentry/IScope;)V') { - _$impls[$p]!.run( - $a![0]!.as(const jni$_.JObjectType(), releaseOriginal: true), - ); - return jni$_.nullptr; - } - } catch (e) { - return jni$_.ProtectedJniExtensions.newDartException(e); - } - return jni$_.nullptr; - } + /// from: `static public final java.lang.String USERNAME` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get USERNAME => + _id_USERNAME.get(_class, const jni$_.JStringNullableType()); - static void implementIn( - jni$_.JImplementer implementer, - $ScopeCallback $impl, - ) { - late final jni$_.RawReceivePort $p; - $p = jni$_.RawReceivePort(($m) { - if ($m == null) { - _$impls.remove($p.sendPort.nativePort); - $p.close(); - return; - } - final $i = jni$_.MethodInvocation.fromMessage($m); - final $r = _$invokeMethod($p.sendPort.nativePort, $i); - jni$_.ProtectedJniExtensions.returnResult($i.result, $r); - }); - implementer.add( - r'io.sentry.ScopeCallback', - $p, - _$invokePointer, - [ - if ($impl.run$async) r'run(Lio/sentry/IScope;)V', - ], - ); - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - } + static final _id_IP_ADDRESS = _class.staticFieldId( + r'IP_ADDRESS', + r'Ljava/lang/String;', + ); - factory ScopeCallback.implement( - $ScopeCallback $impl, - ) { - final $i = jni$_.JImplementer(); - implementIn($i, $impl); - return ScopeCallback.fromReference( - $i.implementReference(), - ); - } -} + /// from: `static public final java.lang.String IP_ADDRESS` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get IP_ADDRESS => + _id_IP_ADDRESS.get(_class, const jni$_.JStringNullableType()); -abstract base mixin class $ScopeCallback { - factory $ScopeCallback({ - required void Function(jni$_.JObject iScope) run, - bool run$async, - }) = _$ScopeCallback; + static final _id_NAME = _class.staticFieldId( + r'NAME', + r'Ljava/lang/String;', + ); - void run(jni$_.JObject iScope); - bool get run$async => false; -} + /// from: `static public final java.lang.String NAME` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get NAME => + _id_NAME.get(_class, const jni$_.JStringNullableType()); -final class _$ScopeCallback with $ScopeCallback { - _$ScopeCallback({ - required void Function(jni$_.JObject iScope) run, - this.run$async = false, - }) : _run = run; + static final _id_GEO = _class.staticFieldId( + r'GEO', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String GEO` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get GEO => + _id_GEO.get(_class, const jni$_.JStringNullableType()); + + static final _id_DATA = _class.staticFieldId( + r'DATA', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String DATA` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get DATA => + _id_DATA.get(_class, const jni$_.JStringNullableType()); - final void Function(jni$_.JObject iScope) _run; - final bool run$async; + static final _id_new$ = _class.constructorId( + r'()V', + ); - void run(jni$_.JObject iScope) { - return _run(iScope); + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory User$JsonKeys() { + return User$JsonKeys.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); } } -final class $ScopeCallback$NullableType extends jni$_.JObjType { +final class $User$JsonKeys$NullableType extends jni$_.JObjType { @jni$_.internal - const $ScopeCallback$NullableType(); + const $User$JsonKeys$NullableType(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/ScopeCallback;'; + String get signature => r'Lio/sentry/protocol/User$JsonKeys;'; @jni$_.internal @core$_.override - ScopeCallback? fromReference(jni$_.JReference reference) => reference.isNull + User$JsonKeys? fromReference(jni$_.JReference reference) => reference.isNull ? null - : ScopeCallback.fromReference( + : User$JsonKeys.fromReference( reference, ); @jni$_.internal @@ -10947,34 +12036,34 @@ final class $ScopeCallback$NullableType extends jni$_.JObjType { @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => this; + jni$_.JObjType get nullableType => this; @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($ScopeCallback$NullableType).hashCode; + int get hashCode => ($User$JsonKeys$NullableType).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($ScopeCallback$NullableType) && - other is $ScopeCallback$NullableType; + return other.runtimeType == ($User$JsonKeys$NullableType) && + other is $User$JsonKeys$NullableType; } } -final class $ScopeCallback$Type extends jni$_.JObjType { +final class $User$JsonKeys$Type extends jni$_.JObjType { @jni$_.internal - const $ScopeCallback$Type(); + const $User$JsonKeys$Type(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/ScopeCallback;'; + String get signature => r'Lio/sentry/protocol/User$JsonKeys;'; @jni$_.internal @core$_.override - ScopeCallback fromReference(jni$_.JReference reference) => - ScopeCallback.fromReference( + User$JsonKeys fromReference(jni$_.JReference reference) => + User$JsonKeys.fromReference( reference, ); @jni$_.internal @@ -10983,306 +12072,626 @@ final class $ScopeCallback$Type extends jni$_.JObjType { @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => - const $ScopeCallback$NullableType(); + jni$_.JObjType get nullableType => + const $User$JsonKeys$NullableType(); @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($ScopeCallback$Type).hashCode; + int get hashCode => ($User$JsonKeys$Type).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($ScopeCallback$Type) && - other is $ScopeCallback$Type; + return other.runtimeType == ($User$JsonKeys$Type) && + other is $User$JsonKeys$Type; } } -/// from: `io.sentry.protocol.User$Deserializer` -class User$Deserializer extends jni$_.JObject { +/// from: `io.sentry.protocol.User` +class User extends jni$_.JObject { @jni$_.internal @core$_.override - final jni$_.JObjType $type; + final jni$_.JObjType $type; @jni$_.internal - User$Deserializer.fromReference( + User.fromReference( jni$_.JReference reference, ) : $type = type, super.fromReference(reference); - static final _class = - jni$_.JClass.forName(r'io/sentry/protocol/User$Deserializer'); + static final _class = jni$_.JClass.forName(r'io/sentry/protocol/User'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $User$NullableType(); + static const type = $User$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory User() { + return User.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(Lio/sentry/protocol/User;)V', + ); + + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void (io.sentry.protocol.User user)` + /// The returned object must be released after use, by calling the [release] method. + factory User.new$1( + User user, + ) { + final _$user = user.reference; + return User.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as jni$_.JMethodIDPtr, _$user.pointer) + .reference); + } + + static final _id_fromMap = _class.staticMethodId( + r'fromMap', + r'(Ljava/util/Map;Lio/sentry/SentryOptions;)Lio/sentry/protocol/User;', + ); + + static final _fromMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.User fromMap(java.util.Map map, io.sentry.SentryOptions sentryOptions)` + /// The returned object must be released after use, by calling the [release] method. + static User? fromMap( + jni$_.JMap map, + jni$_.JObject sentryOptions, + ) { + final _$map = map.reference; + final _$sentryOptions = sentryOptions.reference; + return _fromMap(_class.reference.pointer, _id_fromMap as jni$_.JMethodIDPtr, + _$map.pointer, _$sentryOptions.pointer) + .object(const $User$NullableType()); + } + + static final _id_getEmail = _class.instanceMethodId( + r'getEmail', + r'()Ljava/lang/String;', + ); + + static final _getEmail = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getEmail()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getEmail() { + return _getEmail(reference.pointer, _id_getEmail as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_setEmail = _class.instanceMethodId( + r'setEmail', + r'(Ljava/lang/String;)V', + ); + + static final _setEmail = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setEmail(java.lang.String string)` + void setEmail( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setEmail(reference.pointer, _id_setEmail as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getId = _class.instanceMethodId( + r'getId', + r'()Ljava/lang/String;', + ); + + static final _getId = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getId()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getId() { + return _getId(reference.pointer, _id_getId as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_setId = _class.instanceMethodId( + r'setId', + r'(Ljava/lang/String;)V', + ); + + static final _setId = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setId(java.lang.String string)` + void setId( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setId(reference.pointer, _id_setId as jni$_.JMethodIDPtr, _$string.pointer) + .check(); + } - /// The type which includes information such as the signature of this class. - static const nullableType = $User$Deserializer$NullableType(); - static const type = $User$Deserializer$Type(); - static final _id_new$ = _class.constructorId( - r'()V', + static final _id_getUsername = _class.instanceMethodId( + r'getUsername', + r'()Ljava/lang/String;', ); - static final _new$ = jni$_.ProtectedJniExtensions.lookup< + static final _getUsername = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_NewObject') + )>>('globalEnv_CallObjectMethod') .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `public void ()` + /// from: `public java.lang.String getUsername()` /// The returned object must be released after use, by calling the [release] method. - factory User$Deserializer() { - return User$Deserializer.fromReference( - _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) - .reference); + jni$_.JString? getUsername() { + return _getUsername( + reference.pointer, _id_getUsername as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); } - static final _id_deserialize = _class.instanceMethodId( - r'deserialize', - r'(Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Lio/sentry/protocol/User;', + static final _id_setUsername = _class.instanceMethodId( + r'setUsername', + r'(Ljava/lang/String;)V', ); - static final _deserialize = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer - )>)>>('globalEnv_CallObjectMethod') + static final _setUsername = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer)>(); + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public io.sentry.protocol.User deserialize(io.sentry.ObjectReader objectReader, io.sentry.ILogger iLogger)` - /// The returned object must be released after use, by calling the [release] method. - User deserialize( - jni$_.JObject objectReader, - jni$_.JObject iLogger, + /// from: `public void setUsername(java.lang.String string)` + void setUsername( + jni$_.JString? string, ) { - final _$objectReader = objectReader.reference; - final _$iLogger = iLogger.reference; - return _deserialize( - reference.pointer, - _id_deserialize as jni$_.JMethodIDPtr, - _$objectReader.pointer, - _$iLogger.pointer) - .object(const $User$Type()); + final _$string = string?.reference ?? jni$_.jNullReference; + _setUsername(reference.pointer, _id_setUsername as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); } -} - -final class $User$Deserializer$NullableType - extends jni$_.JObjType { - @jni$_.internal - const $User$Deserializer$NullableType(); - - @jni$_.internal - @core$_.override - String get signature => r'Lio/sentry/protocol/User$Deserializer;'; - - @jni$_.internal - @core$_.override - User$Deserializer? fromReference(jni$_.JReference reference) => - reference.isNull - ? null - : User$Deserializer.fromReference( - reference, - ); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => this; - @jni$_.internal - @core$_.override - final superCount = 1; + static final _id_getIpAddress = _class.instanceMethodId( + r'getIpAddress', + r'()Ljava/lang/String;', + ); - @core$_.override - int get hashCode => ($User$Deserializer$NullableType).hashCode; + static final _getIpAddress = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($User$Deserializer$NullableType) && - other is $User$Deserializer$NullableType; + /// from: `public java.lang.String getIpAddress()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getIpAddress() { + return _getIpAddress( + reference.pointer, _id_getIpAddress as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); } -} - -final class $User$Deserializer$Type extends jni$_.JObjType { - @jni$_.internal - const $User$Deserializer$Type(); - - @jni$_.internal - @core$_.override - String get signature => r'Lio/sentry/protocol/User$Deserializer;'; - @jni$_.internal - @core$_.override - User$Deserializer fromReference(jni$_.JReference reference) => - User$Deserializer.fromReference( - reference, - ); - @jni$_.internal - @core$_.override - jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - - @jni$_.internal - @core$_.override - jni$_.JObjType get nullableType => - const $User$Deserializer$NullableType(); - - @jni$_.internal - @core$_.override - final superCount = 1; + static final _id_setIpAddress = _class.instanceMethodId( + r'setIpAddress', + r'(Ljava/lang/String;)V', + ); - @core$_.override - int get hashCode => ($User$Deserializer$Type).hashCode; + static final _setIpAddress = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - @core$_.override - bool operator ==(Object other) { - return other.runtimeType == ($User$Deserializer$Type) && - other is $User$Deserializer$Type; + /// from: `public void setIpAddress(java.lang.String string)` + void setIpAddress( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setIpAddress(reference.pointer, _id_setIpAddress as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); } -} -/// from: `io.sentry.protocol.User$JsonKeys` -class User$JsonKeys extends jni$_.JObject { - @jni$_.internal - @core$_.override - final jni$_.JObjType $type; + static final _id_getName = _class.instanceMethodId( + r'getName', + r'()Ljava/lang/String;', + ); - @jni$_.internal - User$JsonKeys.fromReference( - jni$_.JReference reference, - ) : $type = type, - super.fromReference(reference); + static final _getName = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - static final _class = - jni$_.JClass.forName(r'io/sentry/protocol/User$JsonKeys'); + /// from: `public java.lang.String getName()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getName() { + return _getName(reference.pointer, _id_getName as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } - /// The type which includes information such as the signature of this class. - static const nullableType = $User$JsonKeys$NullableType(); - static const type = $User$JsonKeys$Type(); - static final _id_EMAIL = _class.staticFieldId( - r'EMAIL', - r'Ljava/lang/String;', + static final _id_setName = _class.instanceMethodId( + r'setName', + r'(Ljava/lang/String;)V', ); - /// from: `static public final java.lang.String EMAIL` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get EMAIL => - _id_EMAIL.get(_class, const jni$_.JStringNullableType()); + static final _setName = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setName(java.lang.String string)` + void setName( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setName(reference.pointer, _id_setName as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } - static final _id_ID = _class.staticFieldId( - r'ID', - r'Ljava/lang/String;', + static final _id_getGeo = _class.instanceMethodId( + r'getGeo', + r'()Lio/sentry/protocol/Geo;', ); - /// from: `static public final java.lang.String ID` + static final _getGeo = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.protocol.Geo getGeo()` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get ID => - _id_ID.get(_class, const jni$_.JStringNullableType()); + jni$_.JObject? getGeo() { + return _getGeo(reference.pointer, _id_getGeo as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } - static final _id_USERNAME = _class.staticFieldId( - r'USERNAME', - r'Ljava/lang/String;', + static final _id_setGeo = _class.instanceMethodId( + r'setGeo', + r'(Lio/sentry/protocol/Geo;)V', ); - /// from: `static public final java.lang.String USERNAME` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get USERNAME => - _id_USERNAME.get(_class, const jni$_.JStringNullableType()); + static final _setGeo = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - static final _id_IP_ADDRESS = _class.staticFieldId( - r'IP_ADDRESS', - r'Ljava/lang/String;', + /// from: `public void setGeo(io.sentry.protocol.Geo geo)` + void setGeo( + jni$_.JObject? geo, + ) { + final _$geo = geo?.reference ?? jni$_.jNullReference; + _setGeo(reference.pointer, _id_setGeo as jni$_.JMethodIDPtr, _$geo.pointer) + .check(); + } + + static final _id_getData = _class.instanceMethodId( + r'getData', + r'()Ljava/util/Map;', ); - /// from: `static public final java.lang.String IP_ADDRESS` + static final _getData = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.util.Map getData()` /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get IP_ADDRESS => - _id_IP_ADDRESS.get(_class, const jni$_.JStringNullableType()); + jni$_.JMap? getData() { + return _getData(reference.pointer, _id_getData as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringType())); + } - static final _id_NAME = _class.staticFieldId( - r'NAME', - r'Ljava/lang/String;', + static final _id_setData = _class.instanceMethodId( + r'setData', + r'(Ljava/util/Map;)V', ); - /// from: `static public final java.lang.String NAME` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get NAME => - _id_NAME.get(_class, const jni$_.JStringNullableType()); + static final _setData = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - static final _id_GEO = _class.staticFieldId( - r'GEO', - r'Ljava/lang/String;', + /// from: `public void setData(java.util.Map map)` + void setData( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + _setData( + reference.pointer, _id_setData as jni$_.JMethodIDPtr, _$map.pointer) + .check(); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', ); - /// from: `static public final java.lang.String GEO` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get GEO => - _id_GEO.get(_class, const jni$_.JStringNullableType()); + static final _equals = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); - static final _id_DATA = _class.staticFieldId( - r'DATA', - r'Ljava/lang/String;', + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', ); - /// from: `static public final java.lang.String DATA` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DATA => - _id_DATA.get(_class, const jni$_.JStringNullableType()); + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); - static final _id_new$ = _class.constructorId( - r'()V', + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_getUnknown = _class.instanceMethodId( + r'getUnknown', + r'()Ljava/util/Map;', ); - static final _new$ = jni$_.ProtectedJniExtensions.lookup< + static final _getUnknown = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_NewObject') + )>>('globalEnv_CallObjectMethod') .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `public void ()` + /// from: `public java.util.Map getUnknown()` /// The returned object must be released after use, by calling the [release] method. - factory User$JsonKeys() { - return User$JsonKeys.fromReference( - _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) - .reference); + jni$_.JMap? getUnknown() { + return _getUnknown(reference.pointer, _id_getUnknown as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_setUnknown = _class.instanceMethodId( + r'setUnknown', + r'(Ljava/util/Map;)V', + ); + + static final _setUnknown = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setUnknown(java.util.Map map)` + void setUnknown( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + _setUnknown(reference.pointer, _id_setUnknown as jni$_.JMethodIDPtr, + _$map.pointer) + .check(); + } + + static final _id_serialize = _class.instanceMethodId( + r'serialize', + r'(Lio/sentry/ObjectWriter;Lio/sentry/ILogger;)V', + ); + + static final _serialize = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void serialize(io.sentry.ObjectWriter objectWriter, io.sentry.ILogger iLogger)` + void serialize( + jni$_.JObject objectWriter, + jni$_.JObject iLogger, + ) { + final _$objectWriter = objectWriter.reference; + final _$iLogger = iLogger.reference; + _serialize(reference.pointer, _id_serialize as jni$_.JMethodIDPtr, + _$objectWriter.pointer, _$iLogger.pointer) + .check(); } } -final class $User$JsonKeys$NullableType extends jni$_.JObjType { +final class $User$NullableType extends jni$_.JObjType { @jni$_.internal - const $User$JsonKeys$NullableType(); + const $User$NullableType(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/protocol/User$JsonKeys;'; + String get signature => r'Lio/sentry/protocol/User;'; @jni$_.internal @core$_.override - User$JsonKeys? fromReference(jni$_.JReference reference) => reference.isNull + User? fromReference(jni$_.JReference reference) => reference.isNull ? null - : User$JsonKeys.fromReference( + : User.fromReference( reference, ); @jni$_.internal @@ -11291,34 +12700,33 @@ final class $User$JsonKeys$NullableType extends jni$_.JObjType { @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => this; + jni$_.JObjType get nullableType => this; @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($User$JsonKeys$NullableType).hashCode; + int get hashCode => ($User$NullableType).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($User$JsonKeys$NullableType) && - other is $User$JsonKeys$NullableType; + return other.runtimeType == ($User$NullableType) && + other is $User$NullableType; } } -final class $User$JsonKeys$Type extends jni$_.JObjType { +final class $User$Type extends jni$_.JObjType { @jni$_.internal - const $User$JsonKeys$Type(); + const $User$Type(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/protocol/User$JsonKeys;'; + String get signature => r'Lio/sentry/protocol/User;'; @jni$_.internal @core$_.override - User$JsonKeys fromReference(jni$_.JReference reference) => - User$JsonKeys.fromReference( + User fromReference(jni$_.JReference reference) => User.fromReference( reference, ); @jni$_.internal @@ -11327,40 +12735,39 @@ final class $User$JsonKeys$Type extends jni$_.JObjType { @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => - const $User$JsonKeys$NullableType(); + jni$_.JObjType get nullableType => const $User$NullableType(); @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($User$JsonKeys$Type).hashCode; + int get hashCode => ($User$Type).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($User$JsonKeys$Type) && - other is $User$JsonKeys$Type; + return other.runtimeType == ($User$Type) && other is $User$Type; } } -/// from: `io.sentry.protocol.User` -class User extends jni$_.JObject { +/// from: `io.sentry.protocol.SentryId$Deserializer` +class SentryId$Deserializer extends jni$_.JObject { @jni$_.internal @core$_.override - final jni$_.JObjType $type; + final jni$_.JObjType $type; @jni$_.internal - User.fromReference( + SentryId$Deserializer.fromReference( jni$_.JReference reference, ) : $type = type, super.fromReference(reference); - static final _class = jni$_.JClass.forName(r'io/sentry/protocol/User'); + static final _class = + jni$_.JClass.forName(r'io/sentry/protocol/SentryId$Deserializer'); /// The type which includes information such as the signature of this class. - static const nullableType = $User$NullableType(); - static const type = $User$Type(); + static const nullableType = $SentryId$Deserializer$NullableType(); + static const type = $SentryId$Deserializer$Type(); static final _id_new$ = _class.constructorId( r'()V', ); @@ -11379,44 +12786,18 @@ class User extends jni$_.JObject { /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. - factory User() { - return User.fromReference( + factory SentryId$Deserializer() { + return SentryId$Deserializer.fromReference( _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) .reference); } - static final _id_new$1 = _class.constructorId( - r'(Lio/sentry/protocol/User;)V', - ); - - static final _new$1 = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_NewObject') - .asFunction< - jni$_.JniResult Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void (io.sentry.protocol.User user)` - /// The returned object must be released after use, by calling the [release] method. - factory User.new$1( - User user, - ) { - final _$user = user.reference; - return User.fromReference(_new$1(_class.reference.pointer, - _id_new$1 as jni$_.JMethodIDPtr, _$user.pointer) - .reference); - } - - static final _id_fromMap = _class.staticMethodId( - r'fromMap', - r'(Ljava/util/Map;Lio/sentry/SentryOptions;)Lio/sentry/protocol/User;', + static final _id_deserialize = _class.instanceMethodId( + r'deserialize', + r'(Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Lio/sentry/protocol/SentryId;', ); - static final _fromMap = jni$_.ProtectedJniExtensions.lookup< + static final _deserialize = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -11425,7 +12806,7 @@ class User extends jni$_.JObject { ( jni$_.Pointer, jni$_.Pointer - )>)>>('globalEnv_CallStaticObjectMethod') + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -11433,325 +12814,209 @@ class User extends jni$_.JObject { jni$_.Pointer, jni$_.Pointer)>(); - /// from: `static public io.sentry.protocol.User fromMap(java.util.Map map, io.sentry.SentryOptions sentryOptions)` + /// from: `public io.sentry.protocol.SentryId deserialize(io.sentry.ObjectReader objectReader, io.sentry.ILogger iLogger)` /// The returned object must be released after use, by calling the [release] method. - static User? fromMap( - jni$_.JMap map, - jni$_.JObject sentryOptions, + SentryId deserialize( + jni$_.JObject objectReader, + jni$_.JObject iLogger, ) { - final _$map = map.reference; - final _$sentryOptions = sentryOptions.reference; - return _fromMap(_class.reference.pointer, _id_fromMap as jni$_.JMethodIDPtr, - _$map.pointer, _$sentryOptions.pointer) - .object(const $User$NullableType()); + final _$objectReader = objectReader.reference; + final _$iLogger = iLogger.reference; + return _deserialize( + reference.pointer, + _id_deserialize as jni$_.JMethodIDPtr, + _$objectReader.pointer, + _$iLogger.pointer) + .object(const $SentryId$Type()); } +} - static final _id_getEmail = _class.instanceMethodId( - r'getEmail', - r'()Ljava/lang/String;', - ); - - static final _getEmail = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public java.lang.String getEmail()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getEmail() { - return _getEmail(reference.pointer, _id_getEmail as jni$_.JMethodIDPtr) - .object(const jni$_.JStringNullableType()); - } +final class $SentryId$Deserializer$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $SentryId$Deserializer$NullableType(); - static final _id_setEmail = _class.instanceMethodId( - r'setEmail', - r'(Ljava/lang/String;)V', - ); + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/protocol/SentryId$Deserializer;'; - static final _setEmail = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + @jni$_.internal + @core$_.override + SentryId$Deserializer? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : SentryId$Deserializer.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - /// from: `public void setEmail(java.lang.String string)` - void setEmail( - jni$_.JString? string, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _setEmail(reference.pointer, _id_setEmail as jni$_.JMethodIDPtr, - _$string.pointer) - .check(); - } + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; - static final _id_getId = _class.instanceMethodId( - r'getId', - r'()Ljava/lang/String;', - ); + @jni$_.internal + @core$_.override + final superCount = 1; - static final _getId = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + @core$_.override + int get hashCode => ($SentryId$Deserializer$NullableType).hashCode; - /// from: `public java.lang.String getId()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getId() { - return _getId(reference.pointer, _id_getId as jni$_.JMethodIDPtr) - .object(const jni$_.JStringNullableType()); + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($SentryId$Deserializer$NullableType) && + other is $SentryId$Deserializer$NullableType; } +} - static final _id_setId = _class.instanceMethodId( - r'setId', - r'(Ljava/lang/String;)V', - ); - - static final _setId = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void setId(java.lang.String string)` - void setId( - jni$_.JString? string, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _setId(reference.pointer, _id_setId as jni$_.JMethodIDPtr, _$string.pointer) - .check(); - } +final class $SentryId$Deserializer$Type + extends jni$_.JObjType { + @jni$_.internal + const $SentryId$Deserializer$Type(); - static final _id_getUsername = _class.instanceMethodId( - r'getUsername', - r'()Ljava/lang/String;', - ); + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/protocol/SentryId$Deserializer;'; - static final _getUsername = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + @jni$_.internal + @core$_.override + SentryId$Deserializer fromReference(jni$_.JReference reference) => + SentryId$Deserializer.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); - /// from: `public java.lang.String getUsername()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getUsername() { - return _getUsername( - reference.pointer, _id_getUsername as jni$_.JMethodIDPtr) - .object(const jni$_.JStringNullableType()); - } + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $SentryId$Deserializer$NullableType(); - static final _id_setUsername = _class.instanceMethodId( - r'setUsername', - r'(Ljava/lang/String;)V', - ); + @jni$_.internal + @core$_.override + final superCount = 1; - static final _setUsername = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); + @core$_.override + int get hashCode => ($SentryId$Deserializer$Type).hashCode; - /// from: `public void setUsername(java.lang.String string)` - void setUsername( - jni$_.JString? string, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _setUsername(reference.pointer, _id_setUsername as jni$_.JMethodIDPtr, - _$string.pointer) - .check(); + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($SentryId$Deserializer$Type) && + other is $SentryId$Deserializer$Type; } +} - static final _id_getIpAddress = _class.instanceMethodId( - r'getIpAddress', - r'()Ljava/lang/String;', - ); +/// from: `io.sentry.protocol.SentryId` +class SentryId extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; - static final _getIpAddress = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); + @jni$_.internal + SentryId.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); - /// from: `public java.lang.String getIpAddress()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getIpAddress() { - return _getIpAddress( - reference.pointer, _id_getIpAddress as jni$_.JMethodIDPtr) - .object(const jni$_.JStringNullableType()); - } + static final _class = jni$_.JClass.forName(r'io/sentry/protocol/SentryId'); - static final _id_setIpAddress = _class.instanceMethodId( - r'setIpAddress', - r'(Ljava/lang/String;)V', + /// The type which includes information such as the signature of this class. + static const nullableType = $SentryId$NullableType(); + static const type = $SentryId$Type(); + static final _id_EMPTY_ID = _class.staticFieldId( + r'EMPTY_ID', + r'Lio/sentry/protocol/SentryId;', ); - static final _setIpAddress = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void setIpAddress(java.lang.String string)` - void setIpAddress( - jni$_.JString? string, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _setIpAddress(reference.pointer, _id_setIpAddress as jni$_.JMethodIDPtr, - _$string.pointer) - .check(); - } + /// from: `static public final io.sentry.protocol.SentryId EMPTY_ID` + /// The returned object must be released after use, by calling the [release] method. + static SentryId? get EMPTY_ID => + _id_EMPTY_ID.get(_class, const $SentryId$NullableType()); - static final _id_getName = _class.instanceMethodId( - r'getName', - r'()Ljava/lang/String;', + static final _id_new$ = _class.constructorId( + r'()V', ); - static final _getName = jni$_.ProtectedJniExtensions.lookup< + static final _new$ = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + )>>('globalEnv_NewObject') .asFunction< jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, )>(); - /// from: `public java.lang.String getName()` + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getName() { - return _getName(reference.pointer, _id_getName as jni$_.JMethodIDPtr) - .object(const jni$_.JStringNullableType()); + factory SentryId() { + return SentryId.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); } - static final _id_setName = _class.instanceMethodId( - r'setName', - r'(Ljava/lang/String;)V', + static final _id_new$1 = _class.constructorId( + r'(Ljava/util/UUID;)V', ); - static final _setName = jni$_.ProtectedJniExtensions.lookup< + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + 'globalEnv_NewObject') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void setName(java.lang.String string)` - void setName( - jni$_.JString? string, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - _setName(reference.pointer, _id_setName as jni$_.JMethodIDPtr, - _$string.pointer) - .check(); - } - - static final _id_getGeo = _class.instanceMethodId( - r'getGeo', - r'()Lio/sentry/protocol/Geo;', - ); - - static final _getGeo = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public io.sentry.protocol.Geo getGeo()` + /// from: `public void (java.util.UUID uUID)` /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getGeo() { - return _getGeo(reference.pointer, _id_getGeo as jni$_.JMethodIDPtr) - .object(const jni$_.JObjectNullableType()); + factory SentryId.new$1( + jni$_.JObject? uUID, + ) { + final _$uUID = uUID?.reference ?? jni$_.jNullReference; + return SentryId.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as jni$_.JMethodIDPtr, _$uUID.pointer) + .reference); } - static final _id_setGeo = _class.instanceMethodId( - r'setGeo', - r'(Lio/sentry/protocol/Geo;)V', + static final _id_new$2 = _class.constructorId( + r'(Ljava/lang/String;)V', ); - static final _setGeo = jni$_.ProtectedJniExtensions.lookup< + static final _new$2 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< - jni$_.JThrowablePtr Function( + jni$_.JniResult Function( jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') + 'globalEnv_NewObject') .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr, jni$_.Pointer)>(); - /// from: `public void setGeo(io.sentry.protocol.Geo geo)` - void setGeo( - jni$_.JObject? geo, + /// from: `public void (java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + factory SentryId.new$2( + jni$_.JString string, ) { - final _$geo = geo?.reference ?? jni$_.jNullReference; - _setGeo(reference.pointer, _id_setGeo as jni$_.JMethodIDPtr, _$geo.pointer) - .check(); + final _$string = string.reference; + return SentryId.fromReference(_new$2(_class.reference.pointer, + _id_new$2 as jni$_.JMethodIDPtr, _$string.pointer) + .reference); } - static final _id_getData = _class.instanceMethodId( - r'getData', - r'()Ljava/util/Map;', + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', ); - static final _getData = jni$_.ProtectedJniExtensions.lookup< + static final _toString$1 = jni$_.ProtectedJniExtensions.lookup< jni$_.NativeFunction< jni$_.JniResult Function( jni$_.Pointer, @@ -11763,39 +13028,11 @@ class User extends jni$_.JObject { jni$_.JMethodIDPtr, )>(); - /// from: `public java.util.Map getData()` + /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - jni$_.JMap? getData() { - return _getData(reference.pointer, _id_getData as jni$_.JMethodIDPtr) - .object?>( - const jni$_.JMapNullableType( - jni$_.JStringNullableType(), jni$_.JStringType())); - } - - static final _id_setData = _class.instanceMethodId( - r'setData', - r'(Ljava/util/Map;)V', - ); - - static final _setData = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void setData(java.util.Map map)` - void setData( - jni$_.JMap? map, - ) { - final _$map = map?.reference ?? jni$_.jNullReference; - _setData( - reference.pointer, _id_setData as jni$_.JMethodIDPtr, _$map.pointer) - .check(); + jni$_.JString? toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); } static final _id_equals = _class.instanceMethodId( @@ -11847,58 +13084,6 @@ class User extends jni$_.JObject { .integer; } - static final _id_getUnknown = _class.instanceMethodId( - r'getUnknown', - r'()Ljava/util/Map;', - ); - - static final _getUnknown = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - )>(); - - /// from: `public java.util.Map getUnknown()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JMap? getUnknown() { - return _getUnknown(reference.pointer, _id_getUnknown as jni$_.JMethodIDPtr) - .object?>( - const jni$_.JMapNullableType( - jni$_.JStringNullableType(), jni$_.JObjectNullableType())); - } - - static final _id_setUnknown = _class.instanceMethodId( - r'setUnknown', - r'(Ljava/util/Map;)V', - ); - - static final _setUnknown = jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>)>>( - 'globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function(jni$_.Pointer, - jni$_.JMethodIDPtr, jni$_.Pointer)>(); - - /// from: `public void setUnknown(java.util.Map map)` - void setUnknown( - jni$_.JMap? map, - ) { - final _$map = map?.reference ?? jni$_.jNullReference; - _setUnknown(reference.pointer, _id_setUnknown as jni$_.JMethodIDPtr, - _$map.pointer) - .check(); - } - static final _id_serialize = _class.instanceMethodId( r'serialize', r'(Lio/sentry/ObjectWriter;Lio/sentry/ILogger;)V', @@ -11934,19 +13119,19 @@ class User extends jni$_.JObject { } } -final class $User$NullableType extends jni$_.JObjType { +final class $SentryId$NullableType extends jni$_.JObjType { @jni$_.internal - const $User$NullableType(); + const $SentryId$NullableType(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/protocol/User;'; + String get signature => r'Lio/sentry/protocol/SentryId;'; @jni$_.internal @core$_.override - User? fromReference(jni$_.JReference reference) => reference.isNull + SentryId? fromReference(jni$_.JReference reference) => reference.isNull ? null - : User.fromReference( + : SentryId.fromReference( reference, ); @jni$_.internal @@ -11955,33 +13140,33 @@ final class $User$NullableType extends jni$_.JObjType { @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => this; + jni$_.JObjType get nullableType => this; @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($User$NullableType).hashCode; + int get hashCode => ($SentryId$NullableType).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($User$NullableType) && - other is $User$NullableType; + return other.runtimeType == ($SentryId$NullableType) && + other is $SentryId$NullableType; } } -final class $User$Type extends jni$_.JObjType { +final class $SentryId$Type extends jni$_.JObjType { @jni$_.internal - const $User$Type(); + const $SentryId$Type(); @jni$_.internal @core$_.override - String get signature => r'Lio/sentry/protocol/User;'; + String get signature => r'Lio/sentry/protocol/SentryId;'; @jni$_.internal @core$_.override - User fromReference(jni$_.JReference reference) => User.fromReference( + SentryId fromReference(jni$_.JReference reference) => SentryId.fromReference( reference, ); @jni$_.internal @@ -11990,18 +13175,18 @@ final class $User$Type extends jni$_.JObjType { @jni$_.internal @core$_.override - jni$_.JObjType get nullableType => const $User$NullableType(); + jni$_.JObjType get nullableType => const $SentryId$NullableType(); @jni$_.internal @core$_.override final superCount = 1; @core$_.override - int get hashCode => ($User$Type).hashCode; + int get hashCode => ($SentryId$Type).hashCode; @core$_.override bool operator ==(Object other) { - return other.runtimeType == ($User$Type) && other is $User$Type; + return other.runtimeType == ($SentryId$Type) && other is $SentryId$Type; } } diff --git a/packages/flutter/lib/src/native/java/sentry_native_java.dart b/packages/flutter/lib/src/native/java/sentry_native_java.dart index 64bb9dc6ec..e7784ba814 100644 --- a/packages/flutter/lib/src/native/java/sentry_native_java.dart +++ b/packages/flutter/lib/src/native/java/sentry_native_java.dart @@ -5,6 +5,7 @@ import 'package:jni/jni.dart'; import 'package:meta/meta.dart'; import '../../../sentry_flutter.dart'; +import '../../replay/replay_config.dart'; import '../../replay/scheduled_recorder_config.dart'; import '../native_app_start.dart'; import '../sentry_native_channel.dart'; @@ -18,6 +19,7 @@ import 'binding.dart' as native; class SentryNativeJava extends SentryNativeChannel { AndroidReplayRecorder? _replayRecorder; AndroidEnvelopeSender? _envelopeSender; + native.ReplayIntegration? _nativeReplay; SentryNativeJava(super.options); @@ -28,6 +30,9 @@ class SentryNativeJava extends SentryNativeChannel { SentryId? get replayId => _replayId; SentryId? _replayId; + @visibleForTesting + AndroidReplayRecorder? get testRecorder => _replayRecorder; + @override Future init(Hub hub) async { // We only need these when replay is enabled (session or error capture) @@ -48,7 +53,8 @@ class SentryNativeJava extends SentryNativeChannel { : false; _replayId = replayId; - + _nativeReplay = native.SentryFlutterPlugin.Companion + .privateSentryGetReplayIntegration(); _replayRecorder = AndroidReplayRecorder.factory(options); await _replayRecorder!.start(); hub.configureScope((s) { @@ -97,13 +103,6 @@ class SentryNativeJava extends SentryNativeChannel { return super.init(hub); } - @override - FutureOr captureReplay() async { - final replayId = await super.captureReplay(); - _replayId = replayId; - return replayId; - } - @override FutureOr captureEnvelope( Uint8List envelopeData, bool containsUnhandledException) { @@ -241,6 +240,7 @@ class SentryNativeJava extends SentryNativeChannel { Future close() async { await _replayRecorder?.stop(); await _envelopeSender?.close(); + _nativeReplay?.release(); return super.close(); } @@ -358,6 +358,91 @@ class SentryNativeJava extends SentryNativeChannel { native.Sentry.removeExtra(jKey); }); }); + + @override + SentryId captureReplay() { + final id = tryCatchSync('captureReplay', () { + return using((arena) { + _nativeReplay ??= native.SentryFlutterPlugin.Companion + .privateSentryGetReplayIntegration(); + // The passed parameter is `isTerminating` + _nativeReplay?.captureReplay(false.toJBoolean()..releasedBy(arena)); + + final nativeReplayId = _nativeReplay?.getReplayId(); + nativeReplayId?.releasedBy(arena); + + JString? jString; + if (nativeReplayId != null) { + jString = nativeReplayId.toString$1(); + jString?.releasedBy(arena); + } + + final result = jString == null + ? SentryId.empty() + : SentryId.fromId(jString.toDartString()); + + _replayId = result; + return result; + }); + }); + + return id ?? SentryId.empty(); + } + + @override + void setReplayConfig(ReplayConfig config) => + tryCatchSync('setReplayConfig', () { + // Since codec block size is 16, so we have to adjust the width and height to it, + // otherwise the codec might fail to configure on some devices, see + // https://cs.android.com/android/platform/superproject/+/master:frameworks/base/media/java/android/media/MediaCodecInfo.java;l=1999-2001 + final invalidConfig = config.width == 0.0 || + config.height == 0.0 || + config.windowWidth == 0.0 || + config.windowHeight == 0.0; + if (invalidConfig) { + options.log( + SentryLevel.error, + 'Replay config is not valid: ' + 'width: ${config.width}, ' + 'height: ${config.height}, ' + 'windowWidth: ${config.windowWidth}, ' + 'windowHeight: ${config.windowHeight}'); + return; + } + + var adjWidth = config.width; + var adjHeight = config.height; + + // First update the smaller dimension, as changing that will affect the screen ratio more. + if (adjWidth < adjHeight) { + final newWidth = adjWidth.adjustReplaySizeToBlockSize(); + final scale = newWidth / adjWidth; + final newHeight = (adjHeight * scale).adjustReplaySizeToBlockSize(); + adjWidth = newWidth; + adjHeight = newHeight; + } else { + final newHeight = adjHeight.adjustReplaySizeToBlockSize(); + final scale = newHeight / adjHeight; + final newWidth = (adjWidth * scale).adjustReplaySizeToBlockSize(); + adjHeight = newHeight; + adjWidth = newWidth; + } + + final replayConfig = native.ScreenshotRecorderConfig( + adjWidth.round(), + adjHeight.round(), + adjWidth / config.windowWidth, + adjHeight / config.windowHeight, + config.frameRate, + 0, // bitRate is currently not used + ); + + _nativeReplay ??= native.SentryFlutterPlugin.Companion + .privateSentryGetReplayIntegration(); + _nativeReplay?.onConfigurationChanged(replayConfig); + + replayConfig.release(); + }); } JObject? _dartToJObject(Object? value, Arena arena) => switch (value) { @@ -393,3 +478,17 @@ JMap _dartToJMap(Map json, Arena arena) { return jmap; } + +const _videoBlockSize = 16; + +@visibleForTesting +extension ReplaySizeAdjustment on double { + double adjustReplaySizeToBlockSize() { + final remainder = this % _videoBlockSize; + if (remainder <= _videoBlockSize / 2) { + return this - remainder; + } else { + return this + (_videoBlockSize - remainder); + } + } +} diff --git a/packages/flutter/lib/src/native/sentry_native_channel.dart b/packages/flutter/lib/src/native/sentry_native_channel.dart index 89bc6a18e4..3349ca761d 100644 --- a/packages/flutter/lib/src/native/sentry_native_channel.dart +++ b/packages/flutter/lib/src/native/sentry_native_channel.dart @@ -221,19 +221,16 @@ class SentryNativeChannel SentryId? get replayId => null; @override - FutureOr setReplayConfig(ReplayConfig config) => - channel.invokeMethod('setReplayConfig', { - 'windowWidth': config.windowWidth, - 'windowHeight': config.windowHeight, - 'width': config.width, - 'height': config.height, - 'frameRate': config.frameRate, - }); + FutureOr setReplayConfig(ReplayConfig config) { + assert( + false, 'setReplayConfig should not be used through method channels.'); + } @override - FutureOr captureReplay() => channel - .invokeMethod('captureReplay') - .then((value) => SentryId.fromId(value as String)); + FutureOr captureReplay() { + assert(false, 'captureReplay should not be used through method channels.'); + return SentryId.empty(); + } @override FutureOr captureSession() { diff --git a/packages/flutter/test/native/sentry_native_java_test.dart b/packages/flutter/test/native/sentry_native_java_test.dart new file mode 100644 index 0000000000..a11e552fa6 --- /dev/null +++ b/packages/flutter/test/native/sentry_native_java_test.dart @@ -0,0 +1,49 @@ +@TestOn('vm') +library; + +import 'package:flutter_test/flutter_test.dart'; +import 'sentry_native_java_web_stub.dart' + if (dart.library.io) 'package:sentry_flutter/src/native/java/sentry_native_java.dart'; + +void main() { + // the ReplaySizeAdjustment tests assumes a constant video block size of 16 + group('ReplaySizeAdjustment', () { + test('rounds down when remainder is less than or equal to half block size', + () { + expect(0.0.adjustReplaySizeToBlockSize(), 0.0); + expect(8.0.adjustReplaySizeToBlockSize(), 0.0); + expect(16.0.adjustReplaySizeToBlockSize(), 16.0); + expect(24.0.adjustReplaySizeToBlockSize(), 16.0); + expect(100.0.adjustReplaySizeToBlockSize(), 96.0); + }); + + test('rounds up when remainder is greater than half block size', () { + expect(9.0.adjustReplaySizeToBlockSize(), 16.0); + expect(15.0.adjustReplaySizeToBlockSize(), 16.0); + expect(25.0.adjustReplaySizeToBlockSize(), 32.0); + expect(108.0.adjustReplaySizeToBlockSize(), 112.0); + expect(109.0.adjustReplaySizeToBlockSize(), 112.0); + }); + + test('returns exact value when already multiple of block size', () { + expect(32.0.adjustReplaySizeToBlockSize(), 32.0); + expect(48.0.adjustReplaySizeToBlockSize(), 48.0); + expect(64.0.adjustReplaySizeToBlockSize(), 64.0); + expect(128.0.adjustReplaySizeToBlockSize(), 128.0); + }); + + test('handles edge cases at half block size boundaries', () { + expect(8.0.adjustReplaySizeToBlockSize(), 0.0); + expect(24.0.adjustReplaySizeToBlockSize(), 16.0); + expect(40.0.adjustReplaySizeToBlockSize(), 32.0); + }); + + test('handles fractional values', () { + expect(7.5.adjustReplaySizeToBlockSize(), 0.0); + expect(8.5.adjustReplaySizeToBlockSize(), 16.0); + expect(15.5.adjustReplaySizeToBlockSize(), 16.0); + expect(16.5.adjustReplaySizeToBlockSize(), 16.0); + expect(24.5.adjustReplaySizeToBlockSize(), 32.0); + }); + }); +} diff --git a/packages/flutter/test/native/sentry_native_java_web_stub.dart b/packages/flutter/test/native/sentry_native_java_web_stub.dart new file mode 100644 index 0000000000..cbc7ad2f32 --- /dev/null +++ b/packages/flutter/test/native/sentry_native_java_web_stub.dart @@ -0,0 +1,12 @@ +// Web stub for sentry_native_java.dart +// This file provides only the parts needed for being able to compile on Web +// without importing JNI or other FFI dependencies. + +import 'package:meta/meta.dart'; + +@visibleForTesting +extension ReplaySizeAdjustment on double { + double adjustReplaySizeToBlockSize() { + return 0; + } +} diff --git a/packages/flutter/test/replay/replay_native_test.dart b/packages/flutter/test/replay/replay_native_test.dart index 978d467bcd..7c86884917 100644 --- a/packages/flutter/test/replay/replay_native_test.dart +++ b/packages/flutter/test/replay/replay_native_test.dart @@ -109,7 +109,8 @@ void main() { await tester.pumpWidget(Container()); await tester.pumpAndSettle(); }); - }); + // Skip on Android since JNI cannot be unit tested yet + }, skip: mockPlatform.isAndroid); test( 'clears replay ID from context on ${mockPlatform.operatingSystem.name}', @@ -137,82 +138,29 @@ void main() { when(hub.configureScope(captureAny)).thenReturn(null); await pumpTestElement(tester); - if (mockPlatform.isAndroid) { - nextFrame({bool wait = true}) async { - final future = mockAndroidRecorder.completer.future; - await tester.pumpAndWaitUntil(future, requiredToComplete: wait); - } - - final Map replayConfig = { - 'scope.replayId': '123', - 'replayId': '456', - }; - final configuration = { - 'width': 800, - 'height': 600, - 'frameRate': 1, - }; - await native.invokeFromNative( - 'ReplayRecorder.start', replayConfig); - - await native.invokeFromNative( - 'ReplayRecorder.onConfigurationChanged', configuration); - - await nextFrame(); - expect(mockAndroidRecorder.captured, isNotEmpty); - final screenshot = mockAndroidRecorder.captured.first; - expect(screenshot.width, configuration['width']); - expect(screenshot.height, configuration['height']); - - await native.invokeFromNative('ReplayRecorder.pause'); - var count = mockAndroidRecorder.captured.length; - - await nextFrame(wait: false); - await Future.delayed(const Duration(milliseconds: 100)); - expect(mockAndroidRecorder.captured.length, equals(count)); - - await nextFrame(wait: false); - expect(mockAndroidRecorder.captured.length, equals(count)); - - await native.invokeFromNative('ReplayRecorder.resume'); - - await nextFrame(); - expect(mockAndroidRecorder.captured.length, greaterThan(count)); - - await native.invokeFromNative('ReplayRecorder.stop'); - count = mockAndroidRecorder.captured.length; - await Future.delayed(const Duration(milliseconds: 100)); - await nextFrame(wait: false); - expect(mockAndroidRecorder.captured.length, equals(count)); - } else if (mockPlatform.isIOS) { - final Map replayConfig = { - 'scope.replayId': '123' - }; - - Future captureAndVerify() async { - final future = native.invokeFromNative( - 'captureReplayScreenshot', replayConfig); - final json = (await tester.pumpAndWaitUntil(future)) - as Map; - - expect(json['length'], greaterThan(3000)); - expect(json['address'], greaterThan(0)); - expect(json['width'], 640); - expect(json['height'], 480); - NativeMemory.fromJson(json).free(); - } - - await captureAndVerify(); - - // Check everything works if session-replay rate is 0, - // which causes replayId to be 0 as well. - replayConfig['scope.replayId'] = null; - await captureAndVerify(); - } else { - fail('unsupported platform'); + final Map replayConfig = {'scope.replayId': '123'}; + + Future captureAndVerify() async { + final future = native.invokeFromNative( + 'captureReplayScreenshot', replayConfig); + final json = (await tester.pumpAndWaitUntil(future)) + as Map; + + expect(json['length'], greaterThan(3000)); + expect(json['address'], greaterThan(0)); + expect(json['width'], 640); + expect(json['height'], 480); + NativeMemory.fromJson(json).free(); } + + await captureAndVerify(); + + // Check everything works if session-replay rate is 0, + // which causes replayId to be 0 as well. + replayConfig['scope.replayId'] = null; + await captureAndVerify(); }); - }, timeout: Timeout(Duration(seconds: 10))); + }, timeout: Timeout(Duration(seconds: 10)), skip: !mockPlatform.isIOS); }); }); } @@ -223,6 +171,8 @@ class _MockAndroidReplayRecorder extends ScheduledScreenshotRecorder final captured = []; var completer = Completer(); + void Function()? onScreenshotAddedForTest; + _MockAndroidReplayRecorder(super.options) { super.callback = (screenshot, _) async { captured.add(screenshot); diff --git a/packages/flutter/test/sentry_native_channel_test.dart b/packages/flutter/test/sentry_native_channel_test.dart index d46b164edd..fe0d3da794 100644 --- a/packages/flutter/test/sentry_native_channel_test.dart +++ b/packages/flutter/test/sentry_native_channel_test.dart @@ -302,8 +302,11 @@ void main() { }); test('setReplayConfig', () async { - when(channel.invokeMethod('setReplayConfig', any)) - .thenAnswer((_) => Future.value()); + final matcher = _nativeUnavailableMatcher( + mockPlatform, + includeLookupSymbol: true, + includeFailedToLoadClassException: true, + ); final config = ReplayConfig( windowWidth: 110, @@ -311,31 +314,26 @@ void main() { width: 1.1, height: 2.2, frameRate: 3); - await sut.setReplayConfig(config); if (mockPlatform.isAndroid) { - verify(channel.invokeMethod('setReplayConfig', { - 'windowWidth': config.windowWidth, - 'windowHeight': config.windowHeight, - 'width': config.width, - 'height': config.height, - 'frameRate': config.frameRate, - })); + expect(() => sut.setReplayConfig(config), matcher); } else { - verifyNever(channel.invokeMethod('setReplayConfig', any)); + expect(() => sut.setReplayConfig(config), returnsNormally); } + + verifyZeroInteractions(channel); }); test('captureReplay', () async { - final sentryId = SentryId.newId(); - - when(channel.invokeMethod('captureReplay', any)) - .thenAnswer((_) => Future.value(sentryId.toString())); + final matcher = _nativeUnavailableMatcher( + mockPlatform, + includeLookupSymbol: true, + includeFailedToLoadClassException: true, + ); - final returnedId = await sut.captureReplay(); + expect(() => sut.captureReplay(), matcher); - verify(channel.invokeMethod('captureReplay')); - expect(returnedId, sentryId); + verifyZeroInteractions(channel); }); test('getSession is no-op', () async {