diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 1170fbe..e4ac8d7 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2428,7 +2428,7 @@ This value must be greater than zero, otherwise the device will immediately fall asleep again as soon as it is awoken. --> - <integer name="config_minimumScreenOffTimeout">10000</integer> + <integer name="config_minimumScreenOffTimeout">2147483647</integer> <!-- User activity timeout: Maximum screen dim duration in milliseconds.
锁屏
锁屏出现的时机:LockScreen is shown after reboot or after screen timeout / short press on power. // 来自源码LockPatternUtils.java中的注释
/** * Determine if LockScreen is disabled for the current user. This is used to decide whether * LockScreen is shown after reboot or after screen timeout / short press on power. * * @return true if lock screen is disabled */ @UnsupportedAppUsage publicbooleanisLockScreenDisabled(int userId) { if (isSecure(userId)) { returnfalse; } booleandisabledByDefault= mContext.getResources().getBoolean( com.android.internal.R.bool.config_disableLockscreenByDefault); booleanisSystemUser= UserManager.isSplitSystemUser() && userId == UserHandle.USER_SYSTEM; UserInfouserInfo= getUserManager().getUserInfo(userId); booleanisDemoUser= UserManager.isDeviceInDemoMode(mContext) && userInfo != null && userInfo.isDemo(); return getBoolean(DISABLE_LOCKSCREEN_KEY, false, userId) || (disabledByDefault && !isSystemUser) || isDemoUser; }
public LockSettingsStorage getStorage() { finalLockSettingsStoragestorage=newLockSettingsStorage(mContext); storage.setDatabaseOnCreateCallback(newLockSettingsStorage.Callback() { @Override publicvoidinitialize(SQLiteDatabase db) { // Get the lockscreen default from a system property, if available booleanlockScreenDisable= SystemProperties.getBoolean( "ro.lockscreen.disable.default", false); if (lockScreenDisable) { storage.writeKeyValue(db, LockPatternUtils.DISABLE_LOCKSCREEN_KEY, "1", 0); } } }); return storage; }