Loading core/java/android/os/PowerManager.java +8 −6 Original line number Diff line number Diff line Loading @@ -195,6 +195,8 @@ public final class PowerManager { * <p> * This is used by the dream manager to implement doze mode. It currently * has no effect unless the power manager is in the dozing state. * </p><p> * Requires the {@link android.Manifest.permission#DEVICE_POWER} permission. * </p> * * {@hide} Loading Loading @@ -330,6 +332,12 @@ public final class PowerManager { */ public static final int GO_TO_SLEEP_REASON_HDMI = 5; /** * Go to sleep flag: Skip dozing state and directly go to full sleep. * @hide */ public static final int GO_TO_SLEEP_FLAG_NO_DOZE = 1 << 0; /** * The value to pass as the 'reason' argument to reboot() to * reboot into recovery mode (for applying system updates, doing Loading @@ -343,12 +351,6 @@ public final class PowerManager { */ public static final String REBOOT_RECOVERY = "recovery"; /** * Go to sleep flag: Skip dozing state and directly go to full sleep. * @hide */ public static final int GO_TO_SLEEP_FLAG_NO_DOZE = 1 << 0; final Context mContext; final IPowerManager mService; final Handler mHandler; Loading services/core/java/com/android/server/power/PowerManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
core/java/android/os/PowerManager.java +8 −6 Original line number Diff line number Diff line Loading @@ -195,6 +195,8 @@ public final class PowerManager { * <p> * This is used by the dream manager to implement doze mode. It currently * has no effect unless the power manager is in the dozing state. * </p><p> * Requires the {@link android.Manifest.permission#DEVICE_POWER} permission. * </p> * * {@hide} Loading Loading @@ -330,6 +332,12 @@ public final class PowerManager { */ public static final int GO_TO_SLEEP_REASON_HDMI = 5; /** * Go to sleep flag: Skip dozing state and directly go to full sleep. * @hide */ public static final int GO_TO_SLEEP_FLAG_NO_DOZE = 1 << 0; /** * The value to pass as the 'reason' argument to reboot() to * reboot into recovery mode (for applying system updates, doing Loading @@ -343,12 +351,6 @@ public final class PowerManager { */ public static final String REBOOT_RECOVERY = "recovery"; /** * Go to sleep flag: Skip dozing state and directly go to full sleep. * @hide */ public static final int GO_TO_SLEEP_FLAG_NO_DOZE = 1 << 0; final Context mContext; final IPowerManager mService; final Handler mHandler; Loading
services/core/java/com/android/server/power/PowerManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -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); Loading