Skip to content

fix: [SDK-4841] prewarm dispatchers at process start via ActivityLifecycleInitializer#2680

Merged
abdulraqeeb33 merged 3 commits into
mainfrom
ar/sdk-4841-100f
Jul 7, 2026
Merged

fix: [SDK-4841] prewarm dispatchers at process start via ActivityLifecycleInitializer#2680
abdulraqeeb33 merged 3 commits into
mainfrom
ar/sdk-4841-100f

Conversation

@abdulraqeeb33

Copy link
Copy Markdown
Contributor

Prewarms OneSignalDispatchers as the first step of ActivityLifecycleInitializer.create(), before activity lifecycle callbacks are registered, so the process-start lifecycle path gets the same dispatcher warmup head start as the other cold-start entry points.

Also updates the prewarm() KDoc entry-point table and adds focused unit coverage verifying the initializer calls prewarm() before lifecycle callback registration while stubbing the real warmup via IOMockHelper.

Verification note: attempted :OneSignal:core:testOriginalDebugUnitTest --tests 'com.onesignal.core.internal.application.impl.ActivityLifecycleInitializerTests' and :OneSignal:core:detekt, but this sandbox has no java on PATH and JAVA_HOME is unset.

Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
@abdulraqeeb33 abdulraqeeb33 changed the title Prewarm dispatchers during lifecycle startup fix: [SDK-4841] prewarm dispatchers at process start via ActivityLifecycleInitializer Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📊 Diff Coverage Report

Diff Coverage Report (Changed Lines Only)

Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff).

Changed Files Coverage

  • ActivityLifecycleInitializer.kt: 1/1 touched executable lines (100.0%) (4 touched lines in diff)

Overall (aggregate gate)

1/1 touched executable lines covered (100.0% — requires ≥ 80%)

📥 View workflow run

@abdulraqeeb33 abdulraqeeb33 requested a review from a team July 6, 2026 15:00
@abdulraqeeb33 abdulraqeeb33 marked this pull request as ready for review July 6, 2026 15:00

@fadi-george fadi-george left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good.

@nan-li

nan-li commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Verification note: attempted :OneSignal:core:testOriginalDebugUnitTest --tests 'com.onesignal.core.internal.application.impl.ActivityLifecycleInitializerTests' and :OneSignal:core:detekt, but this sandbox has no java on PATH and JAVA_HOME is unset.

?

@abdulraqeeb33

Copy link
Copy Markdown
Contributor Author

Verification note: attempted :OneSignal:core:testOriginalDebugUnitTest --tests 'com.onesignal.core.internal.application.impl.ActivityLifecycleInitializerTests' and :OneSignal:core:detekt, but this sandbox has no java on PATH and JAVA_HOME is unset.

?

Tests seem to run fine on CI. I created this PR on the cloud and it doesn't have JAVA in there.

@abdulraqeeb33 abdulraqeeb33 merged commit 4d41d25 into main Jul 7, 2026
5 checks passed
@abdulraqeeb33 abdulraqeeb33 deleted the ar/sdk-4841-100f branch July 7, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants