diff --git a/README.md b/README.md index 7d308e394..bc8d6d899 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Ackpine depends on Jetpack libraries, so it's necessary to declare the `google() ```kotlin dependencies { - val ackpineVersion = "0.5.4" + val ackpineVersion = "0.5.5" implementation("ru.solrudev.ackpine:ackpine-core:$ackpineVersion") // optional - Kotlin extensions and Coroutines support diff --git a/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/session/SessionBasedInstallSession.kt b/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/session/SessionBasedInstallSession.kt index 68e7493e3..084bf80d8 100644 --- a/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/session/SessionBasedInstallSession.kt +++ b/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/session/SessionBasedInstallSession.kt @@ -91,6 +91,17 @@ internal class SessionBasedInstallSession internal constructor( private var sessionCallback: PackageInstaller.SessionCallback? = null init { + initialize(initialState, initialProgress, serialExecutor) + } + + private fun initialize( + initialState: Session.State, + initialProgress: Progress, + serialExecutor: Executor + ) { + if (initialState.isTerminal) { + return + } if (initialProgress.progress >= 81) { // means that actual installation is ongoing or is completed notifyCommitted() // block clients from committing } diff --git a/docs/changelog.md b/docs/changelog.md index 809128902..a9b2e8fc6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,13 @@ Change Log ========== +Version 0.5.5 (2024-04-29) +-------------------------- + +### Bug fixes and improvements + +- Fix some internal state of `SESSION_BASED` package installer session when it's in terminal state and is being initialized on retrieval from `PackageInstaller`. + Version 0.5.4 (2024-04-26) -------------------------- diff --git a/docs/index.md b/docs/index.md index 22a95c58b..d8a8c29f3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -27,7 +27,7 @@ Ackpine depends on Jetpack libraries, so it's necessary to declare the `google() ```kotlin dependencies { - val ackpineVersion = "0.5.4" + val ackpineVersion = "0.5.5" implementation("ru.solrudev.ackpine:ackpine-core:$ackpineVersion") // optional - Kotlin extensions and Coroutines support diff --git a/version.properties b/version.properties index 42db3117c..8a0416094 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ MAJOR_VERSION=0 MINOR_VERSION=5 -PATCH_VERSION=4 +PATCH_VERSION=5 SUFFIX= SNAPSHOT=false \ No newline at end of file