Fix occasional crash when mass installing/uninstalling extension using PackageManager
This commit is contained in:
@@ -14,6 +14,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fix app crashing when trying to add extension repo with existing signature ([@AntsyLich](https://github.com/AntsyLich))
|
- Fix app crashing when trying to add extension repo with existing signature ([@AntsyLich](https://github.com/AntsyLich))
|
||||||
- Potentially fix 'database is locked' crash ([@AntsyLich](https://github.com/AntsyLich))
|
- Potentially fix 'database is locked' crash ([@AntsyLich](https://github.com/AntsyLich))
|
||||||
|
- Fix occasional crash when mass installing/uninstalling extension using `PackageManager` ([@AntsyLich](https://github.com/AntsyLich))
|
||||||
|
|
||||||
## [v0.19.5] - 2026-03-20
|
## [v0.19.5] - 2026-03-20
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
+7
-2
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user