Skip to content

chore: update and fix workmanager observer#3305

Open
jvh-aws wants to merge 9 commits intomainfrom
jv/fix-workmanager-observer
Open

chore: update and fix workmanager observer#3305
jvh-aws wants to merge 9 commits intomainfrom
jv/fix-workmanager-observer

Conversation

@jvh-aws
Copy link
Copy Markdown
Contributor

@jvh-aws jvh-aws commented Apr 25, 2026

  • PR title and description conform to Pull Request guidelines.

Issue #, if available:

Description of changes: Follow up for #3264

Bumps androidx-workmanager from 2.9.1 to 2.11.2 (from #3264) and fixes the resulting compile error in TransferWorkerObserver.

WorkManager 2.11 pulls in androidx.lifecycle 2.6+, which rewrote Observer in Kotlin. The onChanged parameter nullability now matches the generic type, so MutableList? no longer compiles against Observer<MutableList>.

Changed TransferWorkerObserver to implement Observer<List> with a non-null onChanged parameter.

See https://developer.android.com/jetpack/androidx/releases/lifecycle#version_26_2

The nullability of the onChanged method of a Observer created in Kotlin now matches the nullability of the generic type. If you want Observer.onChanged() to accept a nullable type, you must instantiate the Observer with a nullable type.

How did you test these changes?
(Please add a line here how the changes were tested)

Documentation update required?

  • No
  • Yes (Please include a PR link for the documentation update)

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Ensure commit message has the appropriate scope (e.g fix(storage): message, feat(auth): message, chore(all): message)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

dependabot Bot and others added 6 commits April 13, 2026 15:37
Bumps `androidx-workmanager` from 2.9.1 to 2.11.2.

Updates `androidx.work:work-runtime` from 2.9.1 to 2.11.2

Updates `androidx.work:work-testing` from 2.9.1 to 2.11.2

---
updated-dependencies:
- dependency-name: androidx.work:work-runtime
  dependency-version: 2.11.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.work:work-testing
  dependency-version: 2.11.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@jvh-aws jvh-aws requested a review from a team as a code owner April 25, 2026 08:06
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

❌ Patch coverage is 42.30769% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.91%. Comparing base (d6d9f52) to head (94d20d7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3305   +/-   ##
=======================================
  Coverage   55.91%   55.91%           
=======================================
  Files        1083     1083           
  Lines       31932    31926    -6     
  Branches     4760     4759    -1     
=======================================
- Hits        17854    17852    -2     
+ Misses      12222    12218    -4     
  Partials     1856     1856           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

}
if (TABLE_VERSION_10 in (oldVersion + 1)..newVersion) {
addVersion10Columns(database)
database.transaction {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

2 participants