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

Commit ed06122e 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

Change-Id: Ib31807bddc953d2bba068359c9468257d1b92a9f
parents eccbbe4c 0cf6b908
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;