app: Don't restart zygote manually on soft reboot (#40)
* zygote will be automatically restrarted as surfacelinger has 'onrestart restart zygote' in service definition since N.
This commit is contained in:
parent
5220cf5ea5
commit
aa0d587be0
|
|
@ -38,7 +38,6 @@ public class RebootUtil {
|
|||
try {
|
||||
if (mode == RebootType.USERSPACE && !supportUserspaceReboot()) {
|
||||
ShizukuSystemProperties.set("ctl.restart", "surfaceflinger");
|
||||
ShizukuSystemProperties.set("ctl.restart", "zygote");
|
||||
} else {
|
||||
POWER_MANAGER.get().reboot(BuildConfig.DEBUG, mode.toString(), false);
|
||||
}
|
||||
|
|
@ -80,7 +79,7 @@ public class RebootUtil {
|
|||
if (supportUserspaceReboot()) {
|
||||
command = "/system/bin/svc power reboot userspace";
|
||||
} else {
|
||||
command = "setprop ctl.restart surfaceflinger; setprop ctl.restart zygote";
|
||||
command = "setprop ctl.restart surfaceflinger";
|
||||
}
|
||||
} else if (mode == RebootType.NORMAL) {
|
||||
command = "/system/bin/svc power reboot";
|
||||
|
|
@ -96,4 +95,4 @@ public class RebootUtil {
|
|||
private static boolean supportUserspaceReboot() {
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && ((PowerManager) App.getInstance().getSystemService(Context.POWER_SERVICE)).isRebootingUserspaceSupported();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue