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

Commit 42ded4a5 authored by David Ng's avatar David Ng Committed by Steve Kondik
Browse files

services: Fix device-specific shutdown hook to support restart

Update device-specific shutdown hook such that it is invoked for
restart as well as for shutdown.

Change-Id: I8c9cbe674000e0d664d41ecc98a341112e1cb060
parent 20680339
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -603,6 +603,9 @@ public final class ShutdownThread extends Thread {
     * @param reason reason for reboot
     */
    public static void rebootOrShutdown(boolean reboot, String reason) {
        // Oem specific shutdown
        deviceRebootOrShutdown(reboot, reason);

        if (reboot) {
            Log.i(TAG, "Rebooting, reason: " + reason);
            try {
@@ -627,9 +630,6 @@ public final class ShutdownThread extends Thread {
            }
        }

        // Oem specific shutdown
        deviceRebootOrShutdown(reboot, reason);

        // Shutdown power
        Log.i(TAG, "Performing low-level shutdown...");
        PowerManagerService.lowLevelShutdown();