Fix showing background sync check starting Android 15 (not above 15)

Change-Id: Id3b761ddfd608e0fa715221e8e37e68f6a0432c2
This commit is contained in:
SpiritCroc 2025-10-26 18:16:58 +01:00
parent 918ba1ed7a
commit 279676716f
2 changed files with 2 additions and 2 deletions

View File

@ -446,7 +446,7 @@ class HomeActivity :
// Android 15 is very strict with background sync service usage and likes to shoot us when we take too long, making the app crash.
// Complain first time when starting the app after initial sync is done
if (status !is SyncRequestState.InitialSyncRequestState) {
if (!hasComplainedAboutBackgroundSync && Build.VERSION.SDK_INT > 35 && buildMeta.flavorDescription == "FDroid" && vectorPreferences.isBackgroundSyncEnabled()) {
if (!hasComplainedAboutBackgroundSync && Build.VERSION.SDK_INT >= 35 && buildMeta.flavorDescription == "FDroid" && vectorPreferences.isBackgroundSyncEnabled()) {
hasComplainedAboutBackgroundSync = true
promptNeedsPushEvent()
}

View File

@ -153,7 +153,7 @@ class VectorSettingsNotificationFragment :
// SC addition
findPreference<Preference>("SC_SETTINGS_PROMPT_UNIFIED_PUSH_TITLE")?.let {
it.isVisible = Build.VERSION.SDK_INT > 35 && buildMeta.flavorDescription == "FDroid"
it.isVisible = Build.VERSION.SDK_INT >= 35 && buildMeta.flavorDescription == "FDroid"
it.onPreferenceClickListener = Preference.OnPreferenceClickListener {
startActivity(Intent(Intent.ACTION_VIEW, "https://unifiedpush.org/".toUri()))
true