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: fixed "static field FLAG_REDIRECT_STDERR: Int' is deprecated"
This commit is contained in:
@@ -7,15 +7,13 @@ import com.rifsxd.ksunext.R
|
||||
|
||||
@Composable
|
||||
fun getSELinuxStatus(): String {
|
||||
val shell = Shell.Builder.create()
|
||||
.setFlags(Shell.FLAG_REDIRECT_STDERR)
|
||||
.build("sh")
|
||||
|
||||
val shell = Shell.getShell() // Get the default shell instance
|
||||
val list = ArrayList<String>()
|
||||
val result = shell.use {
|
||||
it.newJob().add("getenforce").to(list, list).exec()
|
||||
}
|
||||
val output = result.out.joinToString("\n").trim()
|
||||
val result = shell.newJob()
|
||||
.add("getenforce")
|
||||
.to(list, list)
|
||||
.exec()
|
||||
val output = list.joinToString("\n").trim()
|
||||
|
||||
if (result.isSuccess) {
|
||||
return when (output) {
|
||||
|
||||
Reference in New Issue
Block a user