aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/FileBackend.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
index da7ed84dc..d670c98d9 100644
--- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
@@ -60,6 +60,9 @@ import de.pixart.messenger.utils.MimeUtils;
import de.pixart.messenger.xmpp.pep.Avatar;
public class FileBackend {
+
+ private static final Object THUMBNAIL_LOCK = new Object();
+
private static final SimpleDateFormat fileDateFormat = new SimpleDateFormat("yyyyMMdd_HHmmssSSS", Locale.US);
private static final String FILE_PROVIDER = ".files";
@@ -430,7 +433,7 @@ public class FileBackend {
final LruCache<String, Bitmap> cache = mXmppConnectionService.getBitmapCache();
Bitmap thumbnail = cache.get(uuid);
if ((thumbnail == null) && (!cacheOnly)) {
- synchronized (cache) {
+ synchronized (THUMBNAIL_LOCK) {
thumbnail = cache.get(uuid);
if (thumbnail != null) {
return thumbnail;