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

Commit bee2b92b authored by Abhishek Arpure's avatar Abhishek Arpure Committed by Linux Build Service Account
Browse files

Add reboot reason to detect device shutdown

This change will detect silent device shutdown

Change-Id: Ia3c13e372b02dd4d3ec4a99d1c1f7c4787977ac3
parent b0be5ce9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -262,6 +262,7 @@ public final class BatteryService extends SystemService {
                @Override
                public void run() {
                    if (ActivityManagerNative.isSystemReady()) {
                        Slog.e(TAG, "silent_reboot shutdownIfNoPowerLocked");
                        Intent intent = new Intent(Intent.ACTION_REQUEST_SHUTDOWN);
                        intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false);
                        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@@ -281,6 +282,7 @@ public final class BatteryService extends SystemService {
                @Override
                public void run() {
                    if (ActivityManagerNative.isSystemReady()) {
                        Slog.e(TAG, "silent_reboot shutdownIfOverTempLocked");
                        Intent intent = new Intent(Intent.ACTION_REQUEST_SHUTDOWN);
                        intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false);
                        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);