Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8350470 authored by Chenfu Liao's avatar Chenfu Liao Committed by Daren Liao
Browse files

Fix Quiescent Reboot Reason

[Description]
Revise system property "sys.powerctl" when the reason is quiescent.
When the reason is only quiescent,
the value of the system property "sys.powerctl"
should be "reboot,quiescent" instead of "reboot,,quiescent".

Bug: 192634025

Test:
adb shell svc power reboot quiescent

Change-Id: I9b3ac851f85fac093c4767f5bc82baa07181dda5
parent da9b4de8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3756,7 +3756,10 @@ public final class PowerManagerService extends SystemService
        if (sQuiescent) {
            // Pass the optional "quiescent" argument to the bootloader to let it know
            // that it should not turn the screen/lights on.
            reason = reason + ",quiescent";
            if (reason != ""){
                reason += ",";
            }
            reason = reason + "quiescent";
        }

        SystemProperties.set("sys.powerctl", "reboot," + reason);