去除锁屏和休眠
条评论去除休眠
- frameworks/base/packages/SettingsProvider/res/values/defaults.xml60000ms,修改为-1。-1代表0xffffffff,永远不要休眠
1
<integer name="def_screen_off_timeout">60000</integer>
或者修改为2147483647 Java中Integer.MAX_VALUE - frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java
1
2loadIntegerSetting(stmt,Settings.System.SCREEN_OFF_TIMEOUT,
R.integer.def_screen_off_timeout);
去除锁屏
- frameworks/base/core/res/res/values/config.xml
1
2<bool name="config_dreamsSupported">false</bool>
<bool name="config_dreamsEnabledByDefault">false</bool> - frameworks/base/packages/SettingsProvider/res/values/defaults.xml
1
<bool name="def_lockscreen_disabled">true</bool>
- frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
1
2
3public void goToSleep(long eventTime, int reason, int flags) {
if (true){ return; }
本文标题:去除锁屏和休眠
文章作者:xmaihh
发布时间:2018-06-25
最后更新:2018-06-25
原始链接:https://xmaihh.github.io/blog/2018/06/25/qu-chu-suo-ping-he-xiu-mian/
版权声明:采用[CC BY-NC-SA 4.0许可协议]进行许可
分享