基于Android 7.1系统,系统永不休眠问题:
1、永不休眠
在代码中:
\frameworks\base\services\core\java\com\android\server\power\PowerManagerService.java
判读getScreenOffTimeoutLocked()函数下增加
int timeout = mScreenOffTimeoutSetting;
/*add mxliao,videostrong at date 20170731----*/
if (timeout < 0) {
return mMaximumScreenOffTimeoutFromDeviceAdmin;
}
if (isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked()) {
timeout = Math.min(timeout, mMaximumScreenOffTimeoutFromDeviceAdmin);
}
}
同时要修改
frameworks\base\packages\SettingsProvider\res\values\default.txt文件
<integer name="def_screen_off_timeout">-1</integer> 改成-1
2、解锁
<bool name="def_lockscreen_disabled">true</bool> 修改成true
了解更多咨询,点击下方链接
深圳视壮科技是人脸识别测温RK3288/RK3399/RK3568/A311D/A311D2安卓主板方案开发定制厂家 - Powered by Discuz!