From 18752a5c583f551d6173315abbb01721d1c9530f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 24 Oct 2018 20:00:56 +0200 Subject: [PATCH] write null bitmap to imageview to replace asyncdrawable --- .../eu/siacs/conversations/persistance/FileBackend.java | 2 +- src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index ed3a6542c..cb130c24e 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -743,7 +743,7 @@ public class FileBackend { thumbnail = withGifOverlay; } } - this.mXmppConnectionService.getBitmapCache().put(uuid, thumbnail); + cache.put(uuid, thumbnail); } } return thumbnail; diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index ccc7f9e5c..e0a7d9391 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -964,12 +964,12 @@ public abstract class XmppActivity extends ActionBarActivity { } @Override - protected void onPostExecute(Bitmap bitmap) { - if (bitmap != null && !isCancelled()) { + protected void onPostExecute(final Bitmap bitmap) { + if (!isCancelled()) { final ImageView imageView = imageViewReference.get(); if (imageView != null) { imageView.setImageBitmap(bitmap); - imageView.setBackgroundColor(0x00000000); + imageView.setBackgroundColor(bitmap == null ? 0xff333333 : 0x00000000); } } }