diff --git a/app/src/full/java/com/topjohnwu/magisk/components/GeneralReceiver.java b/app/src/full/java/com/topjohnwu/magisk/components/GeneralReceiver.java index 8918eee28..2310c5aaf 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/GeneralReceiver.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/GeneralReceiver.java @@ -41,27 +41,11 @@ public class GeneralReceiver extends BroadcastReceiver { return; switch (action) { case Intent.ACTION_REBOOT: - String rebootAction = intent.getStringExtra("action"); - switch (rebootAction) { - case "request": - Intent i = new Intent(app, ClassMap.get(SuRequestActivity.class)) - .putExtra("socket", intent.getStringExtra("socket")) - .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - app.startActivity(i); - break; - case "log": - SU_LOGGER.handleLogs(intent); - break; - case "notify": - SU_LOGGER.handleNotify(intent); - break; - } - break; case Intent.ACTION_BOOT_COMPLETED: - String bootAction = intent.getStringExtra("action"); - if (bootAction == null) - bootAction = "boot"; - switch (bootAction) { + String realAction = intent.getStringExtra("action"); + if (realAction == null) + realAction = "boot_complete"; + switch (realAction) { case "request": Intent i = new Intent(app, ClassMap.get(SuRequestActivity.class)) .putExtra("socket", intent.getStringExtra("socket")) @@ -74,7 +58,7 @@ public class GeneralReceiver extends BroadcastReceiver { case "notify": SU_LOGGER.handleNotify(intent); break; - case "boot": + case "boot_complete": default: /* Devices with DTBO might want to patch dtbo.img. * However, that is not possible if Magisk is installed by