summaryrefslogtreecommitdiffhomepage
path: root/android/app/src/main/AndroidManifest.xml
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2022-01-19 16:10:18 +0100
committerAlbin <albin@mullvad.net>2022-01-20 15:14:17 +0100
commit4daa49677fae05048a5863b34239d6865a33e32e (patch)
treeba318a6c40b7aa53d6e63c4b21a27bb18c7c8db4 /android/app/src/main/AndroidManifest.xml
parent19386d5a70c52618badfeb670c603bb708fab8c5 (diff)
downloadmullvadvpn-4daa49677fae05048a5863b34239d6865a33e32e.tar.xz
mullvadvpn-4daa49677fae05048a5863b34239d6865a33e32e.zip
Fix auto-connect on app removed from recent apps
By default in Android, a service will be automatically killed if it belongs to a task that was removed (i.e. from recent apps) without a chance to run any cleanup logic. In this case, the lack of cleanup would lead to a crash and auto-restart (triggered by the system) resulting in a auto-connect. To fix this, a graceful stop will be ran if the task is removed while the tunnel is disconnected (service not running as foreground). However if the tunnel is in other states than disconnected (service running as foreground), the service should continue to run as it's bound by the system.
Diffstat (limited to 'android/app/src/main/AndroidManifest.xml')
-rw-r--r--android/app/src/main/AndroidManifest.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index e309f71016..5216de46d2 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -51,7 +51,8 @@
</activity>
<service android:name="net.mullvad.mullvadvpn.service.MullvadVpnService"
android:permission="android.permission.BIND_VPN_SERVICE"
- android:process=":mullvadvpn_daemon">
+ android:process=":mullvadvpn_daemon"
+ android:stopWithTask="false">
<intent-filter>
<action android:name="android.net.VpnService" />
</intent-filter>