summaryrefslogtreecommitdiff
path: root/cmds/svc
diff options
context:
space:
mode:
authorYusuke Sato <yusukes@google.com>2015-07-21 15:52:11 -0700
committerYusuke Sato <yusukes@google.com>2015-07-30 23:47:13 -0700
commit705ffd1efe529bb291e90fa06e92c8090ee98627 (patch)
tree92c2fe3d2bacf97f8c00a253c1c98bd804800f7c /cmds/svc
parent37353dc13e11000473f5aa43d5713816f2b6a83f (diff)
Distinguish user-requested shutdown from power-related ones
With this patch, when the user requested shutdown, PowerManagerService sets sys.powerctl is set to "shutdown,userrequested", and init runs fsck on shutdown. When shutdown is triggered due to a low power state etc., the service sets the property to "shutdown,", and init immediately shuts down the system without running the command. This is a follow-up CL for http://r.android.com/158525. Bug: 21853106 Change-Id: Iae72990130fe9aa479c802f77301438190dbbfb3
Diffstat (limited to 'cmds/svc')
-rw-r--r--cmds/svc/src/com/android/commands/svc/PowerCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/svc/src/com/android/commands/svc/PowerCommand.java b/cmds/svc/src/com/android/commands/svc/PowerCommand.java
index da8586c14256..e11d278399ce 100644
--- a/cmds/svc/src/com/android/commands/svc/PowerCommand.java
+++ b/cmds/svc/src/com/android/commands/svc/PowerCommand.java
@@ -93,7 +93,7 @@ public class PowerCommand extends Svc.Command {
} else if ("shutdown".equals(args[1])) {
try {
// no confirm, wait till device is off
- pm.shutdown(false, true);
+ pm.shutdown(false, null, true);
} catch (RemoteException e) {
System.err.println("Failed to shutdown.");
}