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;
|
return;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case Intent.ACTION_REBOOT:
|
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:
|
case Intent.ACTION_BOOT_COMPLETED:
|
||||||
String bootAction = intent.getStringExtra("action");
|
String realAction = intent.getStringExtra("action");
|
||||||
if (bootAction == null)
|
if (realAction == null)
|
||||||
bootAction = "boot";
|
realAction = "boot_complete";
|
||||||
switch (bootAction) {
|
switch (realAction) {
|
||||||
case "request":
|
case "request":
|
||||||
Intent i = new Intent(app, ClassMap.get(SuRequestActivity.class))
|
Intent i = new Intent(app, ClassMap.get(SuRequestActivity.class))
|
||||||
.putExtra("socket", intent.getStringExtra("socket"))
|
.putExtra("socket", intent.getStringExtra("socket"))
|
||||||
@ -74,7 +58,7 @@ public class GeneralReceiver extends BroadcastReceiver {
|
|||||||
case "notify":
|
case "notify":
|
||||||
SU_LOGGER.handleNotify(intent);
|
SU_LOGGER.handleNotify(intent);
|
||||||
break;
|
break;
|
||||||
case "boot":
|
case "boot_complete":
|
||||||
default:
|
default:
|
||||||
/* Devices with DTBO might want to patch dtbo.img.
|
/* Devices with DTBO might want to patch dtbo.img.
|
||||||
* However, that is not possible if Magisk is installed by
|
* However, that is not possible if Magisk is installed by
|
||||||
|
Loading…
Reference in New Issue
Block a user