moved su command execution out of if else scope

This commit is contained in:
X1nto 2021-01-19 00:29:16 +04:00
parent 56eec40dd3
commit e114116916
1 changed files with 1 additions and 2 deletions

View File

@ -193,13 +193,12 @@ object PackageHelper {
//moving apk to tmp folder in order to avoid permission denials
val command = Shell.su("pm install $newPath").exec()
Shell.su("rm $newPath").exec()
if (command.isSuccess) {
Shell.su("rm $newPath").exec()
return true
} else {
sendFailure(command.out, context)
sendCloseDialog(context)
Shell.su("rm $newPath").exec()
}
}