summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/email/SecurityPolicy.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/email/SecurityPolicy.java b/src/com/android/email/SecurityPolicy.java
index 60ecbced9..7b73eb74e 100644
--- a/src/com/android/email/SecurityPolicy.java
+++ b/src/com/android/email/SecurityPolicy.java
@@ -590,6 +590,15 @@ public class SecurityPolicy {
if (account.mPolicyKey > 0) {
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);
if (!policyChanged && (TextUtilities.stringOrNullEquals(securityKey,
account.mSecuritySyncKey))) {