You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add fallback for ForegroundServiceStartNotAllowedException in Android 31+ (#6808)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1202552961248957/task/1206535923706701?focus=true
### Description
Work around platform bug
([b/229000935](https://issuetracker.google.com/issues/229000935)) where
startForegroundService() for
VpnService can throw ForegroundServiceStartNotAllowedException when
called
from background. We now catch this and fall back to startService(),
which
is allowed for VPNs. Service still promotes itself to foreground as
usual.
### Steps to test this PR
Smoke test AppTP and VPN on off scenarios for Android on 31+ and below
31
Copy file name to clipboardExpand all lines: app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt
0 commit comments