Small refinements and bugfixes

Close #109
This commit is contained in:
topjohnwu
2017-02-19 08:05:16 +08:00
parent 9bc410dd3d
commit 6785221479
23 changed files with 103 additions and 80 deletions

View File

@@ -15,10 +15,6 @@ import com.topjohnwu.magisk.asyncs.LoadRepos;
import com.topjohnwu.magisk.asyncs.MagiskHide;
import com.topjohnwu.magisk.components.Activity;
import com.topjohnwu.magisk.services.UpdateCheckService;
import com.topjohnwu.magisk.utils.Shell;
import com.topjohnwu.magisk.utils.Utils;
import java.util.List;
public class SplashActivity extends Activity{
@@ -34,10 +30,6 @@ public class SplashActivity extends Activity{
// Init the info and configs and root shell
magiskManager.init();
// Check MagiskHide status
List<String> ret = Shell.sh("getprop persist.magisk.hide");
boolean started = Utils.isValidShellResponse(ret) && Integer.parseInt(ret.get(0)) != 0;
// Initialize the update check service, notify every 3 hours
if (!"install".equals(getIntent().getStringExtra(MainActivity.SECTION))) {
ComponentName service = new ComponentName(magiskManager, UpdateCheckService.class);
@@ -53,7 +45,7 @@ public class SplashActivity extends Activity{
// Now fire all async tasks
new GetBootBlocks(this).exec();
if (magiskManager.magiskHide && !magiskManager.disabled &&
magiskManager.magiskVersion > 11 && !started) {
magiskManager.magiskVersion > 11 && !magiskManager.magiskHideStarted) {
new MagiskHide().enable();
}
new LoadModules(this) {