Android 屏幕常亮 背景常亮

2014-11-24 13:19:11 · 作者: · 浏览: 3

本文主题:




先上代码:


注意需要加权限




解释:


用到的类


主要是这两个参数:PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE


下面是 android 官方API 解释:




第二个参数:



In addition, you can add two more flags, which affect behavior of the screen only.These flags have no effect when combined with aPARTIAL_WAKE_LOCK.