diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-03-11 22:58:25 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-03-23 19:14:16 +0000 |
| commit | 7f86ab20d991edcb7a4799cae0593bdaed7f976c (patch) | |
| tree | 513ed2a670bdb8e0d4dcdfd1e5a558212925ab0d /android/src/main | |
| parent | 767d30dd34769568a2a7216dd686cc3e5c8d70ad (diff) | |
| download | mullvadvpn-7f86ab20d991edcb7a4799cae0593bdaed7f976c.tar.xz mullvadvpn-7f86ab20d991edcb7a4799cae0593bdaed7f976c.zip | |
Allow the quick tile to start the service
Diffstat (limited to 'android/src/main')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt index e8eb8a3a82..296b324332 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt @@ -53,15 +53,15 @@ class MullvadTileService : TileService() { override fun onClick() { super.onClick() - val tunnelActionKey = if (secured) { - KEY_DISCONNECT_ACTION + val intent = Intent(this, MullvadVpnService::class.java) + + if (secured) { + intent.action = KEY_DISCONNECT_ACTION } else { - KEY_CONNECT_ACTION + intent.action = KEY_CONNECT_ACTION } - val intent = Intent(tunnelActionKey).setPackage("net.mullvad.mullvadvpn") - - sendBroadcast(intent) + startService(intent) } override fun onStopListening() { |
