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

Commit 4bfb604d authored by Michael Wright's avatar Michael Wright Committed by android-build-merger
Browse files

Merge "Avoid NPE when getting last shutdown reason." into oc-dev am: 0cf6b908

am: ed06122e

Change-Id: I8c215a63d34938e02f0ab1fca3b746e1705d6eec
parents bcee3cc3 ed06122e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4607,6 +4607,9 @@ public final class PowerManagerService extends SystemService
        } catch (IOException e) {
            Slog.e(TAG, "Failed to read last_reboot_reason file", e);
        }
        if (line == null) {
            return PowerManager.SHUTDOWN_REASON_UNKNOWN;
        }
        switch (line) {
            case REASON_SHUTDOWN:
                return PowerManager.SHUTDOWN_REASON_SHUTDOWN;