mirror of
https://github.com/breezy-weather/breezy-weather.git
synced 2025-10-18 23:43:40 +00:00
Deprecate support for Android 5.0/5.1
This commit is contained in:
parent
61a41a4020
commit
f1b3d7aa2c
5 changed files with 19 additions and 8 deletions
|
@ -23,7 +23,7 @@ android {
|
|||
defaultConfig {
|
||||
applicationId = "org.breezyweather"
|
||||
versionCode = 60012
|
||||
versionName = "6.0.12-rc"
|
||||
versionName = "6.0.12"
|
||||
|
||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.breezyweather.background.updater
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import org.breezyweather.BuildConfig
|
||||
import org.breezyweather.background.updater.interactor.GetApplicationRelease
|
||||
import org.breezyweather.common.extensions.withIOContext
|
||||
|
@ -37,9 +38,10 @@ class AppUpdateChecker @Inject constructor(
|
|||
forceCheck: Boolean = false,
|
||||
): GetApplicationRelease.Result {
|
||||
// Disable app update checks for older Android versions that we're going to drop support for
|
||||
// if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
// return GetApplicationRelease.Result.OsTooOld
|
||||
// }
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
AppUpdateNotifier(context).promptOldAndroidVersion()
|
||||
return GetApplicationRelease.Result.OsTooOld
|
||||
}
|
||||
|
||||
return withIOContext {
|
||||
val result = getApplicationRelease.await(
|
||||
|
|
|
@ -48,6 +48,15 @@ internal class AppUpdateNotifier(
|
|||
NotificationReceiver.dismissNotification(context, Notifications.ID_APP_UPDATER)
|
||||
}
|
||||
|
||||
fun promptOldAndroidVersion() {
|
||||
with(notificationBuilder) {
|
||||
setContentTitle(context.getString(R.string.about_update_check_eol))
|
||||
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
||||
clearActions()
|
||||
}
|
||||
notificationBuilder.show()
|
||||
}
|
||||
|
||||
@SuppressLint("LaunchActivityFromNotification")
|
||||
fun promptUpdate(release: Release) {
|
||||
/*val updateIntent = NotificationReceiver.downloadAppUpdatePendingBroadcast(
|
||||
|
|
|
@ -128,10 +128,10 @@ class WeatherUpdateJob @AssistedInject constructor(
|
|||
}
|
||||
} finally {
|
||||
notifier.cancelProgressNotification()
|
||||
/*if ((BuildConfig.FLAVOR != "freenet" && SettingsManager.getInstance(context).isAppUpdateCheckEnabled) ||
|
||||
// if (BuildConfig.FLAVOR != "freenet" && SettingsManager.getInstance(context).isAppUpdateCheckEnabled) {
|
||||
if ((BuildConfig.FLAVOR != "freenet" && SettingsManager.getInstance(context).isAppUpdateCheckEnabled) ||
|
||||
Build.VERSION.SDK_INT < Build.VERSION_CODES.M
|
||||
) {*/
|
||||
if (BuildConfig.FLAVOR != "freenet" && SettingsManager.getInstance(context).isAppUpdateCheckEnabled) {
|
||||
) {
|
||||
try {
|
||||
updateChecker.checkForUpdate(context, forceCheck = false)
|
||||
} catch (e: Exception) {
|
||||
|
|
|
@ -36,7 +36,7 @@ You can omit any of the following properties to let the user configure their own
|
|||
4) Update versionCode and versionName in `app/build.gradle`.
|
||||
5) Write changelog in `CHANGELOG.md`.
|
||||
6) Commit all changes.
|
||||
7) Tag version beginning with a `v` (example: `git tag v6.0.12-rc -m "Version 6.0.12"`).
|
||||
7) Tag version beginning with a `v` (example: `git tag v6.0.12 -m "Version 6.0.12"`).
|
||||
8) Push with `git push --tags`
|
||||
9) GitHub action will run and sign the release.
|
||||
10) Update GitHub release notes draft and publish.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue