mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-21 02:20:12 +00:00
Both FocusModeForegroundService and TrackingForegroundService declare android:foregroundServiceType="specialUse" in the manifest. The 2-arg startForeground() overload already falls back to the manifest type on Android 14+, but passing the type explicitly via ServiceCompat is Google's documented best practice and removes OEM-dependent fallback ambiguity. Extract the Build-gated call into a Service.startForegroundSpecialUse extension in ForegroundServiceExt.kt so a future third FGS picks up the API-version gating automatically. Callers shrink to one-liners. |
||
|---|---|---|
| .. | ||
| androidTest/java/com/superproductivity/superproductivity | ||
| main | ||
| test/java/com/superproductivity/superproductivity | ||