Fix showing background sync check starting Android 15 (not above 15)
Change-Id: Id3b761ddfd608e0fa715221e8e37e68f6a0432c2
This commit is contained in:
parent
918ba1ed7a
commit
279676716f
@ -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.
|
// 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
|
// Complain first time when starting the app after initial sync is done
|
||||||
if (status !is SyncRequestState.InitialSyncRequestState) {
|
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
|
hasComplainedAboutBackgroundSync = true
|
||||||
promptNeedsPushEvent()
|
promptNeedsPushEvent()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ class VectorSettingsNotificationFragment :
|
|||||||
|
|
||||||
// SC addition
|
// SC addition
|
||||||
findPreference<Preference>("SC_SETTINGS_PROMPT_UNIFIED_PUSH_TITLE")?.let {
|
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 {
|
it.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||||
startActivity(Intent(Intent.ACTION_VIEW, "https://unifiedpush.org/".toUri()))
|
startActivity(Intent(Intent.ACTION_VIEW, "https://unifiedpush.org/".toUri()))
|
||||||
true
|
true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user