RK3288 Android7.1 永久关闭休眠功能

  • 修改 Android 里面的源码,如下:

    • frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
    1863     private int getScreenOffTimeoutLocked(int sleepTimeout) {
    1864         int timeout = mScreenOffTimeoutSetting;
    1866         if(timeout < 0){
    1867             return mMaximumScreenOffTimeoutFromDeviceAdmin;
    1868         }
    
    • frameworks/base/packages/SettingsProvider/res/values/defaults.xml
     22     <integer name="def_screen_off_timeout">-1</integer>
     23     <integer name="def_sleep_timeout">-1</integer>
    
posted @ 2020-04-14 10:02  陈富林  阅读(1955)  评论(1编辑  收藏  举报