Add reboot reason to detect device shutdown
This change will detect silent device shutdown
Change-Id: Ia3c13e372b02dd4d3ec4a99d1c1f7c4787977ac3
diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index 912a181..276559f 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -262,6 +262,7 @@
@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 @@
@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);