From 95a0c82d2ee0b2a6ebcc03d346895743b8934c89 Mon Sep 17 00:00:00 2001 From: Ilya Fomichev Date: Thu, 19 Dec 2024 21:30:23 +0500 Subject: [PATCH 1/3] move canInstallPackages check lower to not complete session with failure in case of self-update --- .../activity/SessionBasedInstallConfirmationActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/activity/SessionBasedInstallConfirmationActivity.kt b/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/activity/SessionBasedInstallConfirmationActivity.kt index 37eded91..c7e22039 100644 --- a/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/activity/SessionBasedInstallConfirmationActivity.kt +++ b/ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/installer/activity/SessionBasedInstallConfirmationActivity.kt @@ -135,8 +135,6 @@ internal class SessionBasedInstallConfirmationActivity : InstallActivity(TAG, st when { // Confirmation is a preapproval on API >= 34. isPreapproval -> finish() - // User has cancelled install permission request or hasn't granted permission. - !canInstallPackages -> abortSession("Install permission denied") // User hasn't confirmed installation because confirmation activity didn't appear after permission request. isSessionStuck && isInstallPermissionStatusChanged && wasOnTopOnStart -> launchInstallActivity() // Session proceeded normally. @@ -145,6 +143,8 @@ internal class SessionBasedInstallConfirmationActivity : InstallActivity(TAG, st // gets updated almost like the installation was confirmed even though it wasn't and no result is received // from PackageInstallerStatusReceiver. isSessionAlive && !isSessionStuck -> finish() + // User has cancelled install permission request or hasn't granted permission. + !canInstallPackages -> abortSession("Install permission denied") // User has dismissed confirmation activity. isSessionAlive && isActivityCancelled -> abortSession() // There was some error while installing which is not handled in PackageInstallerStatusReceiver, From af0da5955c7737b5b6c0d8486310eee8827c51f2 Mon Sep 17 00:00:00 2001 From: Ilya Fomichev Date: Thu, 19 Dec 2024 21:31:13 +0500 Subject: [PATCH 2/3] increment version --- README.md | 2 +- docs/index.md | 2 +- version.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bdda64bf..056c0f8b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Ackpine depends on Jetpack libraries, so it's necessary to declare the `google() ```kotlin dependencies { - val ackpineVersion = "0.9.1" + val ackpineVersion = "0.9.2" implementation("ru.solrudev.ackpine:ackpine-core:$ackpineVersion") // optional - Kotlin extensions and Coroutines support diff --git a/docs/index.md b/docs/index.md index d9754700..be1d55a9 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.9.1" + val ackpineVersion = "0.9.2" implementation("ru.solrudev.ackpine:ackpine-core:$ackpineVersion") // optional - Kotlin extensions and Coroutines support diff --git a/version.properties b/version.properties index 3234e7cf..afffc4c5 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ MAJOR_VERSION=0 MINOR_VERSION=9 -PATCH_VERSION=1 +PATCH_VERSION=2 SUFFIX= SNAPSHOT=false \ No newline at end of file From b01b4a797c76e19b23d44d92c0517ecab209d13b Mon Sep 17 00:00:00 2001 From: Ilya Fomichev Date: Thu, 19 Dec 2024 21:35:18 +0500 Subject: [PATCH 3/3] add version 0.9.2 to changelog --- docs/changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 0bc21d9e..a557d029 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,13 @@ Change Log ========== +Version 0.9.2 (2024-12-19) +-------------------------- + +### Bug fixes and improvements + +- Fix `SESSION_BASED` installer session completing with "Install permission denied" failure when performing a self-update if install permission was not granted because it was unnecessary. + Version 0.9.1 (2024-12-14) --------------------------