Re-organize application startup

This commit is contained in:
topjohnwu
2017-08-12 01:31:34 +08:00
parent 1b1394cf5d
commit ea884e7fa1
9 changed files with 47 additions and 53 deletions

View File

@@ -91,7 +91,7 @@ public class Shell {
public static Shell getShell(Context context) {
MagiskManager magiskManager = Utils.getMagiskManager(context);
if (!magiskManager.shell.isValid) {
if (magiskManager.shell == null || !magiskManager.shell.isValid) {
// Get new shell if needed
magiskManager.shell = getShell();
}