Found 3 matches for pattern "lazyInitAndSendFeedback" in path "app/src/main/java/com/servicebook": --- File: ui/reportbug/ReportBugViewModel.kt L138- mapOf( L139- "type" to s.type.name.lowercase(), L140- "app_version" to s.appVersion, L141- "android_version" to s.androidVersion, L142- "locale" to s.locale, L143- "device_model" to s.deviceModel, L144- "vault_configured" to s.vaultConfigured.toString(), L145- ) L146- L147- val submissionTags = if (s.includeDeviceInfo) tags else emptyMap() L148- L149- withContext(Dispatchers.IO) { L150- if (sentryWrapper.isEnabled()) { L151- sentryWrapper.captureFeedback(comments, email, submissionTags) L152- } else { L153: sentryWrapper.lazyInitAndSendFeedback( L154- app, L155- BuildConfig.SENTRY_DSN, L156- if (BuildConfig.DEBUG) "debug" else "release", L157- "${BuildConfig.APPLICATION_ID}@${BuildConfig.VERSION_NAME}+${BuildConfig.VERSION_CODE}", L158- comments, L159- email, L160- submissionTags, L161- ) L162- } L163- } L164- L165- _state.update { it.copy(isSubmitting = false) } L166- _effects.send(ReportBugEffect.NavigateBack) L167- } catch ( L168- @Suppress("TooGenericExceptionCaught") e: Exception, --- File: util/SentryWrapper.kt L8- interface SentryWrapper { L9- fun isEnabled(): Boolean L10- L11- fun captureFeedback( L12- comments: String, L13- email: String?, L14- tags: Map, L15- ) L16- L17- /** L18- * Initializes Sentry for a one-shot, scoped submission when the user has globally disabled L19- * crash reporting. This bypasses the normal opt-in semantics because the user has explicitly L20- * requested to submit this specific piece of manual feedback. The Sentry instance is immediately L21- * closed after the submission to prevent background telemetry collection. L22- */ L23: fun lazyInitAndSendFeedback( L24- context: Context, L25- dsn: String, L26- environment: String, L27- release: String, L28- comments: String, L29- email: String?, L30- tags: Map, L31- ) L32- } L33- L34- class SentryWrapperImpl : SentryWrapper { L35- override fun isEnabled(): Boolean = Sentry.isEnabled() L36- L37- override fun captureFeedback( L38- comments: String, L42- Sentry.withScope { scope -> L43- tags.forEach { (key, value) -> L44- scope.setTag(key, value) L45- } L46- // Sentry's UserFeedback API requires an associated event ID to be processed correctly server-side. L47- val eventId = Sentry.captureMessage("User Feedback") L48- val feedback = L49- UserFeedback(eventId).apply { L50- this.comments = comments L51- this.email = email L52- } L53- Sentry.captureUserFeedback(feedback) L54- } L55- } L56- L57: override fun lazyInitAndSendFeedback( L58- context: Context, L59- dsn: String, L60- environment: String, L61- release: String, L62- comments: String, L63- email: String?, L64- tags: Map, L65- ) { L66- SentryAndroid.init(context) { options -> L67- options.dsn = dsn L68- options.environment = environment L69- options.release = release L70- options.shutdownTimeoutMillis = SENTRY_SHUTDOWN_TIMEOUT_MS L71- } L72- captureFeedback(comments, email, tags) ---