diff options
Diffstat (limited to 'ui/src/main/java/com')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt b/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt index 214947d4..0ece6f4b 100644 --- a/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt +++ b/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt @@ -83,6 +83,15 @@ class SettingsActivity : ThemeChangeAwareActivity() { moduleInstaller?.isVisible = false if (ModuleLoader.isModuleLoaded()) { moduleInstaller?.parent?.removePreference(moduleInstaller) + lifecycleScope.launch { + if (Application.getBackend() !is WgQuickBackend) { + try { + withContext(Dispatchers.IO) { Application.getRootShell().start() } + } catch (_: Throwable) { + kernelModuleDisabler?.parent?.removePreference(kernelModuleDisabler) + } + } + } } else { kernelModuleDisabler?.parent?.removePreference(kernelModuleDisabler) lifecycleScope.launch { |