mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Improve: Async Root Uninstall
This commit is contained in:
parent
298c39c99a
commit
53e9fe9155
@ -40,9 +40,7 @@ class RootInstaller(context: Context) : BaseInstaller(context) {
|
|||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
launch {
|
launch {
|
||||||
Shell.su(installCommand).submit {
|
Shell.su(installCommand).submit {
|
||||||
if (it.isSuccess) {
|
if (it.isSuccess) Shell.su(deleteCommand).submit()
|
||||||
Shell.su(deleteCommand).submit()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -53,7 +51,7 @@ class RootInstaller(context: Context) : BaseInstaller(context) {
|
|||||||
if (rootInstallerEnabled) {
|
if (rootInstallerEnabled) {
|
||||||
val uninstallCommand =
|
val uninstallCommand =
|
||||||
String.format(ROOT_UNINSTALL_PACKAGE, getCurrentUserState, packageName)
|
String.format(ROOT_UNINSTALL_PACKAGE, getCurrentUserState, packageName)
|
||||||
withContext(Dispatchers.IO) { launch { Shell.su(uninstallCommand).exec() } }
|
withContext(Dispatchers.IO) { launch { Shell.su(uninstallCommand).submit() } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user