mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 09:47:13 +00:00
Debug encrypted message structure
This commit is contained in:
parent
3808e41e67
commit
37ffe55680
1 changed files with 18 additions and 0 deletions
|
@ -8168,8 +8168,17 @@ public class FragmentMessages extends FragmentBase
|
|||
String protect_subject = parts.getProtectedSubject();
|
||||
|
||||
// Write decrypted body
|
||||
boolean debug = prefs.getBoolean("debug", false);
|
||||
boolean download_plain = prefs.getBoolean("download_plain", false);
|
||||
String html = parts.getHtml(context, download_plain);
|
||||
|
||||
if (html == null && (debug || BuildConfig.DEBUG)) {
|
||||
int textColorLink = Helper.resolveColor(context, android.R.attr.textColorLink);
|
||||
SpannableStringBuilder ssb = new SpannableStringBuilderEx();
|
||||
MessageHelper.getStructure(imessage, ssb, 0, textColorLink);
|
||||
html = HtmlHelper.toHtml(ssb, context);
|
||||
}
|
||||
|
||||
Helper.writeText(message.getFile(context), html);
|
||||
Log.i("pgp html=" + (html == null ? null : html.length()));
|
||||
|
||||
|
@ -8863,8 +8872,17 @@ public class FragmentMessages extends FragmentBase
|
|||
|
||||
// Write decrypted body
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean debug = prefs.getBoolean("debug", false);
|
||||
boolean download_plain = prefs.getBoolean("download_plain", false);
|
||||
String html = parts.getHtml(context, download_plain);
|
||||
|
||||
if (html == null && (debug || BuildConfig.DEBUG)) {
|
||||
int textColorLink = Helper.resolveColor(context, android.R.attr.textColorLink);
|
||||
SpannableStringBuilder ssb = new SpannableStringBuilderEx();
|
||||
MessageHelper.getStructure(imessage, ssb, 0, textColorLink);
|
||||
html = HtmlHelper.toHtml(ssb, context);
|
||||
}
|
||||
|
||||
Helper.writeText(message.getFile(context), html);
|
||||
Log.i("s/mime html=" + (html == null ? null : html.length()));
|
||||
|
||||
|
|
Loading…
Reference in a new issue