Only load modules and repos if Magisk is installed properly

This commit is contained in:
topjohnwu 2019-02-02 04:19:14 -05:00
parent bd3e0b9336
commit 6bbe0f07d4

View File

@ -37,12 +37,6 @@ public class SplashActivity extends BaseActivity {
} catch (PackageManager.NameNotFoundException ignored) {}
}
// Magisk working as expected
if (Shell.rootAccess() && Config.magiskVersionCode > 0) {
// Load modules
Utils.loadModules();
}
// Set default configs
Config.initialize();
@ -55,9 +49,13 @@ public class SplashActivity extends BaseActivity {
// Setup shortcuts
Shortcuts.setup(this);
if (Networking.checkNetworkStatus(this)) {
// Repo update check
new UpdateRepos().exec();
// Magisk working as expected
if (Shell.rootAccess() && Config.magiskVersionCode > 0) {
// Load modules
Utils.loadModules();
// Load repos
if (Networking.checkNetworkStatus(this))
new UpdateRepos().exec();
}
app.init = true;