Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions controller/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ android {
// Analytics is a per-flavor property (see productFlavors): the "standard" flavor turns it on
// when google-services.json is present; "fdroid" forces it off. The safe default here is OFF.
buildConfigField "boolean", "ANALYTICS_ENABLED", "false"
// Default state of the crash-report opt-in (K2GO-401). True for conventional builds. The
// F-Droid recipe overrides this to false so that build ships crash reporting OFF by default.
buildConfigField "boolean", "CRASH_REPORTS_DEFAULT_ON", "true"
// K2GO-403: the in-app OTA self-updater. On for conventional builds; the fdroid flavor forces it
// off (F-Droid forbids an app that downloads and installs its own APK; the store updates it).
buildConfigField "boolean", "OTA_ENABLED", "true"
Expand Down Expand Up @@ -126,7 +123,7 @@ android {
isDefault = true
buildConfigField "boolean", "ANALYTICS_ENABLED", "${hasGoogleServices}"
}
// Google Play build (K2GO-398). Same as standard (Firebase OK, crash reporting default on) but
// Google Play build (K2GO-398). Same as standard (Firebase OK) but
// with the in-app OTA self-updater OFF: Google Play forbids an app updating itself outside Play,
// and Play delivers updates. REQUEST_INSTALL_PACKAGES (used only by the OTA updater) is removed in
// src/play/AndroidManifest.xml. applicationId is unchanged: this is the same app via the Play channel.
Expand All @@ -141,7 +138,6 @@ android {
fdroid {
dimension "distribution"
buildConfigField "boolean", "ANALYTICS_ENABLED", "false"
buildConfigField "boolean", "CRASH_REPORTS_DEFAULT_ON", "false"
// K2GO-403: no in-app OTA self-updater in the fdroid build (F-Droid forbids self-install).
buildConfigField "boolean", "OTA_ENABLED", "false"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void onCreate() {
}

// ADFA-4533: crash reporting to GlitchTip (Sentry SDK), gated by its OWN opt-in
// (CrashReportConsent, default ON) -- independent of usage-analytics consent, since error
// (CrashReportConsent, default OFF, K2GO-579) -- independent of usage-analytics consent, since error
// reports are operational, not behavioural telemetry, and carry no PII
// (io.sentry.send-default-pii=false). No-op unless a DSN was built in (empty DSN -> SDK
// stays inert); manifest sets io.sentry.auto-init=false, so this is the only init path.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

import android.content.Context;

import org.appdevforall.k2go.BuildConfig;

/**
* Opt-in flag for crash / error reporting (GlitchTip via the Sentry SDK). Separate from
* {@link AnalyticsConsent} on purpose: error reports are operational (not behavioural
* telemetry) and carry no PII, so they can follow a different policy. The unset default comes
* from {@code BuildConfig.CRASH_REPORTS_DEFAULT_ON}: true for conventional builds, false for the
* F-Droid build (K2GO-401), so that build ships crash reporting OFF by default.
* telemetry) and carry no PII, so they can follow a different policy. Off until the user turns it
* on, in every build (K2GO-579): "Keep offline" must mean no outbound connection.
*/
public final class CrashReportConsent {

Expand All @@ -21,7 +18,7 @@ private CrashReportConsent() {

public static boolean isEnabled(Context ctx) {
return ctx.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
.getBoolean(KEY, BuildConfig.CRASH_REPORTS_DEFAULT_ON);
.getBoolean(KEY, false);
}

public static void setEnabled(Context ctx, boolean enabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ private static File biggestLog(File dir) {

/**
* Report the event to developers, unattended. This is an OPERATIONAL diagnostic, not behavioural
* analytics, so it goes to GlitchTip via Sentry (CrashReportConsent, default on) -- NOT the
* analytics, so it goes to GlitchTip via Sentry (CrashReportConsent, default off) -- NOT the
* analytics backbone (opt-in, default off, which would silently drop it). A no-op when crash
* reporting is off or Sentry has no DSN. See IIABApplication (ADFA-4533) and ADR-386 section 7.
* The user-facing, user-sent report is a separate channel (the closing K2GO-386 ticket).
Expand Down
Loading