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

Commit bfc1b8eb authored by David Ng's avatar David Ng Committed by Gerrit - the friendly Code Review server
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 d7fb74af
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -524,6 +524,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);
            PowerManagerService.lowLevelReboot(reason);
@@ -545,9 +548,6 @@ public final class ShutdownThread extends Thread {
            }
        }

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

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