mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-17 01:48:37 +01:00
Make case Intent.ACTION_REBOOT fall through
This commit is contained in:
parent
0eef4eacd6
commit
164a99681b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user