Skip to content

Commit 3f7ea7e

Browse files
authored
Merge pull request #147 from solrudev/develop
0.18.2
2 parents bb8b2ec + b2197e2 commit 3f7ea7e

9 files changed

Lines changed: 40 additions & 22 deletions

File tree

.github/actions/setup-gradle-environment-action/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ runs:
1717
cp .github/ci-gradle.properties ~/.gradle/gradle.properties
1818
1919
- name: Set up JDK
20-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
20+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
2121
with:
2222
distribution: adopt
2323
java-version: 21
2424

2525
- name: Setup Gradle
26-
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2
26+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
2727
with:
2828
cache-encryption-key: ${{ inputs.gradle-encryption-key }}
2929

3030
- name: Cache build logic
31-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
31+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # 4.3.0
3232
with:
3333
path: |
3434
build-logic/build

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
20+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
2121
with:
2222
persist-credentials: false
2323

@@ -56,7 +56,7 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
59+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
6060
with:
6161
persist-credentials: false
6262

@@ -86,7 +86,7 @@ jobs:
8686

8787
steps:
8888
- name: Checkout
89-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
89+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
9090
with:
9191
persist-credentials: false
9292
fetch-depth: 0
@@ -97,7 +97,7 @@ jobs:
9797
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
9898

9999
- name: Set up Python
100-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
100+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0
101101
with:
102102
python-version: 3.13.9
103103

@@ -112,7 +112,7 @@ jobs:
112112
113113
- name: Deploy docs
114114
if: success()
115-
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23
115+
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 # 4.7.4
116116
with:
117117
branch: gh-pages
118118
folder: site

.github/workflows/github-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
21+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
2222
with:
2323
persist-credentials: false
2424

.github/workflows/release-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717

1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
20+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
2121
with:
2222
ref: ${{ github.event.pull_request.merge_commit_sha }}
2323
fetch-depth: '0'
2424
persist-credentials: false
2525

2626
- name: Push tag
27-
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8
27+
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # 1.75.0
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.PAT_AUTOTAG }}
3030
CUSTOM_TAG: ${{ github.event.pull_request.title }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Ackpine depends on Jetpack libraries, so it's also necessary to add the `google(
3737

3838
```toml
3939
[versions]
40-
ackpine = "0.18.1"
40+
ackpine = "0.18.2"
4141

4242
[libraries]
4343
ackpine-core = { module = "ru.solrudev.ackpine:ackpine-core", version.ref = "ackpine" }
@@ -78,7 +78,7 @@ ackpine = [
7878

7979
```kotlin
8080
dependencies {
81-
val ackpineVersion = "0.18.1"
81+
val ackpineVersion = "0.18.2"
8282
implementation("ru.solrudev.ackpine:ackpine-core:$ackpineVersion")
8383

8484
// optional - Kotlin extensions and Coroutines support

ackpine-core/src/main/kotlin/ru/solrudev/ackpine/impl/uninstaller/activity/PackageInstallerBasedUninstallActivity.kt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ internal class PackageInstallerBasedUninstallActivity : UninstallActivity(
3434

3535
private val handler = Handler(Looper.getMainLooper())
3636

37+
private val abortedSessionRunnable = Runnable {
38+
val packageName = intent.getStringExtra(UninstallStatusReceiver.EXTRA_PACKAGE_NAME)
39+
?: error("PackageInstallerBasedUninstallActivity: packageName was null")
40+
if (isPackageInstalled(packageName)) {
41+
abortSession("Aborted by user")
42+
}
43+
}
44+
3745
override fun onCreate(savedInstanceState: Bundle?) {
3846
super.onCreate(savedInstanceState)
3947
if (savedInstanceState == null) {
@@ -44,12 +52,15 @@ internal class PackageInstallerBasedUninstallActivity : UninstallActivity(
4452
}
4553

4654
override fun onActivityResult(resultCode: Int) {
47-
val packageName = intent.getStringExtra(UninstallStatusReceiver.EXTRA_PACKAGE_NAME) ?: return
48-
handler.post {
49-
if (isPackageInstalled(packageName)) {
50-
abortSession("Aborted by user")
51-
finish()
52-
}
55+
// Wait for possible result from PackageInstallerStatusReceiver before completing with failure.
56+
setLoading(isLoading = true, delayMillis = 200)
57+
handler.postDelayed(abortedSessionRunnable, 400)
58+
}
59+
60+
override fun onDestroy() {
61+
super.onDestroy()
62+
if (isFinishing) {
63+
handler.removeCallbacks(abortedSessionRunnable)
5364
}
5465
}
5566
}

docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
==========
33

4+
Version 0.18.2 (2025-12-09)
5+
---------------------------
6+
7+
### Bug fixes and improvements
8+
9+
- Add a slight delay before aborting a `PackageInstaller`-based uninstall session if failure event from OS wasn't received.
10+
411
Version 0.18.1 (2025-12-04)
512
---------------------------
613

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Ackpine depends on Jetpack libraries, so it's also necessary to add the `google(
3131

3232
```toml
3333
[versions]
34-
ackpine = "0.18.1"
34+
ackpine = "0.18.2"
3535

3636
[libraries]
3737
ackpine-core = { module = "ru.solrudev.ackpine:ackpine-core", version.ref = "ackpine" }
@@ -70,7 +70,7 @@ Ackpine depends on Jetpack libraries, so it's also necessary to add the `google(
7070

7171
```kotlin
7272
dependencies {
73-
val ackpineVersion = "0.18.1"
73+
val ackpineVersion = "0.18.2"
7474
implementation("ru.solrudev.ackpine:ackpine-core:$ackpineVersion")
7575

7676
// optional - Kotlin extensions and Coroutines support

version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MAJOR_VERSION=0
22
MINOR_VERSION=18
3-
PATCH_VERSION=1
3+
PATCH_VERSION=2
44
SUFFIX=
55
SNAPSHOT=false

0 commit comments

Comments
 (0)