From b424ffa65b809094e6b9109e2131b718ec9eae76 Mon Sep 17 00:00:00 2001 From: Tony Mantler Date: Fri, 4 Oct 2013 13:25:26 -0700 Subject: [PATCH] Reply-all setting is modified at runtime, don't cache it in a static map b/11066041 Change-Id: I4e14c3add3fe2503e8369dbb7ef976e110ef2fee --- src/com/android/email/provider/EmailProvider.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index 041e27ab0..d2ea71b36 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -2308,10 +2308,6 @@ public class EmailProvider extends ContentProvider { AccountColumns.SIGNATURE) .add(UIProvider.AccountColumns.SettingsColumns.SNAP_HEADERS, Integer.toString(UIProvider.SnapHeaderValue.ALWAYS)) - .add(UIProvider.AccountColumns.SettingsColumns.REPLY_BEHAVIOR, - Integer.toString(mailPrefs.getDefaultReplyAll() - ? UIProvider.DefaultReplyBehavior.REPLY_ALL - : UIProvider.DefaultReplyBehavior.REPLY)) .add(UIProvider.AccountColumns.SettingsColumns.CONFIRM_ARCHIVE, "0") .add(UIProvider.AccountColumns.SettingsColumns.CONVERSATION_VIEW_MODE, Integer.toString(UIProvider.ConversationViewMode.UNDEFINED)) @@ -2985,6 +2981,12 @@ public class EmailProvider extends ContentProvider { values.put(UIProvider.AccountColumns.QUICK_RESPONSE_URI, combinedUriString("quickresponse/account", id)); } + if (projectionColumns.contains(UIProvider.AccountColumns.SettingsColumns.REPLY_BEHAVIOR)) { + values.put(UIProvider.AccountColumns.SettingsColumns.REPLY_BEHAVIOR, + mailPrefs.getDefaultReplyAll() + ? UIProvider.DefaultReplyBehavior.REPLY_ALL + : UIProvider.DefaultReplyBehavior.REPLY); + } final StringBuilder sb = genSelect(getAccountListMap(getContext()), uiProjection, values); sb.append(" FROM " + Account.TABLE_NAME + " WHERE " + AccountColumns.ID + "=?");