• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

修訂c66a38c66e1d92550c0b5c91139d2b75ab522d6e (tree)
時間2016-11-22 12:24:35
作者John Stultz <john.stultz@lina...>
CommiterChih-Wei Huang

Log Message

Zygote: Add CAP_WAKE_ALARM to system_server to properly support timerfd alarms

The when the timerfd alarm logic was added to the kernel, an oversight was made
and the interface does not check for the CAP_WAKE_ALARM permissions as required
via other kernel methods to trigger an alarm timer.

In v4.8-rc kernels, the change 2895a5e5b3a ("timerfd: Reject ALARM timerfds
without CAP_WAKE_ALARM") was added by Eric Caruso <ejcaruso@google.com>.

After this change (which may be backported to -stable), the AlarmManager will
fail on the first timerfd_create call, and will not be able to set the time
or handle other necessary functions.

The solution here is to add CAP_WAKE_ALARM to the system_server process.

Change-Id: Ifdb16f3ef42711e553f727165de3922d484b5be4
Signed-off-by: John Stultz <john.stultz@linaro.org>

Change Summary

差異

--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -518,7 +518,8 @@ public class ZygoteInit {
518518 OsConstants.CAP_SYS_NICE,
519519 OsConstants.CAP_SYS_RESOURCE,
520520 OsConstants.CAP_SYS_TIME,
521- OsConstants.CAP_SYS_TTY_CONFIG
521+ OsConstants.CAP_SYS_TTY_CONFIG,
522+ OsConstants.CAP_WAKE_ALARM
522523 );
523524 /* Hardcoded command line to start the system server */
524525 String args[] = {