Prevent crash

pull/194/head
M66B 4 years ago
parent 16120e52e2
commit 6c0761c06d

@ -197,6 +197,8 @@ public class ActivitySignature extends ActivityBase {
etText.setText(HtmlHelper.fromHtml(html, new Html.ImageGetter() { etText.setText(HtmlHelper.fromHtml(html, new Html.ImageGetter() {
@Override @Override
public Drawable getDrawable(String source) { public Drawable getDrawable(String source) {
if (source != null && source.startsWith("cid:"))
source = null;
return ImageHelper.decodeImage(ActivitySignature.this, -1, source, true, 0, 1.0f, etText); return ImageHelper.decodeImage(ActivitySignature.this, -1, source, true, 0, 1.0f, etText);
} }
}, null, this)); }, null, this));

@ -196,6 +196,8 @@ public class FragmentAnswer extends FragmentBase {
etText.setText(HtmlHelper.fromHtml(answer.text, new Html.ImageGetter() { etText.setText(HtmlHelper.fromHtml(answer.text, new Html.ImageGetter() {
@Override @Override
public Drawable getDrawable(String source) { public Drawable getDrawable(String source) {
if (source != null && source.startsWith("cid:"))
source = null;
return ImageHelper.decodeImage(getContext(), -1, source, true, 0, 1.0f, etText); return ImageHelper.decodeImage(getContext(), -1, source, true, 0, 1.0f, etText);
} }
}, null, getContext())); }, null, getContext()));

@ -1647,6 +1647,8 @@ public class FragmentCompose extends FragmentBase {
Spanned spanned = HtmlHelper.fromHtml(html, new Html.ImageGetter() { Spanned spanned = HtmlHelper.fromHtml(html, new Html.ImageGetter() {
@Override @Override
public Drawable getDrawable(String source) { public Drawable getDrawable(String source) {
if (source != null && source.startsWith("cid:"))
source = null;
return ImageHelper.decodeImage(getContext(), working, source, true, zoom, 1.0f, etBody); return ImageHelper.decodeImage(getContext(), working, source, true, zoom, 1.0f, etBody);
} }
}, null, getContext()); }, null, getContext());

Loading…
Cancel
Save