aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-17 20:01:56 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-17 20:01:56 +0100
commit283d5058e5f91e11fc651a83ce2968580bd94d4a (patch)
treef0495f547438ce5d06ed01da886cf17688bb3afe
parentc058594ff5d00bbcb1763d90c493c940e76c9f4b (diff)
synchronized around cache clear in avatar service
-rw-r--r--src/main/java/eu/siacs/conversations/services/AvatarService.java24
-rw-r--r--src/main/res/menu/muc_details_context.xml4
2 files changed, 19 insertions, 9 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java
index fc1ed28e..b8154d65 100644
--- a/src/main/java/eu/siacs/conversations/services/AvatarService.java
+++ b/src/main/java/eu/siacs/conversations/services/AvatarService.java
@@ -58,9 +58,11 @@ public class AvatarService {
}
public void clear(Contact contact) {
- for (Integer size : sizes) {
- this.mXmppConnectionService.getBitmapCache().remove(
- key(contact, size));
+ synchronized (this.sizes) {
+ for (Integer size : sizes) {
+ this.mXmppConnectionService.getBitmapCache().remove(
+ key(contact, size));
+ }
}
}
@@ -150,9 +152,11 @@ public class AvatarService {
}
public void clear(MucOptions options) {
- for (Integer size : sizes) {
- this.mXmppConnectionService.getBitmapCache().remove(
- key(options, size));
+ synchronized (this.sizes) {
+ for (Integer size : sizes) {
+ this.mXmppConnectionService.getBitmapCache().remove(
+ key(options, size));
+ }
}
}
@@ -182,9 +186,11 @@ public class AvatarService {
}
public void clear(Account account) {
- for (Integer size : sizes) {
- this.mXmppConnectionService.getBitmapCache().remove(
- key(account, size));
+ synchronized (this.sizes) {
+ for (Integer size : sizes) {
+ this.mXmppConnectionService.getBitmapCache().remove(
+ key(account, size));
+ }
}
}
diff --git a/src/main/res/menu/muc_details_context.xml b/src/main/res/menu/muc_details_context.xml
new file mode 100644
index 00000000..fe187c0c
--- /dev/null
+++ b/src/main/res/menu/muc_details_context.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+
+</menu> \ No newline at end of file