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

Commit 0cf6b908 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid NPE when getting last shutdown reason." into oc-dev

parents 6c34dd58 9199d0c1
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;