在 base/services/core/java/com/android/server/power/PowerManagerService.java文件中getScreenOffTimeoutLocked函数中添加如下内容
int nosleep = mScreenOffTimeoutSetting;
Slog.i(TAG, "nosleep="+nosleep+" MaximumScreenoff="+mMaximumScreenOffTimeoutFromDeviceAdmin); if(nosleep < 70000) { nosleep = mMaximumScreenOffTimeoutFromDeviceAdmin ; Slog.i(TAG,"666"); return Math.max(nosleep, mMaximumScreenOffTimeoutFromDeviceAdmin); }