summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2022-06-23 10:57:45 +0200
committerAlbin <albin@mullvad.net>2022-06-27 17:21:36 +0200
commit3d49685ca6d6fc51f77dfbf1462db2ef1267af2b (patch)
tree8ed8ad884e74af480c772f052fca359652882a08 /android/src
parent467cfab4dbf4d1cfe79f00718fe7129f9e1b3f8b (diff)
downloadmullvadvpn-3d49685ca6d6fc51f77dfbf1462db2ef1267af2b.tar.xz
mullvadvpn-3d49685ca6d6fc51f77dfbf1462db2ef1267af2b.zip
Promote service to fg when actions provided
As of Android 8 (API level 26), the system has a strict timer where the service must run `startForeground` within seconds after being started as foreground (`startForegroundService`). To mitigate cases where the service has been too slow to reach the target state, for instance when the tile service starts the vpn service as foreground with the connect action, this change aims to always promote the service to foreground when connect/disconnect actions are provided. This solution relies on the service demoting itself to from foreground in cases where it shouldn't run as foreground.
Diffstat (limited to 'android/src')
0 files changed, 0 insertions, 0 deletions