`

Exchange Policy MaxInactivityTimeDeviceLock在Android Email不生效

 
阅读更多
https://msdn.microsoft.com/en-us/library/hh509085(v=exchg.140).aspx

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;去掉
  • 大小: 74.9 KB
  • 大小: 84.6 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics