From db20d04c4b628a76dfdf7ce5e715ec2cf13de79a Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 4 Nov 2023 19:41:00 -0400 Subject: [PATCH] No-op app update checks for Android < 8 This effectively makes it the last release for the older Android versions. --- .../eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt index aa9e3a615..3809fd6c5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt @@ -1,6 +1,7 @@ package eu.kanade.tachiyomi.data.updater import android.content.Context +import android.os.Build import eu.kanade.tachiyomi.BuildConfig import eu.kanade.tachiyomi.util.system.isInstalledFromFDroid import tachiyomi.core.util.lang.withIOContext @@ -12,6 +13,11 @@ class AppUpdateChecker { private val getApplicationRelease: GetApplicationRelease by injectLazy() suspend fun checkForUpdate(context: Context, forceCheck: Boolean = false): GetApplicationRelease.Result { + // Disabling app update checks for older Android versions that we're going to drop support for + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { + return GetApplicationRelease.Result.NoNewUpdate + } + return withIOContext { val result = getApplicationRelease.await( GetApplicationRelease.Arguments(