Skip to content

fix(push): only expedite FCM NotificationWorker on Android 12+ - #6784

Merged
mahibi merged 1 commit into
masterfrom
runWorkersAsExpedited
Sep 29, 2026
Merged

mahibi merged 1 commit into
masterfrom
runWorkersAsExpedited

Conversation

@mahibi

@mahibi mahibi commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

fix #6738

Thank you @hamars

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi added this to the 25.1.0 milestone Sep 28, 2026
@mahibi mahibi self-assigned this Sep 28, 2026
@mahibi

mahibi commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-25.0.x

@mahibi mahibi added the 3. to review Waiting for reviews label Sep 28, 2026
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7cebe2bf-7bfe-4c21-8212-cb4ace5f095b

📥 Commits

Reviewing files that changed from the base of the PR and between 6f590d5 and c6c3f33.

📒 Files selected for processing (1)
  • app/src/gplay/java/com/nextcloud/talk/services/firebase/NCFirebaseMessagingService.kt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The Firebase messaging service now uses setExpeditedIfSupported() to configure notification work. The change removes the OutOfQuotaPolicy import and replaces the direct setExpedited() call with its fallback policy.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to c6c3f

The reported Huawei Android 10 case used the gplay build, and the change keeps its notification work non-expedited on older Android versions. No material merge blocker is evident.

Security Architecture Review

Security architecture risk: 🔵 Low · up to c6c3f

Notification work uses ordinary scheduling on older Android versions and retains expedited scheduling with a fallback on Android 12 and later. The push-data checks remain in place. No security issue introduced by this change was identified, though platform failure behavior was not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed scheduling affects notification work initiated by this Firebase service on devices running the app; it does not grant the helper access to push payloads or user credentials.

Trust Boundaries and Controls

  • inferred — The scheduling change does not bypass the worker’s existing encrypted-push signature check. Nonempty fields at the entrypoint are not themselves an authentication control.

Resilience and Maintainability Implications

  • inferred — Each accepted delivery still enqueues a separate request, with no changed deduplication or cleanup mechanism. Exact interruption and enqueue-failure outcomes remain unverified from repository source.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: limiting expedited FCM NotificationWorker execution to Android 12 and newer.
Description check ✅ Passed The description identifies the linked issue and includes the repository checklist and AI section. It omits the Screenshots and TODO sections, but these omissions are not critical for this code-only ch…
Linked Issues check ✅ Passed Issue #6738 requires Talk push notifications to arrive on affected older Android devices. The PR changes NCFirebaseMessagingService to call setExpeditedIfSupported(). The helper skips expedited wo…
Out of Scope Changes check ✅ Passed The whole-PR diff changes only the NotificationWorker request configuration in NCFirebaseMessagingService and its import. The change directly addresses the Android-version-specific push delivery p…
  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit c6c3f33
Version 6784
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings138139
Errors1812

SpotBugs

CategoryBaseNew
Bad practice77
Correctness1111
Dodgy code4543
Internationalization33
Malicious code vulnerability33
Performance87
Security117
Total8881

Lint increased!

@mahibi
mahibi merged commit 5c28bcb into master Sep 29, 2026
21 of 22 checks passed
@mahibi
mahibi deleted the runWorkersAsExpedited branch September 29, 2026 13:05
@mahibi

mahibi commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-25.0.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Push no longer Working for Talk since update to NC 35.0.0 worked with 34

2 participants