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))
|
Spacer(Modifier.height(16.dp))
|
||||||
val isSUS_SU = getSuSFSFeatures() == "CONFIG_KSU_SUSFS_SUS_SU"
|
val isSUS_SU = getSuSFSFeatures() == "CONFIG_KSU_SUSFS_SUS_SU"
|
||||||
val suSFS = getSuSFS()
|
val suSFS = getSuSFS()
|
||||||
|
|
||||||
if (suSFS == "Supported") {
|
if (suSFS == "Supported") {
|
||||||
val susSUMode = if (isSUS_SU) "| SuS SU mode: ${susfsSUS_SU_Mode()}" else ""
|
val susSUMode = if (isSUS_SU) "| SuS SU mode: ${susfsSUS_SU_Mode()}" else ""
|
||||||
InfoCardItem(
|
InfoCardItem(
|
||||||
|
|||||||
@@ -172,29 +172,32 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
|||||||
|
|
||||||
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
|
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
|
||||||
|
|
||||||
|
val suSFS = getSuSFS()
|
||||||
val isSUS_SU = getSuSFSFeatures()
|
val isSUS_SU = getSuSFSFeatures()
|
||||||
if (isSUS_SU == "CONFIG_KSU_SUSFS_SUS_SU") {
|
if (suSFS == "Supported") {
|
||||||
var isEnabled by rememberSaveable {
|
if (isSUS_SU == "CONFIG_KSU_SUSFS_SUS_SU") {
|
||||||
mutableStateOf(susfsSUS_SU_Mode() == "2")
|
var isEnabled by rememberSaveable {
|
||||||
}
|
mutableStateOf(susfsSUS_SU_Mode() == "2")
|
||||||
|
}
|
||||||
LaunchedEffect(Unit) {
|
|
||||||
isEnabled = susfsSUS_SU_Mode() == "2"
|
LaunchedEffect(Unit) {
|
||||||
}
|
isEnabled = susfsSUS_SU_Mode() == "2"
|
||||||
|
}
|
||||||
SwitchItem(
|
|
||||||
icon = Icons.Filled.VisibilityOff,
|
SwitchItem(
|
||||||
title = stringResource(id = R.string.settings_susfs_toggle),
|
icon = Icons.Filled.VisibilityOff,
|
||||||
summary = stringResource(id = R.string.settings_susfs_toggle_summary),
|
title = stringResource(id = R.string.settings_susfs_toggle),
|
||||||
checked = isEnabled
|
summary = stringResource(id = R.string.settings_susfs_toggle_summary),
|
||||||
) {
|
checked = isEnabled
|
||||||
if (it) {
|
) {
|
||||||
susfsSUS_SU_2()
|
if (it) {
|
||||||
} else {
|
susfsSUS_SU_2()
|
||||||
susfsSUS_SU_0()
|
} 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