Skip to content

K2GO-401 feat(settings): add a "Send crash reports" opt-in toggle - #572

Merged
luisguzman-adfa merged 2 commits into
mainfrom
feat/K2GO-401-crash-report-toggle
Sep 18, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
feat/K2GO-401-crash-report-toggle

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What:

  • A "Send crash reports" toggle in Settings > About, bound to CrashReportConsent.
  • The crash-report default is now build-configurable (BuildConfig.CRASH_REPORTS_DEFAULT_ON).

Why:
Crash reporting (Sentry to self-hosted GlitchTip) is FOSS. F-Droid requires such
telemetry to be user-controllable and OFF by default in that build. The toggle gives
the user control; the build flag lets the F-Droid recipe ship crash reporting OFF
while conventional builds keep it ON.

Behavior:

  • Conventional build: default ON (unchanged).
  • F-Droid build: the recipe sets CRASH_REPORTS_DEFAULT_ON to false, so crash reporting
    is OFF until the user opts in.
  • The toggle is a preference. DiskGuard honors it per capture immediately; the
    startup-gated Sentry init applies on the next launch. A mid-session Sentry re-init is
    avoided on purpose: it would disturb the uncaught-handler order IIABApplication sets
    at startup.
  • The toggle always shows, because Sentry is unconditional (unlike usage analytics,
    gated by ANALYTICS_ENABLED).

Verification:
Compiles green. Device-test of the toggle (show, flip, persist) is pending before merge.

Crash reports (Sentry -> self-hosted GlitchTip) were gated by CrashReportConsent
(default on) with no user control. Add a toggle in Settings > About, next to
"Share usage statistics", bound to CrashReportConsent. Sentry is FOSS and
unconditional, so the toggle always shows (unlike the analytics one, which is
gated by ANALYTICS_ENABLED). Pref-only: DiskGuard honors the flag per capture
(immediate); the startup-gated Sentry init applies the change on the next launch.
New string k2go_settings_crash_reports in all locales (machine-generated, pending
human review). Step toward F-Droid-friendly opt-in telemetry.
Read the unset crash-report opt-in default from BuildConfig.CRASH_REPORTS_DEFAULT_ON
instead of a hardcoded true. Conventional builds stay ON. The F-Droid recipe flips
this one value to false so that build ships crash reporting OFF by default, which
F-Droid requires for opt-in telemetry.
@luisguzman-adfa
luisguzman-adfa merged commit 46bf92d into main Sep 18, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-401-crash-report-toggle branch September 18, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant