From 1bb8a10633e4b085e4ba24fcdb5fe393e4c2d4a0 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 26 May 2022 05:44:27 +0530 Subject: [PATCH] ui: remove unnecessary boolean check This check was added in 3c31c340d86f when the kernel module loader was introduced into the app lifecycle, to avoid attempting to start a root shell twice. When the module loader was removed in a03ad51622d338d1c, this flag was accidentally left in when it should have been deleted. Signed-off-by: Harsh Shandilya --- ui/src/main/java/com/wireguard/android/Application.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/src/main/java/com/wireguard/android/Application.kt b/ui/src/main/java/com/wireguard/android/Application.kt index d9dcb637..f26ca926 100644 --- a/ui/src/main/java/com/wireguard/android/Application.kt +++ b/ui/src/main/java/com/wireguard/android/Application.kt @@ -64,11 +64,9 @@ class Application : android.app.Application() { private suspend fun determineBackend(): Backend { var backend: Backend? = null - var didStartRootShell = false if (UserKnobs.enableKernelModule.first() && WgQuickBackend.hasKernelSupport()) { try { - if (!didStartRootShell) - rootShell.start() + rootShell.start() val wgQuickBackend = WgQuickBackend(applicationContext, rootShell, toolsInstaller) wgQuickBackend.setMultipleTunnels(UserKnobs.multipleTunnels.first()) backend = wgQuickBackend