Commit 45765e29 authored by topjohnwu's avatar topjohnwu

Final fixes

parent 6e28a260
#!/system/bin/sh #!/system/bin/sh
[ -z $BOOTMODE ] && BOOTMODE=false
TMPDIR=/tmp TMPDIR=/tmp
($BOOTMODE) && TMPDIR=/dev/tmp ($BOOTMODE) && TMPDIR=/dev/tmp
......
...@@ -82,6 +82,9 @@ public class InstallFragment extends Fragment implements CallbackHandler.EventLi ...@@ -82,6 +82,9 @@ public class InstallFragment extends Fragment implements CallbackHandler.EventLi
.setNegativeButton(R.string.no_thanks, null) .setNegativeButton(R.string.no_thanks, null)
.show(); .show();
}); });
if (Global.Info.magiskVersion < 10.3) {
uninstallButton.setVisibility(View.GONE);
} else {
uninstallButton.setOnClickListener(vi -> { uninstallButton.setOnClickListener(vi -> {
Utils.getAlertDialogBuilder(getActivity()) Utils.getAlertDialogBuilder(getActivity())
.setTitle("Uninstall Magisk") .setTitle("Uninstall Magisk")
...@@ -120,6 +123,8 @@ public class InstallFragment extends Fragment implements CallbackHandler.EventLi ...@@ -120,6 +123,8 @@ public class InstallFragment extends Fragment implements CallbackHandler.EventLi
.setNegativeButton(R.string.no_thanks, null) .setNegativeButton(R.string.no_thanks, null)
.show(); .show();
}); });
}
if (Global.Events.blockDetectionDone.isTriggered) { if (Global.Events.blockDetectionDone.isTriggered) {
updateUI(); updateUI();
} }
......
...@@ -16,14 +16,9 @@ public class SplashActivity extends AppCompatActivity { ...@@ -16,14 +16,9 @@ public class SplashActivity extends AppCompatActivity {
// Init the info and configs and root shell // Init the info and configs and root shell
Global.init(getApplicationContext()); Global.init(getApplicationContext());
// Start MagiskHide if not started at boot
if (Global.Configs.magiskHide && !Global.Info.disabled && Global.Info.magiskVersion > 10.3)
new Async.MagiskHide().enable();
// Now fire all async tasks // Now fire all async tasks
new Async.LoadApps(getPackageManager()).exec();
new Async.GetBootBlocks().exec();
new Async.CheckUpdates().exec(); new Async.CheckUpdates().exec();
new Async.GetBootBlocks().exec();
new Async.LoadModules() { new Async.LoadModules() {
@Override @Override
protected void onPostExecute(Void v) { protected void onPostExecute(Void v) {
...@@ -31,6 +26,7 @@ public class SplashActivity extends AppCompatActivity { ...@@ -31,6 +26,7 @@ public class SplashActivity extends AppCompatActivity {
new Async.LoadRepos(getApplicationContext()).exec(); new Async.LoadRepos(getApplicationContext()).exec();
} }
}.exec(); }.exec();
new Async.LoadApps(getPackageManager()).exec();
// Preparation done, now start main activity // Preparation done, now start main activity
Intent intent = new Intent(getApplicationContext(), MainActivity.class); Intent intent = new Intent(getApplicationContext(), MainActivity.class);
......
...@@ -44,7 +44,6 @@ public class SuReceiver extends BroadcastReceiver { ...@@ -44,7 +44,6 @@ public class SuReceiver extends BroadcastReceiver {
SuLogEntry log = new SuLogEntry(policy); SuLogEntry log = new SuLogEntry(policy);
if (policy.notification && Global.Configs.suNotificationType == TOAST) {
String message; String message;
switch (action) { switch (action) {
case "allow": case "allow":
...@@ -58,8 +57,10 @@ public class SuReceiver extends BroadcastReceiver { ...@@ -58,8 +57,10 @@ public class SuReceiver extends BroadcastReceiver {
default: default:
return; return;
} }
if (policy.notification && Global.Configs.suNotificationType == TOAST)
Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
if (policy.logging) { if (policy.logging) {
toUid = intent.getIntExtra("to.uid", -1); toUid = intent.getIntExtra("to.uid", -1);
if (toUid < 0) return; if (toUid < 0) return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment