Skip to content

fix(work): gate FGS mediaProcessing type to API 35+ (Crashlytics 9663c743)#79

Merged
stozo04 merged 2 commits into
mainfrom
fix/crashlytics-9663c743-fgs-type-api-gating
Jun 22, 2026
Merged

fix(work): gate FGS mediaProcessing type to API 35+ (Crashlytics 9663c743)#79
stozo04 merged 2 commits into
mainfrom
fix/crashlytics-9663c743-fgs-type-api-gating

Conversation

@stozo04

@stozo04 stozo04 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes a 100%-repro fatal crash on every Loopify save on Android 14 (API 34) devices — Crashlytics 9663c743, Galaxy A55 / v1.0.23.

Root cause: BoomerangRenderNotifications passed FOREGROUND_SERVICE_TYPE_MEDIA_PROCESSING (8192) when SDK >= API 34, but that FGS type was added in API 35. Android 14 rejects it as an unknown type → InvalidForegroundServiceTypeException → fatal FGS crash.

Fix:

  • API 35+ → mediaProcessing (correct semantic type)
  • API 29–34 → dataSync (WorkManager-documented fallback for long-running export work)
  • Manifest declares both types + FOREGROUND_SERVICE_DATA_SYNC permission
  • SDK→type mapping unit-tested (JVM + Robolectric @Config(sdk=[34,35,36]))

Closes the production regression affecting all Android 14 users on v1.0.23.

Verification (DoD)

Gate Result
:app:assembleDebug + :app:assembleRelease ✅ BUILD SUCCESSFUL (exit 0)
:app:testDebugUnitTest ✅ 0 failures (includes new FGS + Robolectric OEM tests)
:app:lintDebug ✅ 0 new errors
API 34 emulator E2E (import → save → share → gallery) ✅ PASS — docs/e2e/2026-06-22_082330-api34-fgs-fix.md
Samsung RTL SM-S931B (API 35) full sweep + quality gate ✅ PASS — BoomerangRenderWorker SUCCESS, 0 FGS-type-unknown, SSIM 0.95+
connectedDebugAndroidTest ⚠️ Not run locally this session (CI will exercise)

E2E proof (API 34)

Share sheet after save

Gallery playback

Version

1.0.24 (versionCode 24) — included in this PR.

Release comfort

Yes — comfortable merging this fix. The root cause is unambiguous, the fallback type is documented by Google for WorkManager long-running workers, and we have automated tests plus real-device validation on both API 34 (emulator) and Samsung hardware (RTL).

Also in this PR (supporting, not user-facing)

  • Lesson 024 — FGS type constant API gating pattern
  • Robolectric wired for unit tests (DeviceMediaHints OEM identity tests)
  • Samsung RTL sweep scripts + OEM regression guide (prevents recurrence)
  • drive-flow.ps1 — Samsung photo picker skips "Done" step (RTL automation fix)

Test plan

  • CI green (unit + lint + instrumented)
  • On API 34 device/emulator: import clip → Save → confirm no crash, boomerang appears in gallery
  • On API 35+ device: same flow, confirm save still works with mediaProcessing type
  • Version bumped to 1.0.24
  • Ship to Play after merge

Made with Cursor

stozo04 and others added 2 commits June 22, 2026 09:06
…lback

Android 14 rejects FOREGROUND_SERVICE_TYPE_MEDIA_PROCESSING (8192) as an
unknown type, fatally crashing every Loopify save (Crashlytics 9663c743).
Fall back to dataSync on API 29–34, add regression tests, and OEM sweep
tooling to prevent recurrence.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ships the Android 14 FGS type fix (Crashlytics 9663c743) to production.

Co-authored-by: Cursor <cursoragent@cursor.com>
@stozo04 stozo04 merged commit 794f629 into main Jun 22, 2026
1 check passed
@stozo04 stozo04 deleted the fix/crashlytics-9663c743-fgs-type-api-gating branch June 22, 2026 14:48
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.

1 participant