You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
manager: if susfs not supported then check if sus_su is available
This commit is contained in:
@@ -457,7 +457,6 @@ private fun InfoCard() {
|
||||
Spacer(Modifier.height(16.dp))
|
||||
val isSUS_SU = getSuSFSFeatures() == "CONFIG_KSU_SUSFS_SUS_SU"
|
||||
val suSFS = getSuSFS()
|
||||
|
||||
if (suSFS == "Supported") {
|
||||
val susSUMode = if (isSUS_SU) "| SuS SU mode: ${susfsSUS_SU_Mode()}" else ""
|
||||
InfoCardItem(
|
||||
|
||||
@@ -172,29 +172,32 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
||||
|
||||
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
|
||||
|
||||
val suSFS = getSuSFS()
|
||||
val isSUS_SU = getSuSFSFeatures()
|
||||
if (isSUS_SU == "CONFIG_KSU_SUSFS_SUS_SU") {
|
||||
var isEnabled by rememberSaveable {
|
||||
mutableStateOf(susfsSUS_SU_Mode() == "2")
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
isEnabled = susfsSUS_SU_Mode() == "2"
|
||||
}
|
||||
|
||||
SwitchItem(
|
||||
icon = Icons.Filled.VisibilityOff,
|
||||
title = stringResource(id = R.string.settings_susfs_toggle),
|
||||
summary = stringResource(id = R.string.settings_susfs_toggle_summary),
|
||||
checked = isEnabled
|
||||
) {
|
||||
if (it) {
|
||||
susfsSUS_SU_2()
|
||||
} else {
|
||||
susfsSUS_SU_0()
|
||||
if (suSFS == "Supported") {
|
||||
if (isSUS_SU == "CONFIG_KSU_SUSFS_SUS_SU") {
|
||||
var isEnabled by rememberSaveable {
|
||||
mutableStateOf(susfsSUS_SU_Mode() == "2")
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
isEnabled = susfsSUS_SU_Mode() == "2"
|
||||
}
|
||||
|
||||
SwitchItem(
|
||||
icon = Icons.Filled.VisibilityOff,
|
||||
title = stringResource(id = R.string.settings_susfs_toggle),
|
||||
summary = stringResource(id = R.string.settings_susfs_toggle_summary),
|
||||
checked = isEnabled
|
||||
) {
|
||||
if (it) {
|
||||
susfsSUS_SU_2()
|
||||
} else {
|
||||
susfsSUS_SU_0()
|
||||
}
|
||||
prefs.edit().putBoolean("enable_sus_su", it).apply()
|
||||
isEnabled = it
|
||||
}
|
||||
prefs.edit().putBoolean("enable_sus_su", it).apply()
|
||||
isEnabled = it
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user