From f78754e26c6274f997bbfe0798f47aa86f8f8133 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 2 Nov 2026 13:31:30 +0100 Subject: build: drop the nonFree flavor, Sentry and Play Services The fork targets GrapheneOS and ships only FOSS builds. The nonFree flavor added Sentry crash reporting, wired to upstream's Sentry project, and Play Services SMS one-time-code autofill, which needs Google's servers. Neither is wanted, so remove the flavor dimension entirely: - Delete app/src/nonFree, the SentryPlugin, the sentry-stub module, the Sentry and Play Services catalog entries, and the Sentry scope setup in Application. - Move the free AutofillSmsActivity stub into main; it keeps the SMS OTP feature off exactly as the free build did. A ponytail note marks the FillOtpFromSms paths for later removal. - SlimTests no longer needs to skip a nonFree variant. - Workflows and docs use :app:assembleDebug / :app:assembleRelease. A bare assembleRelease would also verify library modules in release mode, where ui:compose fails on a pre-existing AppCompat attribute reference the old flavored task never touched. Co-Authored-By: Claude Opus 5.5 --- app/src/main/java/app/passwordstore/Application.kt | 11 --------- .../autofill/oreo/ui/AutofillSmsActivity.kt | 26 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 app/src/main/java/app/passwordstore/autofill/oreo/ui/AutofillSmsActivity.kt (limited to 'app/src/main') diff --git a/app/src/main/java/app/passwordstore/Application.kt b/app/src/main/java/app/passwordstore/Application.kt index 9bc4c83e..8eb421f4 100644 --- a/app/src/main/java/app/passwordstore/Application.kt +++ b/app/src/main/java/app/passwordstore/Application.kt @@ -17,7 +17,6 @@ import app.passwordstore.injection.context.FilesDirPath import app.passwordstore.injection.prefs.SettingsPreferences import app.passwordstore.util.coroutines.DispatcherProvider import app.passwordstore.util.extensions.getString -import app.passwordstore.util.features.Feature import app.passwordstore.util.features.Features import app.passwordstore.util.git.sshj.setUpBouncyCastleForSshj import app.passwordstore.util.proxy.ProxyUtils @@ -26,8 +25,6 @@ import app.passwordstore.util.settings.PreferenceKeys import app.passwordstore.util.settings.runMigrations import com.google.android.material.color.DynamicColors import dagger.hilt.android.HiltAndroidApp -import io.sentry.Sentry -import io.sentry.protocol.User import java.util.concurrent.Executors import javax.inject.Inject import logcat.AndroidLogcatLogger @@ -67,14 +64,6 @@ class Application : android.app.Application(), SharedPreferences.OnSharedPrefere runMigrations(filesDirPath, prefs, gitSettings) proxyUtils.setDefaultProxy() DynamicColors.applyToActivitiesIfAvailable(this) - Sentry.configureScope { scope -> - val user = User() - user.data = - Feature.entries.associate { feature -> - "features.${feature.configKey}" to features.isEnabled(feature).toString() - } - scope.user = user - } setupScreenOffHandler() } diff --git a/app/src/main/java/app/passwordstore/autofill/oreo/ui/AutofillSmsActivity.kt b/app/src/main/java/app/passwordstore/autofill/oreo/ui/AutofillSmsActivity.kt new file mode 100644 index 00000000..7acc72f9 --- /dev/null +++ b/app/src/main/java/app/passwordstore/autofill/oreo/ui/AutofillSmsActivity.kt @@ -0,0 +1,26 @@ +/* + * Copyright © 2014-2024 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ +package app.passwordstore.autofill.oreo.ui + +import android.content.Context +import android.content.IntentSender +import androidx.appcompat.app.AppCompatActivity + +// ponytail: filling OTPs from SMS needed Play Services (removed with the nonFree flavor), so +// this stub keeps the feature off. Delete it together with the FillOtpFromSms autofill paths. +@Suppress("UNUSED_PARAMETER") +class AutofillSmsActivity : AppCompatActivity() { + + companion object { + + fun shouldOfferFillFromSms(context: Context): Boolean { + return false + } + + fun makeFillOtpFromSmsIntentSender(context: Context): IntentSender { + throw NotImplementedError("Filling OTPs from SMS requires non-free dependencies") + } + } +} -- cgit v1.2.3