Merge tag 'v0.19.7'

This commit is contained in:
AntsyLich
2026-03-25 23:58:00 +06:00
8 changed files with 58 additions and 27 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ body:
required: true required: true
- label: I have written a short but informative title. - label: I have written a short but informative title.
required: true required: true
- label: I have updated the app to version **[0.19.5](https://github.com/mihonapp/mihon/releases/latest)**. - label: I have updated the app to version **[0.19.7](https://github.com/mihonapp/mihon/releases/latest)**.
required: true required: true
- label: I will fill out all of the requested information in this form. - label: I will fill out all of the requested information in this form.
required: true required: true
+2 -2
View File
@@ -52,7 +52,7 @@ body:
label: Mihon version label: Mihon version
description: You can find your Mihon version in **More → About**. description: You can find your Mihon version in **More → About**.
placeholder: | placeholder: |
Example: "0.19.5" Example: "0.19.7"
validations: validations:
required: true required: true
@@ -95,7 +95,7 @@ body:
required: true required: true
- label: I have gone through the [FAQ](https://mihon.app/docs/faq/general) and [troubleshooting guide](https://mihon.app/docs/guides/troubleshooting/). - label: I have gone through the [FAQ](https://mihon.app/docs/faq/general) and [troubleshooting guide](https://mihon.app/docs/guides/troubleshooting/).
required: true required: true
- label: I have updated the app to version **[0.19.5](https://github.com/mihonapp/mihon/releases/latest)**. - label: I have updated the app to version **[0.19.7](https://github.com/mihonapp/mihon/releases/latest)**.
required: true required: true
- label: I have filled out all of the requested information in this form, including specific version numbers. - label: I have filled out all of the requested information in this form, including specific version numbers.
required: true required: true
+14 -2
View File
@@ -12,6 +12,16 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
## [Unreleased] ## [Unreleased]
## [v0.19.7] - 2026-03-23
Same as v0.19.6
## [v0.19.6] - 2026-03-23
### Fixed
- Fix app crashing when trying to add extension repo with existing signature ([@AntsyLich](https://github.com/AntsyLich)) ([`cb0e329`](https://github.com/mihonapp/mihon/commit/cb0e329))
- Potentially fix 'database is locked' crash ([@AntsyLich](https://github.com/AntsyLich)) ([`f8e82b9`](https://github.com/mihonapp/mihon/commit/f8e82b9))
- Fix occasional crash when mass installing/uninstalling extension using `PackageManager` ([@AntsyLich](https://github.com/AntsyLich)) ([`42daa3f`](https://github.com/mihonapp/mihon/commit/42daa3f))
- Fix app crash on startup on some Android TV ([@AntsyLich](https://github.com/AntsyLich)) ([`b40f1d3`](https://github.com/mihonapp/mihon/commit/b40f1d3))
## [v0.19.5] - 2026-03-20 ## [v0.19.5] - 2026-03-20
### Changed ### Changed
- Retry in reader now redownloads image ([@AntsyLich](https://github.com/AntsyLich)) ([#3089](https://github.com/mihonapp/mihon/pull/3089)) - Retry in reader now redownloads image ([@AntsyLich](https://github.com/AntsyLich)) ([#3089](https://github.com/mihonapp/mihon/pull/3089))
@@ -495,8 +505,10 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- Branding to Mihon ([@AntsyLich](https://github.com/AntsyLich)) - Branding to Mihon ([@AntsyLich](https://github.com/AntsyLich))
- Minimum supported Android version to 8 ([@AntsyLich](https://github.com/AntsyLich)) ([`dfb3091`](https://github.com/mihonapp/mihon/commit/dfb3091e380dda3e9bfb64bf5c9a685cf3a03d0e)) - Minimum supported Android version to 8 ([@AntsyLich](https://github.com/AntsyLich)) ([`dfb3091`](https://github.com/mihonapp/mihon/commit/dfb3091e380dda3e9bfb64bf5c9a685cf3a03d0e))
[unreleased]: https://github.com/mihonapp/mihon/compare/v0.19.5...main [unreleased]: https://github.com/mihonapp/mihon/compare/v0.19.7...main
[v0.19.4]: https://github.com/mihonapp/mihon/compare/v0.19.4...v0.19.5 [v0.19.7]: https://github.com/mihonapp/mihon/compare/v0.19.6...v0.19.7
[v0.19.6]: https://github.com/mihonapp/mihon/compare/v0.19.5...v0.19.6
[v0.19.5]: https://github.com/mihonapp/mihon/compare/v0.19.4...v0.19.5
[v0.19.4]: https://github.com/mihonapp/mihon/compare/v0.19.3...v0.19.4 [v0.19.4]: https://github.com/mihonapp/mihon/compare/v0.19.3...v0.19.4
[v0.19.3]: https://github.com/mihonapp/mihon/compare/v0.19.2...v0.19.3 [v0.19.3]: https://github.com/mihonapp/mihon/compare/v0.19.2...v0.19.3
[v0.19.2]: https://github.com/mihonapp/mihon/compare/v0.19.1...v0.19.2 [v0.19.2]: https://github.com/mihonapp/mihon/compare/v0.19.1...v0.19.2
+2 -2
View File
@@ -26,8 +26,8 @@ android {
defaultConfig { defaultConfig {
applicationId = "app.mihon" applicationId = "app.mihon"
versionCode = 19 versionCode = 20
versionName = "0.19.5" versionName = "0.19.7"
buildConfigField("String", "COMMIT_COUNT", "\"${getLatestCommitCount()}\"") buildConfigField("String", "COMMIT_COUNT", "\"${getLatestCommitCount()}\"")
buildConfigField("String", "COMMIT_SHA", "\"${getLatestCommitSha()}\"") buildConfigField("String", "COMMIT_SHA", "\"${getLatestCommitSha()}\"")
@@ -43,21 +43,31 @@ import uy.kohesive.injekt.api.InjektRegistrar
import uy.kohesive.injekt.api.addSingleton import uy.kohesive.injekt.api.addSingleton
import uy.kohesive.injekt.api.addSingletonFactory import uy.kohesive.injekt.api.addSingletonFactory
import uy.kohesive.injekt.api.get import uy.kohesive.injekt.api.get
import java.lang.ref.WeakReference
private val lock = Any()
class AppModule(val app: Application) : InjektModule { class AppModule(val app: Application) : InjektModule {
private var sqlDriverRef: WeakReference<SqlDriver>? = null
override fun InjektRegistrar.registerInjectables() { override fun InjektRegistrar.registerInjectables() {
addSingleton(app) addSingleton(app)
addSingletonFactory<SqlDriver> { addSingletonFactory<SqlDriver> {
AndroidxSqliteDriver( synchronized(lock) {
driver = BundledSQLiteDriver(), sqlDriverRef?.get()?.let { return@synchronized it }
databaseType = AndroidxSqliteDatabaseType.FileProvider(app, "tachiyomi.db"),
schema = Database.Schema, AndroidxSqliteDriver(
configuration = AndroidxSqliteConfiguration( driver = BundledSQLiteDriver(),
isForeignKeyConstraintsEnabled = true, databaseType = AndroidxSqliteDatabaseType.FileProvider(app, "tachiyomi.db"),
), schema = Database.Schema,
) configuration = AndroidxSqliteConfiguration(
isForeignKeyConstraintsEnabled = true,
),
)
.also { sqlDriverRef = WeakReference(it) }
}
} }
addSingletonFactory { addSingletonFactory {
Database( Database(
@@ -106,8 +106,13 @@ class PackageInstallerInstaller(private val service: Service) : Installer(servic
override fun cancelEntry(entry: Entry): Boolean { override fun cancelEntry(entry: Entry): Boolean {
activeSession?.let { (activeEntry, sessionId) -> activeSession?.let { (activeEntry, sessionId) ->
if (activeEntry == entry) { if (activeEntry == entry) {
packageInstaller.abandonSession(sessionId) return try {
return false packageInstaller.abandonSession(sessionId)
false
} catch (_: SecurityException) {
// Highly likely the session has succeeded
true
}
} }
} }
return true return true
@@ -13,6 +13,7 @@ import kotlin.coroutines.resume
object WebViewUtil { object WebViewUtil {
private const val CHROME_PACKAGE = "com.android.chrome" private const val CHROME_PACKAGE = "com.android.chrome"
private const val YOUTUBE_FOR_TV_PACKAGE = "com.google.android.youtube.tv"
private const val SYSTEM_SETTINGS_PACKAGE = "com.android.settings" private const val SYSTEM_SETTINGS_PACKAGE = "com.android.settings"
const val MINIMUM_WEBVIEW_VERSION = 118 const val MINIMUM_WEBVIEW_VERSION = 118
@@ -56,13 +57,16 @@ object WebViewUtil {
} }
fun spoofedPackageName(context: Context): String { fun spoofedPackageName(context: Context): String {
return try { return runCatching { context.packageManager.getPackageInfo(CHROME_PACKAGE, 0) }
context.packageManager.getPackageInfo(CHROME_PACKAGE, PackageManager.GET_META_DATA) .recoverCatching { context.packageManager.getPackageInfo(SYSTEM_SETTINGS_PACKAGE, 0) }
.recoverCatching { context.packageManager.getPackageInfo(YOUTUBE_FOR_TV_PACKAGE, 0) }
CHROME_PACKAGE .fold(
} catch (_: PackageManager.NameNotFoundException) { onSuccess = { it.packageName },
SYSTEM_SETTINGS_PACKAGE onFailure = {
} context.packageManager.getInstalledPackages(0)
.random().packageName
},
)
} }
} }
@@ -1,6 +1,6 @@
package mihon.data.repository package mihon.data.repository
import android.database.sqlite.SQLiteException import android.database.SQLException
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.map
import mihon.domain.extensionrepo.exception.SaveExtensionRepoException import mihon.domain.extensionrepo.exception.SaveExtensionRepoException
@@ -42,7 +42,7 @@ class ExtensionRepoRepositoryImpl(
) { ) {
try { try {
handler.await { extension_reposQueries.insert(baseUrl, name, shortName, website, signingKeyFingerprint) } handler.await { extension_reposQueries.insert(baseUrl, name, shortName, website, signingKeyFingerprint) }
} catch (ex: SQLiteException) { } catch (ex: SQLException) {
throw SaveExtensionRepoException(ex) throw SaveExtensionRepoException(ex)
} }
} }
@@ -56,7 +56,7 @@ class ExtensionRepoRepositoryImpl(
) { ) {
try { try {
handler.await { extension_reposQueries.upsert(baseUrl, name, shortName, website, signingKeyFingerprint) } handler.await { extension_reposQueries.upsert(baseUrl, name, shortName, website, signingKeyFingerprint) }
} catch (ex: SQLiteException) { } catch (ex: SQLException) {
throw SaveExtensionRepoException(ex) throw SaveExtensionRepoException(ex)
} }
} }