From 49cbafad9beb6041aaee773f75473fdb5022888e Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Fri, 20 Dec 2013 10:37:35 -0800 Subject: [PATCH] Zygote: enable CAP_BLOCK_SUSPEND capability for system server Starting from kernel 3.6, it requires processes to have the capability CAP_BLOCK_SUSPEND to set/unset wake locks. Adds CAP_BLOCK_SUSPEND to the list of capabilities for system server, so that PowerManager can set wake locks. Change-Id: I3246e6f6e6cb8f0bedb1c0417ed07085ee1f3aaa Signed-off-by: Daniel Leung --- core/java/com/android/internal/os/ZygoteInit.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 495cc5fd8b4b3..3f5ad86c4dbf8 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -499,6 +499,7 @@ public class ZygoteInit { private static boolean startSystemServer() throws MethodAndArgsCaller, RuntimeException { long capabilities = posixCapabilitiesAsBits( + OsConstants.CAP_BLOCK_SUSPEND, OsConstants.CAP_KILL, OsConstants.CAP_NET_ADMIN, OsConstants.CAP_NET_BIND_SERVICE,