diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-08-21 21:41:09 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2014-08-21 22:20:55 -0700 |
commit | 72671fbb2036e13fccb0b8eeb98be606de1819dd (patch) | |
tree | b39d060ae2b56add9cde0c11d7f2598e0b50e559 /services/core/java/com/android/server/power | |
parent | a71f03c48160ee82aad8d05edeb39faaf95ae137 (diff) | |
download | frameworks_base-72671fbb2036e13fccb0b8eeb98be606de1819dd.zip frameworks_base-72671fbb2036e13fccb0b8eeb98be606de1819dd.tar.gz frameworks_base-72671fbb2036e13fccb0b8eeb98be606de1819dd.tar.bz2 |
Require DEVICE_POWER permission for DOZE_WAKE_LOCK.
This wake lock is only intended to be used internally.
Change-Id: I8d109c492605673616cf7f4f31f082a42fb1d912
Diffstat (limited to 'services/core/java/com/android/server/power')
-rw-r--r-- | services/core/java/com/android/server/power/PowerManagerService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java index 9734bd4..a10136b 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -2774,6 +2774,10 @@ public final class PowerManagerService extends com.android.server.SystemService PowerManager.validateWakeLockParameters(flags, tag); mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WAKE_LOCK, null); + if ((flags & PowerManager.DOZE_WAKE_LOCK) != 0) { + mContext.enforceCallingOrSelfPermission( + android.Manifest.permission.DEVICE_POWER, null); + } if (ws != null && ws.size() != 0) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.UPDATE_DEVICE_STATS, null); |