Skip to content

[stable-25.0.x] fix(login): only expedite WorkManager requests on Android 12+ - #6631

Closed
backportbot[bot] wants to merge 1 commit into
stable-25.0.xfrom
backport/6620/stable-25.0.x
Closed

[stable-25.0.x] fix(login): only expedite WorkManager requests on Android 12+#6631
backportbot[bot] wants to merge 1 commit into
stable-25.0.xfrom
backport/6620/stable-25.0.x

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 3, 2026

Copy link
Copy Markdown

Backport of PR #6620

Expedited WorkRequests on API < 31 fall back to an implicit foreground
service, which requires the Worker to override getForegroundInfo().
None of our Workers do, so any expedited request crashed with
IllegalStateException on older Android versions. For CapabilitiesWorker
during login, that crash meant its completion event was never posted,
leaving the login spinner stuck forever.

Add setExpeditedIfSupported(), which only calls setExpedited() on
API 31+ (where expedited work runs via JobScheduler and doesn't need
getForegroundInfo()), and use it at all 21 call sites introduced by
39331e7.

Assisted-by: Claude Code:claude-sonnet-5

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@backportbot
backportbot Bot requested a review from mahibi September 3, 2026 08:21
@backportbot backportbot Bot added the 3. to review Waiting for reviews label Sep 3, 2026
@backportbot backportbot Bot added this to the 25.0.0 milestone Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/33732953112/artifacts/9885122114
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@mahibi mahibi closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant