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>
Read The Fucking Source Code