diff options
| author | Albin <albin@mullvad.net> | 2022-06-23 10:57:45 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2022-06-27 17:21:36 +0200 |
| commit | 3d49685ca6d6fc51f77dfbf1462db2ef1267af2b (patch) | |
| tree | 8ed8ad884e74af480c772f052fca359652882a08 /android/src | |
| parent | 467cfab4dbf4d1cfe79f00718fe7129f9e1b3f8b (diff) | |
| download | mullvadvpn-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
