ui: remove unnecessary boolean check

This check was added in 3c31c340d8 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 a03ad51622, this flag
was accidentally left in when it should have been deleted.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2022-05-26 05:44:27 +05:30
parent f3230fc8f9
commit 1bb8a10633
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80
1 changed files with 1 additions and 3 deletions

View File

@ -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