fix kernel mode switch not work (#196)

This commit is contained in:
maskedeken 2024-05-09 05:25:28 +08:00 committed by GitHub
parent 04f22cb92d
commit 632da245ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -182,8 +182,12 @@ constructor(
try {
rootShell.start()
Timber.i("Root shell accepted!")
saveKernelMode(on = true)
saveAmneziaMode(false)
saveSettings(
uiState.value.settings.copy(
isKernelEnabled = true,
isAmneziaEnabled = false,
),
)
} catch (e: RootShell.RootShellException) {
Timber.e(e)