MaxInactivityTimeDeviceLock
Specifies the length of time (in seconds) that the device can be inactive before the password is required to reactivate it. The user can choose a value that is smaller than this, but cannot choose a value that is larger.
在Android Email中登录一个设置了MaxInactivityTimeDeviceLock 策略的Exchange账号,
发现该策略并没有其作用。
原因在于Policy进行没有设置没有设置密码模式的其他关于密码相关的策略都应置于0的修正的时候将mMaxScreenLockTime也设置成0了,MaxInactivityTimeDeviceLock 策略无效
public void normalize() { if (mPasswordMode == PASSWORD_MODE_NONE) { mPasswordMaxFails = 0; //mMaxScreenLockTime = 0; mPasswordMinLength = 0; mPasswordComplexChars = 0; mPasswordHistory = 0; mPasswordExpirationDays = 0; } else { if ((mPasswordMode != PASSWORD_MODE_SIMPLE) && (mPasswordMode != PASSWORD_MODE_STRONG)) { throw new IllegalArgumentException("password mode"); }
应将其 mMaxScreenLockTime = 0;去掉