Merge "Fix attachments when policies change." into jb-ub-mail-ur10
This commit is contained in:
commit
ea69cbe533
@ -590,6 +590,15 @@ public class SecurityPolicy {
|
|||||||
if (account.mPolicyKey > 0) {
|
if (account.mPolicyKey > 0) {
|
||||||
oldPolicy = Policy.restorePolicyWithId(mContext, account.mPolicyKey);
|
oldPolicy = Policy.restorePolicyWithId(mContext, account.mPolicyKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If attachment policies have changed, fix up any affected attachment records
|
||||||
|
if (oldPolicy != null && securityKey != null) {
|
||||||
|
if ((oldPolicy.mDontAllowAttachments != policy.mDontAllowAttachments) ||
|
||||||
|
(oldPolicy.mMaxAttachmentSize != policy.mMaxAttachmentSize)) {
|
||||||
|
Policy.setAttachmentFlagsForNewPolicy(mContext, account, policy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean policyChanged = (oldPolicy == null) || !oldPolicy.equals(policy);
|
boolean policyChanged = (oldPolicy == null) || !oldPolicy.equals(policy);
|
||||||
if (!policyChanged && (TextUtilities.stringOrNullEquals(securityKey,
|
if (!policyChanged && (TextUtilities.stringOrNullEquals(securityKey,
|
||||||
account.mSecuritySyncKey))) {
|
account.mSecuritySyncKey))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user