Android系统-Settings-添加永不休眠选项并默认永不休眠

Posted 有头发的猿

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android系统-Settings-添加永不休眠选项并默认永不休眠相关的知识,希望对你有一定的参考价值。

MTK_android11_Settings-添加用不休眠选项并默认永不休眠:

diff --git a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
index ae807809640..1b51e211453 100755
--- a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5179,7 +5179,9 @@ public class PhoneWindowManager implements WindowManagerPolicy 
                 if (enable) 
                     if (localLOGV) Log.v(TAG, "setting lockscreen timer");
                     mHandler.removeCallbacks(mScreenLockTimeout); // remove any pending requests
-                    mHandler.postDelayed(mScreenLockTimeout, mLockScreenTimeout);
+                    if (mLockScreenTimeout != 0)
+						mHandler.postDelayed(mScreenLockTimeout, mLo

以上是关于Android系统-Settings-添加永不休眠选项并默认永不休眠的主要内容,如果未能解决你的问题,请参考以下文章

如何在settings里的休眠模式里添加永不休眠

Android添加永不休眠选项

Android设置系统开机自己主动永不休眠

Android机顶盒修改屏幕永不休眠

苹果电脑休眠怎么唤醒

Android wifi休眠策略