set system screen never sleep
diff --git a/frameworks/base/services/core/java/com/android/server/power/PowerMa
index e76b458..6bbea52 100644
--- a/frameworks/base/services/core/java/com/android/server/power/PowerManagerSe
+++ b/frameworks/base/services/core/java/com/android/server/power/PowerManagerSe
@@ -1739,6 +1739,10 @@ public final class PowerManagerService extends SystemServ
private int getScreenOffTimeoutLocked(int sleepTimeout) {
int timeout = mScreenOffTimeoutSetting;
+ if(timeout < 0)
+ {
+ return mMaximumScreenOffTimeoutFromDeviceAdmin;
+ }
if (isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked()) {
timeout = Math.min(timeout, mMaximumScreenOffTimeoutFromDeviceAdmin
}
Android 系统永不休眠
最新推荐文章于 2024-05-15 08:13:17 发布